YOLOv5-Streamlit-Deployment
YOLOv5-Streamlit-Deployment copied to clipboard
Streamlit YOLOv5 deployment template
trafficstars
🚀 YOLOv5 Streamlit Deployment
A Easy way to deploy YOLOv5 object detection model with Streamlit.
Please feel free to use/edit.
code modified by GitHub/thepbordin from GitHub/zhoroh
✨ Features
- YOLO Weights Source
- Load from Local
- Download Weights from URL
- Example Dataset
- Videos
- Images
- Upload Data
- Video
- Image
- Select computing device (cuda/cpu)
⚙️ Installation
Local Use
- Install Requirements
pip install -r requirements.txt - Install ffmpeg (for video inferencing)
- For Windows read here
- For Mac (brew)
brew install ffmpeg
- Strart Stremlit
cd YOLOv5-Streamlit-Deployment streamlit run app.py
Streamlit Cloud
- Edit a configuration in app.py (read ⚙️ Config Instruction)
- (Optional) Upload example datas in
example_imagesexample_videos
- Deploy on Streamlit
⚙️ Config Instruction
Download model from URL
-
Upload model to Internet Archive
-
Go to your uploaded file page.
-
From
DOWNLOAD OPTIONSselectSHOW ALL -
Right click at
.pt and Copy link address. -
Edit config in app.py
cfg_enable_url_download = True url = "your_model_url"
Use local .pt file:
Edit config in app.py
## CFG
cfg_model_path = "models/your_model_name.pt"