-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
darknet_video.py off by 1 frame #6706
Comments
Also, not clear why |
Update. 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 Proposed fix here: First time doing PR here @AlexeyAB , so let me know if I need to do more. Seems like |
Thanks didn't know about this flag Still, it's a bit of hackish fix as it assumes that My proposed fix gets rid of the problem without any sacrifice in speed(at least on my computer) |
Okay I just tried it out on my computer. |
Good point, if you have a long video and GPU can't keep up with the loading it would happen. I should add maxsize to the queues so they don't load too much into memory. I put maxsize to 250 for all queues to avoid this problem. |
@Tacokeet , I was still getting a memory problem so I worked on it a bit more. I did a hacky fix to the issue, but it works. You can check the updated PR. |
Thanks for the update! Seems you forgot to push the correct version because 'darknet_images' is not defined. But after adding it seems to run nice. I can now finish a ~9 min video without any memory issues. |
Oh, right! Thanks for pointing it out! |
Running darknet_video.py on the video makes a video where the detections and the video are off by one frame.
The amount of frames it's off by seems to depend on
max_size
of thedarknet_image_queue
The text was updated successfully, but these errors were encountered: