Add Gradio demo for yolov5 (command line and colab notebook) #10572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 withor an yolov5 demo on github with
, 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 thetutorial.ipynb
, which is shown in the below figure.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
utils/gradio
directory to run a Gradio demo.🎯 Purpose & Impact
--share
option, users can share their demos through public links, enabling collaboration and wider sharing of their work. 🔗🌍