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

Add Gradio demo for yolov5 (command line and colab notebook) #10572

Closed
wants to merge 9 commits into from

Conversation

zldrobit
Copy link
Contributor

@zldrobit zldrobit commented Dec 23, 2022

This PR adds a Gradio demo in the file utils/gradio/demo.py. One could build a web interface for ML inference with Gradio using just several lines of code. This requires no frontend programming, and the inference parameters (e.g. conf and iou) could be adjusted on-the-fly. It's convenient for online testing, and it supports drag-and-drop operation for input images. This web page could be shared with others by http://HOSTNAME:PORT or a random public link. One could run an yolov5 demo in local path with

python utils/gradio/demo.py --source local --path MODEL_FILE

or an yolov5 demo on github with

python utils/gradio/demo.py --source github --model yolov5

, and maybe add --host 0.0.0.0 to share with other machines without --share. And an integrated demo page of Gradio is also added in the tutorial.ipynb, which is shown in the below figure.

image

There already exist other PR and issue involve Gradio integration, e.g. #8784 and #7712.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Integration of Gradio interface for YOLOv5 πŸ–ΌοΈβœ¨

πŸ“Š Key Changes

  • Added tutorial documentation for using Gradio with YOLOv5 in Jupyter Notebooks.
  • Created a new Python script in the utils/gradio directory to run a Gradio demo.
  • Included example usage instructions to run the demo with local models or models hosted on GitHub.

🎯 Purpose & Impact

  • Enhances Accessibility: Introduces a simple, user-friendly interface to interact with the YOLOv5 models, making it accessible to users with varying levels of expertise. πŸ§‘β€πŸ’»
  • Simplifies Testing: Facilitates quick testing and visualization of model predictions using a web-based GUI. Users can easily adjust parameters and see real-time results. πŸ“ˆ
  • Promotes Shareability: With the --share option, users can share their demos through public links, enabling collaboration and wider sharing of their work. πŸ”—πŸŒ

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

πŸ‘‹ Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap.

We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved.

For additional resources and information, please see the links below:

Thank you for your contributions to YOLO πŸš€ and Vision AI ⭐

@github-actions github-actions bot added the Stale label Oct 3, 2023
@github-actions github-actions bot closed this Nov 3, 2023
@glenn-jocher
Copy link
Member

@zldrobit thanks for your contribution! Gradio integration for YOLOv5 sounds like a fantastic addition, and your detailed explanation of the usage is appreciated.

We've discussed Gradio integration in the past, and it's a popular feature request. Your PR, along with the previous related discussions, will be carefully considered by the team.

Your effort in expanding YOLOv5's capabilities is commendable, and your insights into facilitating online testing with Gradio are valuable to the community. We will review your PR and keep you updated on any further developments.

Thank you for your dedication, and please feel free to reach out if you have any more ideas or contributions in the future. Let's continue making YOLOv5 even better together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants