Skip to main content

AI-Powered Traffic Signal Control

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

AI-Powered Traffic Signal Control

SugandhaSrivastava1 , Sudhanshu Shukla2 , Sakshi Chaturvedi3 , Shreya Dutta4, Dr. Rajesh

Kumar5

1,2,3,4 B.Tech. Students, Dept. of CSE, Nitra Technical Campus, Ghaziabad, U.P., India 5 Assistant Professor, Dept. of CSE, Nitra Technical Campus, Ghaziabad, U.P., India

Abstract - Traffic jams are a big problem in many cities because there are so many cars on the road and traditional traffic signal systems can't keep up. Most regular traffic lights don't care how many cars are on the road; they just work at certain times. People often have to wait longer than they need to, waste gas, and deal with traffic badly because of these issues. This research suggests an intelligent system for controlling traffic signals that employs computer vision and deep learning to tackle these issues.

The proposed system employs OpenCV and the YOLOv8 object detection model to identify, track, and tally vehicles in real time from video feeds. To better control traffic, the system changes the length of the green light based on how many cars it sees. A virtual traffic signal interface was also made to show the signal's status, the number of cars, the level of traffic, and the timer. The experiment's results show that the system can adjust to changes in traffic and make traffic flow better overall. The proposed method is cost-effective, scalable, and suitable for smart city applications.

Keywords: Smart Traffic Signal, Intelligent Transportation System, Vehicle Detection, YOLOv8, Computer Vision, Traffic Density Estimation, Adaptive SignalControl,OpenCV,Deep Learning, Smart Cities

1. Introduction

As cities around the world grow quickly and more people drive, traffic jams are becoming a common problem.Mostcurrenttrafficsignalsystemsworkona set schedule, no matter how busy the road is at the time.So,carsoftenhaveto waitatemptyintersections when other lanes are still too full. This makes travel takelonger,wastesgas,andhurtstheenvironment.

To solve these problems, smart traffic management systems that use computer vision and artificial intelligence are becoming morepopular.Theproject focuses on developing an intelligent traffic signal controlsystemthatadjustssignaltimingbasedonrealtime vehicle density. Instead of using fixed signal durations,thesystemanalysestrafficfromvideoinput and dynamically controls the green signal duration to

improve traffic flow. For example, recent implementations that process live videos from cameras tocountvehiclesandchangesignaltimingsontheflyto improveflowinheavytraffic (1.2.)Thesesystemskeep aneyeontrafficinrealtimeandmakedecisionsontheir own, which is better than traditional fixed or manual methods that don't work well when there is a lot of traffic.(2.)Inthisstudy,wesuggestasmarttrafficsignal system that uses the YOLO deep learning model to accuratelydetectandcountvehiclesinrealtime,evenin crowded situations, and changes the timing of the signals based on traffic density. There is also a virtual traffic signal interface in the system that lets you see thingsinrealtime.

The primary objective of this research is to enhance traffic efficiency through a cost-effective, scalable software-based solution that not only reduces human error in manual signal control but also produces historical data to assist authorities in analysing peak traffic patternsand long-term urban congestion trends. Thegoalofcombiningthesetechnologiesisalsotohelp the environment by cutting down on idle times at intersections, which lowers fuel use and carbon emissions directly 1, 3. This helps make cities more environmentally friendly by reducing the environmental impact of citywide transportation networks(4).

2. Problem Statement

Regular traffic lights follow set schedules that don't consider how traffic is moving at the time. As a result, roadswithfewercarsmaygetgreenlightsthatlasttoo long, while roads with a lot of cars may have to wait a long time. For big, busy cities, manual traffic control is also not practical. So, there is a big need for an intelligent and automated traffic signal system thatcan keep an eye on how many cars are on the road and changethetimingofthesignals.

Tomaketrafficflowbetterandcutdownontrafficjams. "Static switching" is a problem with the current traffic infrastructure. This means that signal intervals are set based on historical averages instead of real-time demand. Because it can't change, this leads to a lot of traffic jams during non-peak hours when there are

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

sudden traffic surges and people sitting around when traffic is light. Traffic personnel's manual intervention isnot scalable andislikely tomake mistakes.Because of this, we need an AI-driven, automated system that canmonitor,analyse,andimproveintersectionflowon its own to reduce traffic jams and environmental damage(4).

3. Literature Review

Many researchers have studied smart traffic management systems that use computer vision methods. Previous methods primarily utilized standard image processing algorithms, such as background subtraction and Haar cascade classifiers for vehicle detection. However, these methods often don't work well in complicated situations where the lighting changes, there are shadows, things are blocking the view, or the weather is bad. This is because traditional methods don't work well when there is a lot of traffic or when the flow is uneven across lanes(1, 2). Recent improvements have fixed these problemsbycombiningtheSORTalgorithmwith YOLOtokeeptrackofdetectedobjectsacrossmultiple video frames. This makes the count for signal switchingmoreaccurate(5).

