The problem
Fixed-timer traffic signals are dumb: an empty lane gets 60 seconds of green while a jammed lane waits. This project makes signals intelligent — a YOLO model counts vehicles per lane from camera feeds, a control algorithm retimes the green phases by live density, and emergency vehicles get priority override. It's smart-city framing that examiners love, it cross-sells to both CSE (computer vision) and ECE (IoT signals) audiences, and the only seller page in the market is an ancient density-controller listing. The demo — a 4-way junction simulation responding live to traffic — is pure viva theater.
How it works
- YOLOv8 processes each lane's camera feed (or recorded traffic video) and counts vehicles by class in real time.
- The density engine converts per-lane counts into a demand score every cycle.
- The signal controller allocates green time proportionally to demand, with minimum/maximum phase guards for fairness.
- An emergency-vehicle trigger forces an immediate green corridor along its route.
- The dashboard visualizes the junction, live counts, signal states, and the throughput improvement over fixed timing.
Project features
- YOLOv8 vehicle detection and per-lane counting from camera or video feeds
- Dynamic signal-timing algorithm: green duration proportional to lane density
- 4-way junction simulation with live signal states and vehicle queues
- Emergency-vehicle priority override (simulated ambulance detection path)
- IoT dashboard with per-lane counts, signal timers, and throughput graphs
- Vehicle classification: cars, bikes, buses, trucks counted separately
- Congestion alerts when a lane crosses the saturation threshold
- Before/after comparison mode: fixed-timer vs AI-timed throughput statistics
What is included
- Complete source code (detection, controller, dashboard)
- Pre-trained YOLOv8 weights tuned for Indian traffic scenes
- Project report PDF (synopsis, literature on intelligent transport systems, methodology, results, conclusion)
- Presentation PPT for review/demo day
- Viva Q&A sheet covering YOLO, object tracking, control algorithms, and smart-city framing
- Setup guide (dependencies, defining lane ROIs, running the simulation)
Limitations & prerequisites
- Demo runs on recorded traffic video or webcam simulation; mounting real intersection cameras needs municipal permission and is out of scope
- Detection accuracy drops in heavy rain, night footage, or severe occlusion — documented with mitigation notes
- Emergency-vehicle detection is simulated via a trigger input; real siren/vision-based EV detection is discussed as future work
- Signal-timing gains depend on traffic patterns; the report shows honest before/after numbers
Components & software requirements
- Python 3.10+
- YOLOv8 / Ultralytics (vehicle detection)
- OpenCV (video pipeline, lane ROI definition)
- NumPy (density computation)
- Flask/FastAPI + WebSocket (dashboard backend)
- HTML/CSS/JS dashboard (junction visualization)
- Sample traffic videos + simulation mode for hardware-free demo