1 / 17
BCA FINAL YEAR PROJECT

AI-Based Traffic
Management System

Real-Time Vehicle Detection & Adaptive Signal Control

YOLOv8 Flask React PostgreSQL

Presented by
Heer Pithadia & Palak Sheth
02

The Problem with Urban Traffic

Urban traffic congestion causes increased travel time, fuel waste, and pollution. Current systems use fixed-time signals that cannot adapt to real conditions — wasting green light on empty roads while congested lanes wait.

📡
No Real-Time Monitoring
Manual or sensor-limited systems fail to capture live conditions
No Adaptive Response
Fixed timers can't react to sudden congestion or peak hours
🚨
Poor Emergency Handling
No intelligent priority for ambulances or fire brigades
📊
No Historical Data
Lack of analytics prevents future planning and optimization
₹1.5L CrAnnual congestion cost to India
4.4 Bn hrsLost to traffic delays yearly
28%Extra fuel burned in congestion
03

Why This Matters

India is one of the most congested countries in the world. Fixed-time signals waste green light on empty roads while congested lanes wait. Smart cities need AI-powered, data-driven infrastructure to function efficiently.

The gap between traditional traffic management and modern urban demands is widening every year — creating an urgent need for intelligent, adaptive systems.

🏙️
India's smart city mission covers 100 cities — all requiring intelligent traffic infrastructure
#1
Mumbai ranked most congested city globally (TomTom 2023)
41%
of Indian commuters spend 1+ hour daily in traffic
faster emergency response with adaptive signal systems
04

Our AI-Powered Solution

01
🎯

YOLOv8 Real-Time Detection

Vehicle detection and classification using YOLOv8 Nano — cars, trucks, buses, bikes identified with confidence >25% at real-time FPS

02
🔍

Multi-Vehicle Tracking

Centroid-based tracker assigns persistent IDs, estimates speed via pixel displacement, and counts vehicles on exit

03
🚦

Adaptive Signal Control

Dynamic green-time allocation based on live lane congestion load — 15s to 60s range with empty-phase skipping

04
📊

Web Dashboard & Analytics

React + TypeScript dashboard with live video feed, signal visualization, alert center, and historical analytics

05

System Architecture — 4-Layer Design

INPUT LAYER
📷 Webcam / IP Camera 🎬 Video Files OpenCV Capture
PROCESSING LAYER
🤖 YOLOv8 Detection 🔄 Centroid Tracker 🚦 Signal Controller 🔔 Alert Engine
STORAGE LAYER
🗄️ PostgreSQL DB ⏱️ Snapshot every 60s 📈 Historical Analytics
PRESENTATION LAYER
⚛️ React + TypeScript 📊 Recharts Dashboard 🗺️ React Leaflet Map
🌤️ OpenWeatherMap API
📧 SMTP Email Alerts
06

Technology Stack

⚙️ BACKEND
Python Flask YOLOv8 Nano OpenCV PostgreSQL psycopg2 python-dotenv NumPy / SciPy PyTorch 2.0+
🖥️ FRONTEND
React 18 + TypeScript Tailwind CSS shadcn/ui Recharts React Leaflet Three.js Framer Motion Vite 5
07

How Detection Works

1
📷
Frame Capture
OpenCV captures frame from webcam, video file, or IP camera stream
2
🤖
YOLOv8 Detection
Detects vehicles with conf >0.25, IoU >0.45 — outputs [x1,y1,x2,y2, conf, class]
3
🔄
Centroid Tracker
Assigns persistent IDs, estimates speed via centroid displacement between frames
4
🗺️
ROI Lane Assignment
Ray-casting assigns each vehicle centroid to N/S/E/W lane polygon
5
📊
Load Score
load = (count×0.5) + (density×30) + ((1−speed_norm)×20)
LANE LOAD FORMULA load = (vehicle_count × 0.5) + (density × 30) + ((1 − speed_norm) × 20)
08

Adaptive Signal Logic

PHASE CYCLE
NS GREEN
NS YELLOW
EW GREEN
EW YELLOW
LOAD (%) GREEN TIME STATUS
< 20%15 secondsLOW
20 – 40%30 secondsMODERATE
40 – 70%45 secondsHIGH
≥ 70%60 secondsCRITICAL
✅ Empty phase skipping
✅ Pause / Resume support
✅ Emergency override flag
✅ Yellow always fixed at 5s
09

Live Vehicle Detection Dashboard