Asdeeplearninghasprogressed,contemporaryobject detectionmodelslikeYOLO(1,5;2),SSD,andFasterRCNN have exhibited enhanced accuracy and real-time performance relative to traditional techniques, especiallyinhigh-trafficandchallengingconditions(1, 2). A few recent systems have used these models to find vehicles (4;3;5),butmostofthemcanonlycount vehiclesanddon'tfullyintegrateadaptivetrafficsignal control (1, 2). Some of them also need expensive hardware setups that go beyond what is already in place (4). Our method, on the other hand, uses YOLO V7 to give a more detailed look at how intersections work by putting vehicles into groups like cars, bikes, andbusesandfiguringout the best green signal times for each type of vehicle based on how they flow (3), (5).whilealsousingopticalcharacterrecognitiontoget environmental metadata from video feeds for automaticsignalcalibrationbasedontheweather(11).

Thesystemsuggestedinthisstudyuniquelycombines YOLOv7 for accurate deep learning-based vehicle detection and classification (e.g., cars, bikes, buses) eveninheavytraffic(3;5)andSORTforstrongunique vehicle tracking across frames(5), and an adaptive smartsignaltimingalgorithmthatdynamicallyadjusts green durations based on real-time density, vehicle types,andevenweathermetadataviaOCR(11;3) all within a simple, purely software-based framework that leverages existing CCTV infrastructure without

costly hardware(4), outperforming prior systems limited to basic counting or static setups(1, 2) and making it highly scalable and suitable for practical smart city deployments. Unlike R-CNN, which needs a lot of processing power, YOLOv3 and its successors strike a good balance between speed and accuracy, makingit possible toanalyze intersection occupancy in realtimewithanaverageprocessingtimeofabout100 msperframe(6,3).

4. Dataset

Roboflow Universe [2] has the UA-DETRAC-DATASET10K, which wasthe main dataset.This dataset is based on the well-known UA-DETRAC benchmark and was made just for finding vehicles in real traffic situations. The system uses the UA-DETRAC dataset, which contains real-world traffic images with labelled vehicles. It includes different traffic conditions such as low,medium,andheavytraffic,alongwithvariationsin lightingandenvironment.Thedatasethasabout10,000 pictures taken from real traffic surveillance videos. Thesepicturesshowdifferentkindsoftrafficsituations thathappeninreallife,suchaslow,medium,andheavy traffic. The data also included different perspectives, road types, and environmental settings, like how the lighting changed during the day and how the weather changed slightly. Because of this variety, the dataset givesarealisticpictureofcitytraffic,whichisimportant formakingatrafficmanagementsystemthatworksand isreliable.

Wecarefullyaddedboundingboxesaroundthevehicles toeachpicture inthe dataset. There are many types of vehicles in the dataset, like cars, buses, trucks, and vans. These notes make it easier to use modern object detection models like YOLO because the data is already in a format that can be used. This madeitmucheasiertolabelthingsbyhandandspedup thesystem'sdevelopment.

Thedatasetwasmostlyusedinthisprojecttohelpwith vehicle detection and analysis. A pretrained YOLOv8 model was used to find cars, but the dataset helped us understand how cars look in different traffic situations and made sure that the system worked well in real-life situations. The system can find and identify vehicles more accurately when there are accurate annotations. This directly makes counting vehicles and estimating trafficdensitymore accurate. This dataset is also very useful because it closely matches how traffic behaves in the real world. This makes it a great choice for testing and confirming the suggestedtrafficsignalcontrollerthatusesAI.Withthis kind of dataset, the system can better adjust to realworldsituationsandgivemoreaccurateresults.

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

Overall, the UA-DETRAC-DATASET-10K is a good base for this study because it is relevant to the real world, has good annotation quality, and works with deep learning models. This makes it the best choice for creatingandtestingsmarttrafficmanagementsystems.

5. Methodology

The proposed smart traffic signal system was built in four main parts, using a modular approach. The video input module reads the traffic video and does some basic preprocessing, like resizing and noise reduction, in the first stage. The YOLOv8 model was used to find carsin each frame during the second stage. A tracking system gave each car a unique ID so that the same car wouldn't be counted more than once. The StrongSORT algorithmimprovesthistrackingprocessevenmore by usingdeeplearningfeaturestokeeptrackofanobject's identity across multiple frames. This makes it easier to figure out how fast a vehicle is going and to find behavioural patterns that are important for predictive trafficmodelling(7),(5).Thesystemalsogivespriority to emergency vehicles by recognizing certain visual featuresofambulancesand firetruckstoinstantlystart pre-emptivegreenlightextensions(11),(8).

