Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Bounding box size #13

Open
gcharko2018 opened this issue Feb 8, 2019 · 5 comments
Open

Bounding box size #13

gcharko2018 opened this issue Feb 8, 2019 · 5 comments

Comments

@gcharko2018
Copy link

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 ?

@PINTO0309
Copy link
Owner

PINTO0309 commented Feb 8, 2019

@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

@gcharko2018
Copy link
Author

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

@lilohuang
Copy link

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.

@PINTO0309
Copy link
Owner

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

@EvgeniiFrolov
Copy link

EvgeniiFrolov commented Sep 25, 2019

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants