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

Update LoadStreams init fallbacks #3295

Merged
merged 1 commit into from
May 23, 2021
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 23, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved robustness in video stream handling for YOLOv5 πŸŽ₯✨.

πŸ“Š Key Changes

  • Changed the FPS (frames per second) calculation to use max to avoid negative values.
  • Modified frame count extraction to default to float('inf') if it is zero, ensuring it is treated as a continuous stream.

🎯 Purpose & Impact

  • πŸ› οΈ Fixes issues with incorrect FPS and frame count values, ensuring more reliable video processing.
  • πŸŒ€ Provides fallback values to prevent crashes if video properties cannot be read correctly.
  • πŸš€ Enhances user experience with smoother and more dependable video stream handling in YOLOv5 implementations.

@glenn-jocher glenn-jocher self-assigned this May 23, 2021
@glenn-jocher glenn-jocher linked an issue May 23, 2021 that may be closed by this pull request
@glenn-jocher glenn-jocher merged commit 0e2f2cb into master May 23, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch May 23, 2021 12:55
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the newest version cannot load webcam by detect
1 participant