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

Streaming Classification support #9106

Merged
merged 3 commits into from
Aug 23, 2022
Merged

Streaming Classification support #9106

merged 3 commits into from
Aug 23, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 23, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Expanded YOLOv5 classification inference to support new input sources and improved handling of results.

πŸ“Š Key Changes

  • Added support for YouTube URLs, webcam and generic streams (RTSP, RTMP, HTTP) as input sources.
  • Implemented various new options like view_img, save_txt, and update flags.
  • Improved image processing to handle different sizes and batch processing.
  • Streamlined result saving, enabling both image and text output.
  • Introduced inference speed improvements through batch processing and cuDNN benchmarking.
  • Added code to process and visualize top prediction results.
  • Enhanced the command-line interface with more options for image size, saving, and model updates.
  • Included checks and assertions to handle possible errors and misconfigurations.

🎯 Purpose & Impact

  • πŸŽ₯ The new input capabilities allow users to process data from a wider variety of sources, ranging from live streams to online videos, making YOLOv5 more versatile.
  • πŸ’Ύ The additional flags and output options improve user control over the inference process and the handling of results, facilitating integration into different workflows and systems.
  • ⚑️ Batch processing and cuDNN benchmarking can result in faster inference, especially for video or stream processing.
  • πŸ–ΌοΈ Enhanced visualization and saving of results help users better interpret the model's predictions.
  • βœ… The improved interface and error handling offer a smoother and more robust user experience, reducing potential frustration and troubleshooting time.

@glenn-jocher glenn-jocher self-assigned this Aug 23, 2022
@glenn-jocher
Copy link
Member Author

glenn-jocher commented Aug 23, 2022

@AyushExel this adds full cls inference support for all sources and also image annotation, i.e.

Usage - sources:
    $ python classify/predict.py --weights yolov5s-cls.pt --source 0                               # webcam
                                                                   img.jpg                         # image
                                                                   vid.mp4                         # video
                                                                   path/                           # directory
                                                                   'path/*.jpg'                    # glob
                                                                   'https://youtu.be/Zgi9g1ksQHc'  # YouTube
                                                                   'rtsp:https://example.com/media.mp4'  # RTSP, RTMP, HTTP stream

zidane

@glenn-jocher glenn-jocher merged commit 51c9f92 into master Aug 23, 2022
@glenn-jocher glenn-jocher deleted the cls/predict branch August 23, 2022 15:54
@AyushExel
Copy link
Contributor

PERFECT!!

ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Streaming Classification support

* Streaming Classification support

* Streaming Classification support
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.

None yet

2 participants