darknet icon indicating copy to clipboard operation
darknet copied to clipboard

Fix darknet_video.py to so it's not off by 1 frame

Open mazatov opened this issue 3 years ago • 0 comments

The issue: Previously the output videofile had detections off by 1 frame from the video. The reason: The darknet_image is overwritten in video_capture every time it's being created because it sits in the same memory so effectively the darknet_image_queue is not working properly

Changes:

  • darknet_image is created in every iteration of video_capture so every new darknet_image sits in different memory
  • remove limitations on max_size of the queue. I believe the limitations were put there to avoid the issue above, but it only made it so the result was off by one frame. Now that that's not an issue there is no reason to have max_size for any of the queques

mazatov avatar Sep 22 '20 17:09 mazatov