Skip to content

kgex/trafficflowyolov8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrafficFlow

  • TrafficFlow is an open-source project developed by KGXperience designed for the automated vehicle surveillance of a given region.

  • The project consists of an object detection pipeline that tracks the entry and exit of vehicles by keeping track of their numberplate.

  • The object detection pipeline is built using YOLOv8 and the dashboard is built using Thingsboard server.

    Left Image Right Image

Table of Contents

Getting Started

Follow these simple steps to get started with TrafficFlow:

  1. Clone the Repository:
    git clone https://github.com/kgex/trafficflowyolov8
    
  2. Install Requirements:
    pip install -r requirements.txt
    
  3. Download Sample Video
    gdown https://drive.google.com/uc?id=1_Lsve_tfnv5weRMnYE93K1aANWyoRk8E
    
  4. Run the Code:
    python scripts/main.py --input # 0 for webcam or path/to/video.mp4
    

Documentation

Architecture

Models

YOLOv8, a state-of-the-art object detection model, is specifically trained for vehicle detection and numberplate detection respectively. Both models will run sequentially in the pipeline and the resultant image will be passed to PaddlePaddleOCR model for numberplate extraction.

  1. Vehicle Detection Model:
    • The first YOLOv8 model is dedicated to detect the incoming vehicles within a given region.
    • The trained model will predict these particular classes:
      • Bike
      • Car
      • Bus
  2. Number Plate Detection Model:
    • The second YOLOv8 model takes the cropped output of the detected vehicles and focuses on detecting the number plates from each vehicle.

The models were trained using indigenous dataset gathered by the incoming traffic of the KGiSL Campus.

Metrics

Models Train Loss Validation loss MaP Precision Recall
Vehicle Detection Model 0.84073 1.0158 0.92726 0.88056 0.88054
Numbeplate Detection Model 0.99308 1.1624 0.95279 0.95196 0.94387

Vehicle Detection Model

Vehicle_model_metrics

Vehicle Detection Model

Numberplate_model_metrics

Notebooks

Description Link
Vehicle Detection Open In Colab
Number Plate Detection Open In Colab

Developed by

KGX_Logo

KGX GitHub space KGX LinkedIn space KGX Instagram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published