Technologiesusedare:-

• ProgrammingLanguage:Python

• Libraries:OpenCV,NumPy,Pandas

• DeepLearningModel:YOLOv8

• Tracking Algorithm: SORT (for avoiding

duplicatecounts)

• Interface:GUIusingOpenCV/Tkinter

• Dataset: UA-DETRAC (vehicle detection dataset)

Fig.2: Multi-image vehicle detection and traffic density analysis

Inthethirdstage,thesystemlookedatthetotalnumber ofvehiclesandputthetrafficdensityintothreegroups: low,medium,andheavy.

Signal time is calculated based on number of vehicles:

��=������n+����T=Tmin+k NWhere:

T=Greensignaltime

��min=MinimumbasetimeN=Numberofvehicles

k=constantfactor

The smart timing algorithm changed the length of the greensignalbasedonthisclassification.Inthelaststep,a virtualtrafficsignalgraphicaluserinterface(GUI)shows the current signal light, number of cars, level of traffic, and timer in real time. This modular design makes the systemeasy tokeepupwith,easytogrow,andgoodfor use in real time. Webster's formula can be used to find theexacttimingofthegreensignalbasedonthenumber of vehicles and the average class speed (9), (10). This willhelpimprovesignalswitchinglogic.

Fig.1: Sample data from UA-DETRAC dataset
Fig.2: Multi-image vehicle detectionand traffic density analysis

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

Fig. 4: End-to-end pipeline for traffic video processing, vehicle detection, counting, and adaptive signal control.

Intelligent traffic management system operates through a sequence of well-defined stages, transforming raw traffic video into actionable signal control decisions. Each stage plays a crucial role in ensuring accurate vehicle detection, efficient tracking, andadaptivetrafficsignaltiming.

5.1. VideoInputStage

The system begins by acquiring traffic video data, which can be sourced either from real-time surveillance cameras or pre-recorded video datasets. This flexibility allows the model to be tested in both

simulated and real-world traffic environments. The input video serves as the primary data source for furtheranalysis.

5.2. FrameProcessingStage

To enable efficient computation, the continuous video stream is divided into individual frames. These frames act as static images that can be processed sequentially. Frame extraction ensures that each moment in the traffic flow is analyzed in detail, forming the basis for accuratevehicledetection.

5.3.

VehicleDetectionStage

In this stage, the system utilizes the advanced deep learning model YOLOv8 (You Only Look Once version 8) to identify vehicles within each frame. The model is capable of detecting multiple vehicle categories, includingcars,motorcycles,buses,andtrucks,withhigh accuracy and real-time performance. Bounding boxes are drawn around detected vehicles to localize them withintheframe.

5.4.

TrackingStage

Toavoidduplicatecountingandensurecontinuity,each detected vehicle is assigned a unique identification number. Object tracking algorithms maintain the identity of vehicles across consecutive frames, even as they move through the scene. This step is critical for distinguishing between new and previously detected vehicles.

5.5.

VehicleCountingStage

Basedonthedetectionandtrackingoutputs,thesystem counts the number of vehicles passing through a predefined region of interest. Since each vehicle has a uniqueID,thesystemensuresthatnovehicleiscounted morethanonce,improvingoverallaccuracy.

5.6.

TrafficDensityClassification

The system categorizes traffic conditions into three levelsbasedonthetotalvehiclecount:

• LowTraffic: Minimalvehiclepresence, indicatingfree-flowconditions

• Medium Traffic: Moderate congestionwith manageableflow

• Heavy Traffic: High vehicle density, indicatingcongestionorpeakhours

This classification helps in simplifying decision-making forsignalcontrol.

Fig. 3: Proposed system architecture flowchart

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

5.7.

SignalTimingDecision

Using the classified traffic density, the system dynamically adjusts traffic signal timings. Heavier traffic conditions are allocated longer green signal durations, while lighter traffic receives shorter durations. This adaptive mechanism improves traffic flowefficiencyandreducesunnecessarywaitingtime.

5.8. OutputDisplay(GUI)

Finally,thesystempresentstheresultsthrougha userfriendlygraphicalinterface.TheGUIdisplays:

• Currenttrafficsignalstatus(Red/Green)

• Countdowntimerforsignalchanges

• Totalvehiclecount

• Trafficdensitylevel(Low/Medium/Heavy)

6. Results and Discussions