AI Traffic Monitor — Detection View ● LIVE
🚗 Car #12 — 42 km/h
🚌 Bus #7 — 18 km/h
🚛 Truck #3 — 25 km/h
ROI: NORTH LANE
Cars24
Trucks6
Buses3
Bikes11
Avg Speed34 km/h
Confidence87%
DensityHIGH
📹 Live feed with bounding boxes & track IDs ✏️ ROI lane editor (click to draw) ⚡ Per-frame vehicle type counts 🏎️ Speed statistics panel
10

Signal Control & Alert Center

4-WAY INTERSECTION
NORTH
WEST
42s
EW GREEN
EAST
SOUTH
ALERT CENTER
HIGH Severe congestion — North Lane 2m ago
MED Signal optimization triggered 5m ago
LOW Traffic flow normalized 12m ago
Peak hour alert resolved 18m ago
11

Traffic Analytics & Historical Data

Hourly Vehicle Count
6am
8am
9am
11am
1pm
5pm
6pm
8pm
10pm
📈
Hourly Vehicle Count
Line chart tracking vehicles per hour
📅
Weekly Traffic Trends
Bar chart — 7-day volume comparison
🔄
Day-to-Day Comparison
Historical comparison analytics
🛣️
Road Type Analysis
Progress bars per road category
Peak Hour Detection
Snapshots stored every 60s in PostgreSQL
12

Testing & Validation — 35 Test Cases

Detection & Tracking
10/10
✓ ALL PASS
Signal Control
8/8
✓ ALL PASS
Alert & Email
7/7
✓ ALL PASS
Database Integrity
6/6
✓ ALL PASS
REST API
10/10
✓ ALL PASS
100%
Overall Pass Rate — 35/35 Test Cases
⚡ Speed estimation within 10% error 🌙 Night-time detection weaker without fine-tuning 📊 Some analytics data simulated for demo
13

Current Limitations

Honest scope — this is a software prototype designed for academic demonstration. The following limitations exist in the current version:

⚠️
Single Intersection Only
Processes one camera feed at a time — no multi-intersection support
⚠️
No Physical Hardware Integration
Signal control is simulated — not connected to real traffic lights
⚠️
Emergency Vehicle Detection Inactive
Architecture supports it but feature not yet implemented
⚠️
Basic Tracker Under Occlusion
Centroid tracker struggles with heavy overlap — DeepSORT needed
⚠️
No User Authentication
No role-based access control or login system implemented
⚠️
Simplified Speed Estimation
Uses pixel-to-meter conversion — not calibrated for real-world accuracy
14

This Already Exists — Meet Onnyx

ONNYX ELECTRONISYS PVT. LTD.
ISO 9001-2008 Certified · 17+ Years Experience

An Indian company operating traffic signals across Delhi, Mumbai, Chennai, Kolkata, Bhopal, and Jammu & Kashmir — solving the exact same problems at production scale.

🚦 Adaptive Traffic Control System (ATCS)
🤖 AI Count & Classification Systems
🚗 Vehicle Actuated Signals
🚨 Emergency Vehicle Preemption
🔴 Red Light Violation Detection
🔢 Automatic Number Plate Recognition
⚡ Automatic Incident Detection
OUR PROJECT VS ONNYX
Software Prototype Production Hardware
Single Intersection City-Wide Network
YOLOv8 Detection AI Classification
Adaptive Signals ATCS System
Same core problems · Different scale
15

Our Project vs Onnyx — Feature Comparison

OUR SYSTEM ONNYX ELECTRONISYS
YOLOv8 Vehicle Detection AI Count & Classification Systems
Adaptive Signal Timing Adaptive Traffic Control System (ATCS)
Alert & Notification Engine Automatic Incident Detection System
Speed Estimation Speed Violation Detection System
ROI-Based Lane Management Road Traffic Management System
Web Dashboard & Analytics Intelligent Traffic Management System (ITMS)
Our project is a software prototype of exactly what Onnyx builds as production hardware — validating real industry demand for this technology.
16

What Comes Next

PHASE 1 — AI UPGRADE
🧠 Custom AI model for Indian traffic conditions
🔄 DeepSORT advanced multi-object tracking
🚨 Emergency vehicle detection activation
PHASE 2 — SCALE UP
🏙️ Multi-intersection & multi-camera support
🤖 Reinforcement learning signal optimization
🔌 Physical hardware integration (like Onnyx)
PHASE 3 — PRODUCTION
🐳 Docker + cloud deployment
📱 Mobile app for remote monitoring
🔐 User authentication & role-based access
🌿 Environmental emission analysis

Thank You

AI-Based Traffic Management System

BCA Final Year Project

Presented by
Heer Pithadia & Palak Sheth

"Building smarter roads, one frame at a time."

← → Arrow Keys or Click to Navigate