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

Slow detections because a detection image is generated even when there are no subscribers #364

Open
blakermchale opened this issue Dec 2, 2021 · 0 comments
Labels

Comments

@blakermchale
Copy link

Describe the bug
On these lines the detection image is generated and significantly slows down the detection speed since it is copying pixels in an image with a for loop. This doesn't need to occur at this stage and can be moved after it is checked if anyone is subscribing to the detection topic (here).

To Reproduce
Steps to reproduce the behavior:

  1. Run darknet_ros

Expected behavior
The detection image should not be generated unless there are subscribers.

System specs (please complete the following information):

  • OS Ubuntu 20.04
  • ROS version: Foxy
  • Library versions when non-standard
  • GPU / CUDA version when relevant

Additional context
I've tested this locally on a fork of PR #319. It increases the FPS from a max of 120 to 150, along with the average FPS being higher.

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

No branches or pull requests

1 participant