We used a recorded traffic video to test the proposed smart traffic signal system to see how well it could detectvehicles,countthemaccurately,andchange the timing of the signals. The YOLOv8 model was able to findcars,buses,trucks,motorcycles,andothertypesof vehicles in real time. The object tracking system gave each vehicle a unique ID, which stopped counting duplicates and made the overall accuracy better. The systemchangedthelengthofthegreensignalbasedon how busy the traffic was during testing. When there weren'tmanycarsontheroad,thegreentimewascut short. When there was a lot of traffic, the green time wasautomaticallylengthened.Thevirtualtrafficsignal interface showed the signal state, vehiclecount,traffic level,andtimercorrectly,withnonoticeabledelay.

The system was tested under different traffic conditions:

• Correctvehicledetectioninmostcases

• Accuratecountingusingtracking

• Adaptive signal timing based on trafficdensity

• Minor errors in low light or occlusion conditions

The experimental results show that the suggested system can adapt to changing traffic conditions and control signal timing better thantraffic lights thatare set to a certain time. But there were small changes in detectionincasesofheavyocclusionandpoorlighting. Ingeneral,thesystemshowsalotofpromiseforsmart city environments where traffic can be managed intelligentlyinrealtime.

Fig. 5: AI-powered 4-lane intersection controller showing realtime vehicle detection, lane-wise density classification, and adaptive traffic signal status.
Fig. 6: Real-time AI-based traffic signal controller displaying vehicle detection, classification, traffic density, and signal status.
Table 1. Sample Result Table

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

7. Conclusion

This study introduces an intelligent traffic signal control system that employs computer vision and deep learning to optimize traffic management. The proposed system gets around the problems with traditional fixed-time traffic signals by combining YOLO-based vehicle detection, tracking, and adaptive signal timing. The virtual signal interface shows the system'sbehaviourinrealtimeinaclearway. Theexperimentalresultsshowthatthesystemcancut downonunnecessarywaittimesandmaketrafficflow better. The suggested solution is affordable, can be used in smart cities, and can be expanded. In the future, the system could be made even better by adding real-world hardware deployments, multi-lane analysis,andgivingprioritytoemergencyvehicles.

8. References

1. Andhale Mayur (Nathu), "AI Powered Traffic Management and Signal Monitoring System," International Journal for Research in Applied Science and Engineering Technology (IJRASET), 2025

Link:https://doi.org/10.22214/ijraset.2025.71694

2. VirajTapkir,MiteshShetkar,ShubhamShinde, andS.R.GadakhU.S.Dalvi,"TrafficSignalControl andManagementSystem," IJRASET,2024

Link:https://doi.org/10.22214/ijraset.2024.58423

3. Aniket Phand, Shweta Bagade, Nikhil Bandgar, and Prof. Ganesh Wayal,"Real-Time TrafficLight OptimizationUsingAIandIOT," IJRASET,2024.

Link:https://doi.org/10.22214/ijraset.2024.60686

4. Ahmed Mahmoud Elbasha and Mohammad M. Abdellatif, "An IoT-Based Smart Traffic ManagementSystem," CSIT/arXiv,2025.

Link:https://doi.org/10.5121/csit.2024.150204

5. B. Sowmya, "Adaptive Traffic Management System usingCNN(YOLO)," IJRASET,2021.

Link:https://doi.org/10.22214/ijraset.2021.3576 8

6. Vladimir Shepelev, Sergei Aliukov, Alexandr Glushkov,andSGShabiev,"Identification of distinguishingcharacteristicsofintersections based on statistical analysis and data from video cameras," Journal ofBigData,2020.

Link:https://doi.org/10.1186/s40537-020-00324-7

7. Tao Li, Zilin Bian, Haozhe Lei, Fan Zuo, Ya-Ting Carolyn Yang, Quanyan Zhu, Zhenning Li, and Kaan Özbay, "Multi-level traffic-responsive tilt camera surveillance through predictive correlated online learning," Transportation Research Part C: Emerging Technologies,2024.

Link:http://arxiv.org/pdf/2408.02208

8. Arnav Sohani, Ishan Gaikwad, Omkar Lonkar, S. Roy, and Vaibhav Sawalkar, "Smart Traffic Light Control System," International Journal of Scientific Research in Engineering and Management (IJSREM), 2024.

Link:https://doi.org/10.55041/ijsrem39220

9. Khalid Moin, Antuley Aman Siraj, Khalife Abdul Sami, Khan Mohd Irfan, and Tabassum Maktum, "Smart Traffic Signal with Emergency Response Optimization," Atlantis Press,2025.

Link:https://doi.org/10.2991/978-94-6463-8523_27

