/Real-time-Traffic-and-Pedestrian-Counting

Real-time Traffic and Pedestrian Counting (YOLOV3 in tensorflow2)

Primary LanguagePythonMIT LicenseMIT

Real-time-Traffic-and-Pedestrian-Counting

Introduction

This project aims to count vehicle and pedestrian detected in the input video using YOLOv5 object-detection algorithm with the KalmanBoxTracker for tracking objects

It needs to be stated that YOLOv5 object-detection is forked from the implementation of glenn-jocher, and "KalmanBoxTracker" tracking implementation forked from clemente0620

Using the PyTorch Object detection API(YOLOv5 is written in the Pytorch framework), we will be counting the number of vehicles and pedestrians in a video. A frame is extracted every second from the video and a forward pass of the model is performed. If a vehicle or pedestrian is found in the video, then the count is increased.

In order to achieve the best performance, you should have CUDA installed on Your device.


Project Demo

https://user-images.githubusercontent.com/47077167/115262112-e6f72b80-a13c-11eb-8e77-e8697e74df9b.mp4

175490636_1602961063227825_8176010990751348582_n


Run Demo

python detect.py --source video.mp4

Usage

python3 app.py

Web Hosting

Inorder to host the model we used FloyHub which offers 2 hours of free

usage form their standard instance with the following specs:

GPU: Tesla K80 · VRAM :12 GB Memory · RAM: 61 GB RAM · Storage: 100 GB SSD


Database

The count of vehicles and people periodically gets pushed to a cloud MongoDb cluster every minute, and there’s charts in the dashboard that summarize this data and are updated in real-time

Author

glenn-jocher yolov5
clemente0620 Real-time-Traffic-and-Pedestrian-Counting