OpenVINO-YoloV3 icon indicating copy to clipboard operation
OpenVINO-YoloV3 copied to clipboard

Bounding box size

Open gcharko2018 opened this issue 5 years ago • 5 comments

I tested a tiny Yolov3/FP16/MYRIAD model (20 classes VOC) with openvino_tiny-yolov3_test.py and the provided cpp project. The accuracy is bad so I had to increase the threshold to 0.7 The funny thing is that the python and cpp implementation draw boxes of different size, the cpp implementation drawing boxes x1.5 to x2 larger that the python demo. Any idea about this ?

gcharko2018 avatar Feb 08 '19 13:02 gcharko2018

@gcharko2018

In fact, there is little difference in implementation of C++ program and Python program. I just reimplemented the C++ program in Python. I am sorry, but I do not know the detailed reason why there is a difference in the reasoning result. OpenVINO's Python API is a preview release.

btw, "openvino_tiny-yolov3_MultiStick_test.py" will run faster, so I recommend using this.

$ python3 openvino_tiny-yolov3_MultiStick_test.py -numncs 1

PINTO0309 avatar Feb 08 '19 13:02 PINTO0309

Thank you for the clarification and for your work on this project that is a valuable addition. I will let you know if I have any new information. Regards

gcharko2018 avatar Feb 08 '19 13:02 gcharko2018

The accuracy issue could be related to cv2.resize() which doesn't maintain the aspect ratio. Please note that darknet is using letterbox_image() while training. Reading this article https://blog.paperspace.com/how-to-implement-a-yolo-v3-object-detector-from-scratch-in-pytorch-part-5/ may give you some thoughts.

lilohuang avatar Feb 28 '19 09:02 lilohuang

I fixed Python's demo program. Thanks, @lilohuang !! With the help of lilohuang, the accuracy has improved greatly.

PINTO0309 avatar Mar 01 '19 13:03 PINTO0309

I fixed Python's demo program. Thanks, @lilohuang !! With the help of lilohuang, the accuracy has improved greatly.

Dear @PINTO0309 , Could you please provide any details on how you have managed to deal with different bounding boxes size in python and C++? What was the reason? What is the solution?

UPDATE: OK, turned out, the problem was in one of our modules. The module changed bounding boxes sizes internally, which made comparison of different modules results quite troublesome!

EvgeniiFrolov avatar Sep 25 '19 13:09 EvgeniiFrolov