npq-thien / Vehicle_Detection_and_Counting_System

Building a small demo system to detect and count vehicle using Streamlit framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vehicle Detection and Counting System on Streamlit

Demo image

Introduction

This project is used to count and detect vehicle on the highway. It can detect 4 types of vehicles: car, motorcycle, bus, truck. I run this project on Python 3.9.7

  • YOLOv5 to detect objects on each of the video frames.

  • Deep SORT to track those objects over different frames and help counting.

  • Streamlit to build a simple web.

Installation

  • Install essential libraries and packages:
pip install -r requirements.txt
  • Run demo:
streamlit run demo.py --server.maxUploadSize=500

NOTE: If the web keeps showing "Please wait...", try to install streamlit version 1.11.0

pip install streamlit==1.11.0

If the web shows error "no module easydict"

pip install easydict

DEMO

Steps:

  1. Click Browse files to input video

  2. Setting Custom classes, Confidence and Line position

Settings

  • Custom classes: choose classes you want to detect

  • Confidence: the probability that one object belongs to one class

  • Line position: the position of green line, any vehicle have coordinate below the line will be counted

  1. Click START

Result

demo

About

Building a small demo system to detect and count vehicle using Streamlit framework

License:GNU General Public License v3.0


Languages

Language:Python 98.0%Language:Shell 0.8%Language:Cython 0.6%Language:Dockerfile 0.2%Language:Cuda 0.2%Language:C++ 0.1%Language:Makefile 0.0%