-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
Re-open IP-camera videostream if disconnected #5074
Conversation
…nalysis stability
…nalysis stability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hello @EgOrlukha, thank you for submitting a 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
- ✅ Verify your PR is up-to-date with origin/master. If your PR is behind origin/master an automatic GitHub actions rebase may be attempted by including the /rebase command in a comment body, or by running the following code, replacing 'feature' with the name of your local branch:
git remote add upstream https://github.com/ultralytics/yolov5.git
git fetch upstream
git checkout feature # <----- replace 'feature' with local branch name
git merge upstream/master
git push -u origin -f
- ✅ Verify all Continuous Integration (CI) checks are passing.
- ✅ Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." -Bruce Lee
@EgOrlukha this seems really useful, thanks for the PR! Have you been able to see some streams reconnect when they drop due to the PR code? |
@EgOrlukha PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐ |
@glenn-jocher Yes, I changed the code for my needs and it works stable even if a videostream is lost for some reason. These are OpenCV issues, I just re-open cv2.Videocapture() in case it was disconnected. |
@EgOrlukha great, good to know! |
* Re-open IP-camera videostream if disconnected. Provide IP-streaming analysis stability * Re-open IP-camera videostream if disconnected. Provide IP-streaming analysis stability * `self.imgs[i] *= 0` bug fix and cleanup Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Streaming from IP-cameras via rtsp was freezing when signal lost. I added an option to re-open cv2.Videocapture in case of video-stream disconnection.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced error handling for unresponsive video streams in YOLOv5.
📊 Key Changes
update
function inutils/datasets.py
now takes an additionalstream
parameter.🎯 Purpose & Impact