thepbordin / YOLOv5-Streamlit-Deployment

Streamlit YOLOv5 deployment template

Home Page:https://thepbordin-yolov5-streamlit-deployment-app-pqrpvb.streamlit.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🚀 YOLOv5 Streamlit Deployment

HitCount

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

  1. Install Requirements pip install -r requirements.txt
  2. Install ffmpeg (for video inferencing)
    • For Windows read here
    • For Mac (brew) brew install ffmpeg
  3. Strart Stremlit
    cd YOLOv5-Streamlit-Deployment
    streamlit run app.py
    

Streamlit Cloud

  1. Edit a configuration in app.py (read ⚙️ Config Instruction)
  2. (Optional) Upload example datas in
    • example_images
    • example_videos
  3. Deploy on Streamlit

⚙️ Config Instruction

Download model from URL

  1. Upload model to Internet Archive

  2. Go to your uploaded file page.

  3. From DOWNLOAD OPTIONS select SHOW ALL

  4. Right click at .pt and Copy link address.

  5. 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" 

Reference

Yolov5 Real-time Inference using Streamlit

About

Streamlit YOLOv5 deployment template

https://thepbordin-yolov5-streamlit-deployment-app-pqrpvb.streamlit.app/

License:MIT License


Languages

Language:Python 100.0%