You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv5 issues and found no similar bug report.
YOLOv5 Component
No response
Bug
I run detect.py with single/multiple video sources: perfectly works with single video, failed with 2+ video sources. Could you please help to debug? Thank you
👋 Hello @regall00, thank you for reporting this issue with YOLOv5 🚀! This is an automated response to help you get the most relevant support as quickly as possible. An Ultralytics engineer will also review your report and assist you soon.
If this is a 🐛 Bug Report, please ensure you have provided a minimum reproducible example (MRE). From your description and logs, it looks like you've included the key files and commands—thank you! If you can further narrow down the problem or provide any additional error output, it would be helpful.
To help us debug and assist you more efficiently, please also verify:
YOLOv5 can be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python, and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
The crash with multiple video sources appears to be related to memory or threading issues when processing concurrent video streams. Please ensure you're using the latest YOLOv5 version by running git pull or reinstalling with pip install -U ultralytics.
You can try these workarounds: reduce the image size with --imgsz 320, limit threads with --max-det 100, or process videos sequentially by running detect.py separately for each video source instead of using the list.streams file.
I suspect that the crash is not due to concurrent situation, but threads are not cleanly ended/handled: error happens when finishing read one video, the other video still has frames to read.
Search before asking
YOLOv5 Component
No response
Bug
I run detect.py with single/multiple video sources: perfectly works with single video, failed with 2+ video sources. Could you please help to debug? Thank you
-----------cmd:
python3 ./detect.py --weight yolov5s.pt --source list.streams --nosave
-----------list.streams
/yolov5/videos/video1.mp4
/yolov5/videos/video1_cloned.mp4
----------- Log⚠️ Video stream unresponsive, please check your IP camera connection.
0: 384x640 4 persons, 3 suitcases, 1 chair, 1 tv, 1: 384x640 3 persons, 1 dog, 1 chair, 2 tvs, 23.2ms
0: 384x640 5 persons, 3 suitcases, 1 chair, 1 tv, 1: 384x640 3 persons, 1 chair, 2 tvs, 23.3ms
0: 384x640 5 persons, 4 suitcases, 1 chair, 1 tv, 1: 384x640 3 persons, 1 chair, 1 tv, 23.4ms
0: 384x640 4 persons, 5 suitcases, 1 chair, 1 tv, 1: 384x640 3 persons, 1 chair, 1 tv, 23.1ms
WARNING
0: 384x640 5 persons, 4 suitcases, 1 chair, 1 tv, 1 cell phone, 1: 384x640 3 persons, 1 chair, 1 tv, 23.2ms
0: 384x640 1: 384x640 3 persons, 1 chair, 23.7ms
Speed: 0.8ms pre-process, 13.5ms inference, 3.4ms NMS per image at shape (1, 3, 640, 640)
FATAL: exception not rethrown
Fatal Python error: Aborted
Thread 0x0000ffff99e06ca0 (most recent call first):
Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, torch._C, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse,
...,
scipy.stats._mvn, scipy.stats._rcont.rcont, scipy.ndimage._nd_image, scipy.ndimage._rank_filter_1d, _ni_label, scipy.ndimage._ni_label, scipy.cluster._vq, scipy.cluster._hierarchy, scipy.cluster._optimal_leaf_ordering (total: 157)
Aborted (core dumped)
Environment
Minimal Reproducible Example
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: