optimize-for-streams-detection#2538
optimize-for-streams-detection#2538ByiProX wants to merge 1 commit intoultralytics:masterfrom ByiProX:feature/optimize-for-streams-detection
Conversation
|
@ByiProX thanks for the PR! The intended use-case for LoadStreams() is to connect to multiple cameras for batched inference, i.e. you have 8 RTSP cameras, you pass their addresses in a streams.txt file (one per line), and then detect.py will load them all asynchronously and run batched inference on them: python detect.py --source streams.txtThis results in an incredibly fast multi-camera inference system, but a few issues are:
Ideally we'd want a streamloader that checks for and pulls the current frame at a proposed framerate, does not build up a queue, and skips inference if the entire batch is identical as you propose here. |
|
/rebase |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhancement of the webcam stream processing in YOLOv5 by allowing customizable frame skipping.
📊 Key Changes
skip_stepoption to specify how many frames to skip in a video stream before processing.detect.py,LoadStreamsnow receivesskip_stepto control frame skipping.LoadStreamsclass inutils/datasets.pyis modified to skip frames according toskip_step.🎯 Purpose & Impact