Inspiration
Urban traffic congestion is a daily struggle in major Indian cities like Bengaluru, where commuters often spend hours stuck in traffic due to inefficient fixed-time traffic signals. A real-world incident involving entrepreneur Prashant Pitti, who was stuck for nearly two hours on an 11 km stretch, highlighted the urgent need for smarter, data-driven traffic solutions. This inspired us to design an AI-powered system that adapts to real-time traffic conditions instead of relying on static signal timings.
What We Built
We built an AI-Powered Traffic Management System for a city-like layout with 6 junctions and 7 connecting roads. The system detects vehicles using deep learning, assigns them to specific roads, calculates real-time traffic intensity, and displays traffic levels for different routes on a live web interface updated every second.
How We Built It
We trained a YOLO v11 object detection model on custom road prototype images using Google Colab and saved the best model as best.pt. The system uses a camera server to stream merged 640*640 frames via WebSockets, a polygon-based road mapping module to identify road regions, a detection module to count vehicles and compute traffic intensity, and a React + Vite frontend to visualize real-time traffic and route comparisons.
Challenges
Key challenges included training YOLO on a custom setup, accurately mapping vehicles to roads using polygons, managing real-time WebSocket communication, handling camera position changes, and synchronizing AI outputs with frontend visuals.
What We Learned
We gained hands-on experience in YOLO-based deep learning, real-time computer vision, WebSocket communication, polygon-based spatial analysis, and full-stack integration for real-time traffic systems.
Log in or sign up for Devpost to join the conversation.