Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚦 Real-Time Traffic Monitoring & Speed Estimation System


πŸ“Œ Project Description

The Real-Time Traffic Monitoring & Speed Estimation System is an AI-powered intelligent traffic analysis solution developed using Computer Vision and Deep Learning technologies.

This project detects and tracks moving vehicles from highway traffic videos, classifies vehicle types, estimates their speed in real time, and stores the traffic data automatically for future analysis.

The system is designed for:

  • πŸš— Smart Traffic Monitoring
  • πŸš“ Over-Speed Vehicle Detection
  • πŸ›£οΈ Intelligent Transportation Systems (ITS)
  • πŸŽ“ Academic & Final Year Projects
  • 🏭 Research and Industrial Demonstrations

The project uses the powerful YOLOv8 Object Detection Model combined with OpenCV for real-time processing and tracking.


✨ Features

🚘 Vehicle Detection & Classification

  • Detects multiple vehicles in real time

  • Identifies:

    • Car
    • Bus
    • Truck
    • Motorcycle (if added in model)

🧠 AI-Based Object Tracking

  • Assigns unique IDs to every detected vehicle
  • Prevents duplicate counting
  • Maintains smooth tracking between frames

⚑ Real-Time Speed Estimation

  • Calculates vehicle speed using:

    • Dual-Line Crossing Technique
    • Frame Time Difference
  • Displays speed instantly on screen


🚨 Overspeed Detection

  • Detects vehicles exceeding speed limit

  • Highlights overspeed vehicles using:

    • πŸ”΄ Red Bounding Boxes
    • Speed Warning Labels

πŸ“Š Traffic Data Logging

Automatically stores:

  • Vehicle ID
  • Vehicle Type
  • Speed
  • Date & Time

Saved into:

traffic_data_final.csv

πŸŽ₯ Video Processing

Supports:

  • Highway traffic videos
  • CCTV footage
  • Traffic surveillance recordings

πŸ› οΈ Technologies Used

Technology Purpose
Python Core Programming Language
YOLOv8 Vehicle Detection
OpenCV Video Processing
cvzone Visualization
Pandas Data Handling
CSV Traffic Data Logging
Git & GitHub Version Control

πŸ“‚ Project Structure

RealTime-Traffic-Monitoring-System/
β”‚
β”œβ”€β”€ main.py
β”œβ”€β”€ tracker.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
β”œβ”€β”€ Highway Traffic.mp4
β”œβ”€β”€ traffic_data_final.csv
β”œβ”€β”€ bus.jpg
β”‚
β”œβ”€β”€ runs/
β”‚
β”œβ”€β”€ Demo GIF/
β”‚   └── AI-based Traffic Management System.gif
β”‚
└── __pycache__/

πŸš€ Installation Guide

1️⃣ Clone Repository

git clone https://github.com/nasim-dev0459/RealTime-Traffic-Monitoring-System.git

2️⃣ Move Into Project Folder

cd RealTime-Traffic-Monitoring-System

3️⃣ Create Virtual Environment (Optional)

Windows

python -m venv venv
venv\Scripts\activate

Linux / Mac

python3 -m venv venv
source venv/bin/activate

4️⃣ Install Dependencies

pip install -r requirements.txt

▢️ Run The Project

python main.py

πŸ“Έ Project Demonstration

🎞️ Demo GIF


πŸ“ˆ System Workflow

Traffic Video Input
        ↓
Vehicle Detection using YOLOv8
        ↓
Object Tracking
        ↓
Line Crossing Detection
        ↓
Speed Calculation
        ↓
Overspeed Alert
        ↓
Traffic Data Logging

πŸ§ͺ Future Improvements

  • 🌐 Live CCTV Camera Integration
  • ☁️ Cloud Database Support
  • πŸ“± Web Dashboard
  • πŸ“Š Real-Time Analytics Panel
  • πŸ”” SMS/Email Alert System
  • 🚦 Smart Traffic Signal Automation

🎯 Learning Outcomes

Through this project, I learned:

  • Deep Learning based Object Detection
  • Real-Time Computer Vision
  • Vehicle Tracking Algorithms
  • Traffic Analysis Systems
  • Data Logging & Visualization
  • Python Project Deployment

πŸ’» Requirements

Python 3.11+
OpenCV
Ultralytics
cvzone
Pandas
NumPy

🀝 Contributing

Contributions are welcome.

If you would like to improve this project:

  1. Fork the repository
  2. Create a new branch
  3. Commit changes
  4. Submit a Pull Request

πŸ“œ License

This project is developed for:

  • Educational Purposes
  • Research
  • Portfolio Showcase

πŸ‘¨β€πŸ’» Developer

Md Nasim Hawlader

Computer Engineering Student Passionate about:

  • Artificial Intelligence
  • Computer Vision
  • Machine Learning
  • Software Development

⭐ Support

If you like this project, please give it a ⭐ on GitHub. It helps motivate future development and improvements. πŸš€

About

A high-precision real-time vehicle speed detection and monitoring system built with YOLOv8 and OpenCV. Features include dual-line accuracy, multi-class classification (Car, Bus, Truck), automated CSV data logging, and overspeed alerts

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages