ngzhili / Yolov5-Real-Time-Object-Detection

Real Time Video Feed with Object Detection using Yolov5 (custom or pre-trained model) deployed on web browser using Flask backend.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yolov5 Object Detection on Live Stream Video via Flask

framework libraries models

The Yolov5s pretained model is deployed using flask. This repo contains example apps for exposing the yolo5 object detection model from pytorch hub via a flask api/app.

Web app

Simple app that enables live webcam detection using pretrained YOLOv5s weights and see real time inference result of the model in the browser.

yolov5-real-time

Run & Develop locally

Run locally and dev:

  • conda create -n <VENV>
  • conda activate <VENV>
  • (<VENV>) $ pip install -r requirements.txt
  • (<VENV>) $ flask run

Docker

The example dockerfile shows how to expose the rest API:

# Build
docker build -t yolov5 .
# Run
docker run -p 5000:5000 yolov5-flask:latest

reference

About

Real Time Video Feed with Object Detection using Yolov5 (custom or pre-trained model) deployed on web browser using Flask backend.

License:MIT License


Languages

Language:Python 60.0%Language:HTML 33.8%Language:CSS 3.8%Language:Dockerfile 2.4%