-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Detection Latency with live streaming sources (RTMP) #4465
Comments
@nandukalidindi see #4270 |
Sample video for comparing across OBS, VLC and YOLOv5 detection script. You can see clear latency across each. Video link: https://drive.google.com/file/d/1HwSrHX2cpQrzZSMozSpgV8qLUsAm7NrZ/view?usp=sharing The only thing I can think of is my hardware and I don't think it's that bad
|
@nandukalidindi can you try updating Line 324 in 25a7e1d
|
@glenn-jocher Let me give this a try this weekend, I will update this thread with the results. Thank you. |
@nandukalidindi great! |
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐! |
I seemed to have reduced the lag from increasing time to 1.5 seconds delay consistent. I commented the line in
It seems to make sense as you are computing the sleep time assuming the computation takes 0 ms. So the time just adds up. I'm not sure the implications of this as I've been running this for just over an hour only. |
@shermanlai I think you're right. Can you submit a PR with this change please? |
This definetely worked for me. I faced lag in RTSP stream. After commenting out this line, it worked flawlesly. Thanks buddy, you saved my time 👍 |
Negatively impacts YouTube inference but removes any lag on webcams/RTSP/RTMP etc. Resolves #4465
Negatively impacts YouTube inference but removes any lag on webcams/RTSP/RTMP etc. Resolves #4465
@ilkin94 @shermanlai good news 😃! Your original issue may now be fixed ✅ in PR #8243. To receive this update:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
Negatively impacts YouTube inference but removes any lag on webcams/RTSP/RTMP etc. Resolves ultralytics#4465
❔Question
I am trying to detect objects in a live stream using the default
yolov5s.pt
model. However, I am seeing a latency in the detection output irrespective of the source of the stream. Tried the below waysffmpeg
and then to local RTMP serverIn both the scenarios, I saw the latency to be increasing over time. Is this what everyone usually experiences with the detection script or is it something that I am doing wrong on the ingestion side?
I tried playing the OBS stream in a VLC player and the playback is almost realtime with may be 1-2 seconds latency.
If anyone tried live stream object detection using YoloV5, please let me know if you made any performance improvements for the script to not have the latency increase over time.
Additional context
Thanks for this awesome detection library.
The text was updated successfully, but these errors were encountered: