andy-yun / pytorch-0.4-yolov3

Yet Another Implimentation of Pytroch 0.4.1 and YoloV3 on python3
MIT License
279 stars 72 forks source link

Inference result and FPS issue #16

Closed kungkungpanda closed 5 years ago

kungkungpanda commented 6 years ago

Thanks for your kindness. :-)

I have two questions.

  1. I have found that there is a difference between the C-based code and the pytorch inference result. Please see the attached picture.

result

As a result, it is well detected, but especially the box of bike is not the same as the c-based result. Do you know where this problem occurs in the code? Solving this difference may help to converge performance to original YOLOv3. I am trying to resolve this issue.

2. FPS performance is lower than original one. The pytorch version seems to be difficult to process in real time. Is there any way to improve FPS performance? I think there is not much time difference between pytorch and C in GPU processing...

Thanks for your support.

andy-yun commented 6 years ago
  1. I am not sure about that. But, in C darknet, correct_yolo_boxes() is called before return actual detected boxes. I will inspect those part. correct_yolo_boxes() maybe adjust the detected box information.

  2. Actually, python version is slower than C version. The python version is used for modeling and conveniency. If you want to fast detection system, you should use C version.

andy-yun commented 6 years ago

@kungkungpanda The original C yolo version keeps width/height ration if they use the square sized image. But, in my version and @marvis version, we resized the image to the network size without considering width/height ration. That is the reason that the bounding box is different from each other and our results show the lower performance. I will fix the way to resize the image in the near future. Thanks.

andy-yun commented 5 years ago

@kungkungpanda It is a very long time to answer your question. I found some bugs and fixed them. And I modified the source code to keep the original aspect ratio. However, unfortunately, I cannot improve the speed performance. Heres the detected image by modified codes. In my opinion, the result is same to that of original version. predictions

kungkungpanda commented 5 years ago

@andy-yun Thank you!!