Skip to content
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

Threading to "improve" visual performance #54

Open
alyata opened this issue Jul 12, 2019 · 2 comments
Open

Threading to "improve" visual performance #54

alyata opened this issue Jul 12, 2019 · 2 comments

Comments

@alyata
Copy link

alyata commented Jul 12, 2019

Hi, @victordibia
Thanks for your work! I've been experimenting with tensorflow object detection models (yours included) and I came by a trick to make the FPS higher. I ran the model inference on a separate thread, but I don't feed every frame into the model. While the child thread is still processing the previous frame, I simply skip model inference and re-use previous bounding box results. I understand that this isn't an actual improvement in model performance, but it helped me render the camera feed in 34 FPS while the actual model was running at 11 FPS. Is there any way I can adapt my code to this project? It's my first time contributing.

@victordibia
Copy link
Owner

HI @kapzlok2408 ,
This sounds like an interesting addition - there might be users who dont mind the skipped frames.
Perhaps you can send a PR which updates the detect_multi-thread.py and adds an argument flag "reusing previous frames". When the flag is set, your fps hack "is implemented"?

 python detect_multi_threaded.py --reuseframes  0 --source videos/chess.mov

Let me know what you think, and thanks for sharing.

Victor.

@alyata
Copy link
Author

alyata commented Jul 15, 2019

Sounds good, I'll try to make the changes.

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

No branches or pull requests

2 participants