10. Prof. Dr. Soumya Patil, "To Develop an Efficient Critical Vehicle Seamless Movement Technique using AIandMLMethods," IJRASET,2022.

Link:https://doi.org/10.22214/ijraset.2022.45520

11. M. Asha, "AI-Driven Emergency Vehicle Detection for SignalOptimizationUsingYOLOv8," IJRASET,2025.

Link:https://doi.org/10.22214/ijraset.2025.69631

12. Z. Wei, X. Zheng, H. Yao, Z. Li, "IntelliLight: A Reinforcement Learning Approach for Intelligent TrafficLightControl,"ACMSIGKDDConference,2018. Link:https://doi.org/10.1145/3219819.322009

13. Hang Xiao, Huale Li, et al., "Intelligent Traffic Signal Control Based on Reinforcement Learning:ASurvey," Artificial Intelligence Review, 2026. Link: https://doi.org/10.1007/s10462-026-11530-9

14. Panagiotis Michailidis et al., "TrafficSignalControlvia Reinforcement Learning: A Review on Applications and Innovations," Infrastructures (MDPI), 2025. Link: https://doi.org/10.3390/infrastructures10050114

15. Jiajing Shen, "Hierarchical Reinforcement LearningBased Traffic Signal Control," Scientific Reports, 2025. Link:https://doi.org/10.1038/s41598-025-18449-1

16. Changjian Cai, Min Wei, "AdaptiveUrban Traffic Signal Control Based on Enhanced Deep Reinforcement Learning," Scientific Reports, 2024. Link: https://doi.org/10.1038/s41598-024-64885-w

International Research Journal of Engineering and Technology (IRJET) e-ISSN:2395-0056

Volume:13Issue:04|Apr2026 www.irjet.net p-ISSN:2395-0072

17. Guanghua Zhang, Youchen Yue, "Intelligent Traffic SignalControlBasedon Reinforcement Learning with EdgeComputing,"JournalofComputerScienceandAI, 2026.

Link:https://doi.org/10.54097/713j5n26

18. “Deep Reinforcement Learning for Traffic Signal Control," TransportationResearchProcedia,2023. Link:https://doi.org/10.1016/j.trpro.2023.11.230

19. Adaptive Traffic Signal Control Using Deep Reinforcement Learning with Experience Replay," arXiv/IEEE-basedwork,2017.

Link:https://arxiv.org/abs/1705.02755

20. Xingshuai Huang, Di Wu, "ModelLight: Model-Based Meta-Reinforcement Learning for Traffic Signal Control,"arXiv,2021.

Link:https://arxiv.org/abs/2111.08067

21. François-Xavier Devailly, Denis Larocque, Laurent Charlin, "Inductive Graph Reinforcement Learning for Massive-ScaleTrafficSignalControl,"arXiv,2020.

Link:https://arxiv.org/abs/2003.05738

22. Seyed Sajad Mousavi, Michael Schukat, Enda Howley, "Traffic Light Control Using Deep PolicyGradient and Value-Function Based Reinforcement Learning," arXiv, 2017. Link: https://arxiv.org/abs/1704.08883

23. Afshin Oroojlooy, Mohammadreza Nazari, "AttendLight: Universal Attention-Based Reinforcement Learning Model for Traffic Signal Control," arXiv, 2020. Link: https://arxiv.org/abs/2010.05772

24. "Adaptive Traffic Signal Control Method Based on Offline Reinforcement Learning," Applied Sciences(MDPI),2024.

Link:https://doi.org/10.3390/app142210165

25. "Deep Reinforcement Learning Based Traffic Signal Control: A Comparative Analysis," ProcediaComputerScience,2023. Link:https://doi.org/10.1016/j.procs.2023.03.036

26. Jiajing Shen, "Hierarchical Reinforcement Learning Based Traffic Signal Control," Scientific Reports, 2025.

Link:https://doi.org/10.1038/s41598-025-18449-1

27. Changjian Cai, Min Wei, "Adaptive Urban Traffic Signal Control Based on Enhanced Deep ReinforcementLearning,"ScientificReports,2024. Link:https://doi.org/10.1038/s41598-024-64885-w

28. Mi Li et al., "Federated Deep Reinforcement Learning-Based Urban Traffic Signal Optimal Control," Scientific Reports, 2025. Link:

https://doi.org/10.1038/s41598-025-91966-1

29. Changjian Cai, Min Wei, "Adaptive Urban Traffic Signal Control Based on Enhanced Deep Reinforcement Learning," ScientificReports,2024. Link: https://doi.org/10.1038/s41598-024-64885w

Turn static files into dynamic content formats.

Create a flipbook