Inspiration
Traffic congestion is one of the most common problems in Indian cities. During our daily commute, we observed that many traffic signals operate on fixed timers even when one lane is heavily congested and another lane is almost empty. This leads to unnecessary waiting time, fuel wastage, and increased pollution. We wanted to build a smart and affordable traffic management system that could use existing CCTV infrastructure and artificial intelligence to make traffic signals adaptive and more efficient.
What it does
Our AI-Powered Adaptive Traffic Signal Management System monitors traffic through CCTV video feeds and uses YOLOv8-based vehicle detection to identify and count vehicles in each lane. The system analyzes traffic density in real time and dynamically allocates green signal duration to the most congested lane.
How we built it
We built the project using Python, YOLOv8, OpenCV, Streamlit, Pandas, NumPy, and Plotly. CCTV footage is processed frame by frame, and YOLOv8 detects vehicles such as cars, bikes, buses, and trucks. The detected vehicles are counted for each lane, and the traffic density is analyzed in real time. An AI timing engine then generates adaptive green-signal durations, and all the information is visualized on a live dashboard with graphs and analytics.
Challenges we ran into
One of the biggest challenges was achieving reliable vehicle detection under different lighting conditions and camera angles. We also faced difficulties in synchronizing lane-wise vehicle counts with the signal timing logic and ensuring that the dashboard remained responsive while processing video streams. Handling crowded traffic scenes and avoiding duplicate vehicle counts required several rounds of testing and tuning.
Accomplishments that we're proud of
We are proud that we successfully developed a working prototype that uses real CCTV footage and performs real-time vehicle counting and adaptive signal timing. The dashboard provides live analytics and clearly demonstrates the difference between fixed-time and AI-based traffic control. We were also able to design the system in a scalable way so that it can be extended to multiple intersections in the future.
What we learned
This project helped us learn how computer vision can be applied to solve real-world traffic problems. We gained hands-on experience with YOLOv8, OpenCV, and Streamlit, and we understood the importance of data preprocessing and real-time decision making. We also improved our debugging, teamwork, and project presentation skills while building and testing the prototype.
What's next for AI-Powered Adaptive Traffic Signal Management System
In the future, we plan to add emergency vehicle priority detection so that ambulances and fire trucks can receive immediate green signals. We also want to implement multi-junction signal synchronization, predictive traffic congestion analysis, and cloud-based centralized monitoring for traffic authorities. Our long-term goal is to develop this prototype into a complete smart-city traffic management platform that can reduce congestion, save fuel, and improve urban mobility.