Development of an Artificial Intelligence Program with CCTV to Detect Red-Light Violations Based on Traffic Light Colors
Keywords:
Red-light Violations, Road Accidents, Automatic Detection, AIAbstract
Background and Objectives: Traffic accidents are one of the leading causes of injury and fatality worldwide, and intersections represent particularly high-risk locations. Among various risky driving behaviors, red-light violations significantly contribute to intersection-related crashes, leading to severe injuries and fatalities. Traditional enforcement mechanisms, such as manual monitoring by traffic police or the use of fixed cameras, are often limited in coverage, accuracy, and efficiency. In recent years, the integration of Artificial Intelligence (AI) with closed-circuit television (CCTV) systems has emerged as a promising solution to enhance law enforcement. AI technology, particularly object detection and image recognition, enables real-time monitoring and automatic detection of traffic signal violations. This innovation is not only a tool for surveillance but also an instrument for behavioral change, as the perceived risk of being caught can deter risky driving practices. The present research was designed to address two primary objectives: (1) to develop and evaluate AI technology for detecting traffic light colors in order to identify red-light violation behaviors, and (2) to study the specific phenomenon of “rolling stop” violations, where drivers reduce speed but fail to completely stop at a red light. The study focuses on six major intersections in Khon Kaen, Thailand, where traffic density and violation rates remain high.
Methodology: The study utilized CCTV footage from six significant intersections in Khon Kaen: Si Than, Bangkok Hospital, Ban Kok, Modin Daeng, Pratu Mueang, and Charoen Sri. A dataset of 557 images was compiled to train and evaluate the AI system. The researchers applied YOLO version 4 (You Only Look Once), a state-of-the-art object detection algorithm capable of identifying objects and classifying them in real time with high accuracy. The model was specifically trained to detect traffic light colors (red, yellow, and green) and correlate them with vehicle behavior at intersections. The performance of the AI system was assessed using a Confusion Matrix, which measures the accuracy of classification by calculating true positives, false positives, true negatives, and false negatives. To analyze red-light violations, a total of 2,041 incidents were documented and coded for statistical analysis. Descriptive statistics provided an overview of violation patterns, while Chi-Square Tests were conducted to examine the relationships between red-light violations and key factors such as vehicle type and time of day. This combination of AI-driven detection and statistical testing ensured both technological reliability and behavioral insights.
Main Result: The results of the study demonstrate the effectiveness of combining AI with CCTV for traffic enforcement. The AI model successfully detected the traffic light color in 94% of the sample images, indicating a high level of accuracy and reliability for law enforcement applications. This accuracy suggests that AI technology can complement or even replace traditional manual monitoring methods, which are often prone to human error and resource limitations. In terms of behavioral patterns, the analysis revealed that vehicle type and time of day were significantly associated with red-light violations (p-value < 0.05). Larger vehicles, such as trucks and buses, showed distinct patterns of non-compliance compared to smaller vehicles. Furthermore, violations were more frequent during peak traffic hours, particularly in the evening, highlighting the role of traffic congestion and driver impatience in risky decision-making. The study also identifies the prevalence of “rolling stop” behavior, where drivers slowed down but failed to come to a complete stop during a red signal. This behavior represents a critical safety concern, as it increases the likelihood of side-impact collisions, especially with pedestrians and motorcyclists who often cross intersections during the red-light phase
Conclusions: The research confirms that AI-powered CCTV systems can substantially enhance the monitoring and enforcement of traffic rules in urban environments. The high detection accuracy of 94% demonstrates the robustness of YOLO v4 as a real-time detection tool for traffic light violations. Moreover, the statistical association between vehicle type, time of day, and violation behavior provides valuable insights for policymakers and urban traffic managers. Importantly, the analysis of rolling stop violations among road users in urban Khon Kaen reveals that vehicle type was statistically significant in its association with rolling stop violations. Stopping at crosswalks was found to have a greater correlation with rolling stop violations for motorcycles than for other vehicles. Public awareness campaigns, strict penalties for repeated offenders, and intersection redesign to improve visibility and compliance should complement AI-based enforcement systems
Practical Application: The practical implications of this study are significant for both local and national road safety strategies. In Khon Kaen, the results can inform municipal authorities and law enforcement agencies in designing targeted interventions. For example, stricter monitoring of larger vehicles and increased enforcement during evening rush hours could reduce the frequency of violations. At the policy level, the study supports the integration of AI technology into Thailand’s broader traffic management framework. Government agencies can use such systems to generate evidence-based reports, guiding legislative updates and infrastructure investments. The ability to reliably detect “rolling stop” behavior also opens new avenues for refining traffic laws, which traditionally only account for complete red-light running.
References
World Health Organization (WHO). 2023. Global Status Report on Road Safety 2023 [Online]. Available: https://www.who.int/teams/social-determinants-of-health/safety-and-mobility/global-status-report-on-road-safety-2023 [15 September 2025]
Klungboonkrong, P. and Woolley, J.E. 2003. Modelling the environmental adaptation of a collector road in a area of high pedestrian activity in the city of Khon Kaen. Transport Engineering in Australia, 9, 25-34.
Kumphong, J., Satiennam, T., Satiennam, W. and Tirapat, S. 2019. Change of motorcycle speedunder speed enforcement camera on urban arterial in Khon Kaen city, Thailand. GEOMATE Journal, 16, 159-164.
Prabnasak, J. and Yue, W.L. 2006. Using aaSIDRA and PARAMICS in evaluation of a traffic signal coordination development in Khon Kaen City, Thailand. ATRF06: 29th Australasian Transport Research Forum. [Online]. Available: http://www.scopus.com/inward/record.url?eid=2-s2.0-84866294465&partnerID= MN8TOARS [15 September 2025]
Safer Roads Foundation. 2024. Khon Kaen location two | Red-Light-Running-&-Non-Helmet-Wearing-Recognition-Cameras https://www.saferroadsfoundation.org/casestudy/detail/thailand.html [15 September 2025]
Safer Roads Foundation. 2024. Khon Kaen location one | Speed-enforcement-camera-system [Online]. Available: https://www.saferroadsfoundation.org/ casestudy/detail/khon-kaen.html [15 September 2025]
Satiennam, T., Kumphong, J., Satiennam, W., Klungboonkrong, P., Jaensirisak, S. and Ratanavaraha, V. 2020. Change in helmet use behavior enforced by CCTV cameras with automatic helmet use detection system on an urban arterial road. Traffic Injury Prevention, 21, 494-499.
Jantosut, P., Satiennam, W., Satiennam, T. and Jaensirisak, S. 2021. Factors associated with the red-light running behavior characteristics of motorcyclists. IATSS research, 45, 251-257.
Satiennam, T., Satiennam, W., Klungboonkrong, P., Kumphong, J., Rasri, N., Jantosut, P., Ung-arunyawee, R., Leelapatra, W., Sittivichai, S., Polkert, N. and Daengpruan, N. 2023. Effectiveness of automated red-light running control using closed-circuit television cameras in Thailand. Asia-Pacific Journal of Science and Technology, 28, 1-9.
Kumphong, J., Jantosut, P., Kaewkluengklom, R., Tankasem, P., Kaewhanam, N. and Promraksa, T. 2024. Red light running behavior of motorcyclists on urban roads: Psychological factors and risk perception. Engineering Access, 10, 114-123.
Daowadueng, P. and Kumphong, J. 2022. Capital investment analysis for the product of a startup company case study: Detection program for traffic light violations. Journal of Management Science Chiangrai Rajabhat University, 17, 163–186.
Tankasem, P., Chaipanha, W., Kaewwichian, P., Kumphong, J., Promraksa, T. and Sateinnam, T. 2021. Effects of drivers’ speed during the yellow-light signal and satisfaction of drivers at the intersections with the red-light cameras. Engineering and Applied Science Research, 49, 353–362.
Kumphong, J., Satiennam, T., Satiennam, W. and Tirapat, S. 2019. Change of motorcycle speedunder speed enforcement camera on urban arterial in Khon Kaen City, Thailand. GEOMATE Journal, 16, 159-1649.
Kumphong, J., Satiennam, T. and Satiennam, W. 2016. A correlation of traffic accident fatalities, speed enforcement and the gross national income of Thailand and its cross-border countries. International Journal of Technology, 7, 1141-1146.
Kumphong, J., Satiennam, T. and Satiennam, W. 2018. PW 2344 Preliminary evaluation of helmet law enforcement by cctv camera: case of phatumuang intersection, Khon Kaen City, Thailand, Injury Prevention, 24, A85.
Wonghabut, P., Ung-arunyawee, R., Satiennam, T., Leelapatra, W., Jantosut, P. and Kumphong, J. 2019. Development of program for red light running violation and helmet wearing using Cctv camera. KKU Research Journal (Graduate Studies), 19, 41-52.
Tankasem, P., Satiennam, T., Satiennam, W. and Klungboonkrong, P. 2019. Automated speed control on urban arterial road: An experience from Khon Kaen City, Thailand. Transportation Research Interdisciplinary Perspectives, 1, 100032.
Tankasem, P., Satiennam, T., Satiennam, W., Jaensirisak, S. and Rujopakarn, W. 2022. Effects of automated speed control on speeding intention and behavior on mixed-traffic urban arterial roads. IATSS Research, 46, 492-498.
Wonghabut, P., Kumphong, J., Ung-arunyawee, R., Leelapatra, W. and Satiennam, T. 2018. Traffic light color identification for automatic traffic light violation detection system. 2018 International Conference on Engineering, Applied Sciences, and Technology (ICEAST), Phuket, Thailand, 1-4.
Satiennam, W., Satiennam, T., Triyabutra, T. and Rujopakarn, W. 2018. Red light running by young motorcyclists: Factors and beliefs influencing intentions and behavior. Transportation Research Part F: Traffic Psychology and Behaviour, 55, 234-245.
Jantosut, P., Satiennam, W., Satiennam, T. and Jaensirisak, S. 2021. Behavioral characteristics and factors associated to red light running of passenger car drivers in Khon Kaen City. KKU Research Journal (Graduate Studies), 21, 26-37.
Tippayanate, N., Impool, T., Sujayanont, P., Muttitanon, W., Chemin, Y.H. and Som-Ard, J. 2024. Temporal analysis of road traffic accidents at major intersections in Khon Kaen Province, Thailand: A time series investigation from 2012 to 2021. International Journal of Geoinformatics, 20, 43-58.
Dhinnabutra, B., Kumphong, J., Dhinnabutra, P. and Phurimsak, C. 2025. Hi-Tech plant leaf classification using artificial intelligence (AI). Science Essence Journal, 41, 12–23.
Aldakheel, E.A., Zakariah, M. and Alabdalall, A.H. 2024. Detection and identification of plant leaf diseases using YOLOv4. Frontiers in Plant Science, 15, 1355941.
Song, J., Hu, T., Gong, Z., Zhang, Y. and Cui, M. 2024. TLDM: An enhanced traffic light detection model based on YOLOv5. Electronics, 13, 3080.
Promboonruang, S., Boonrod, T. and Ratchatawetchakul, Y. 2024. Efficient waste detection and classification based on YOLOv5 models. Engineering Access, 10, 51–58.
Hair, J.F., Black, W.C., Babin, B.J. and Anderson, R.E. 2010. Multivariate Data: Analysis a Global Perspective. Pearson Education, New Jersey.
Llorca, D.F., Salinas, C., Jimenez, M., Parra, I., Morcillo, A.G., Izquierdo, R., Lorenzo, J. and Sotelo, M.A. 2016. Two-camera based accurate vehicle speed measurement using average speed at a fixed point. IEEE 19th International Conference on Intelligent Transportation Systems (ITSC), Rio de Janeiro, Brazil, 2533-2538.
Liu, Y., Ge, Z., Yuan, Y., Su, X., Guo, X., Suo, T. and Yu, Q. 2021. Study of the error caused by camera movement for the stereo-vision system. Applied Sciences, 11, 9384.
Tankasem, P., Kumphong, J., Chawapattanayotha, N., Jantarakot, S. and Daengpruan, N. 2025. A study of road crashes by applying a space syntax model on collector roads in Khon Kaen, Thailand. Journal of Road Safety, 36, 4, 79-92.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 King Mongkut's University of Technology Thonburi

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Any form of contents contained in an article published in Science and Engineering Connect, including text, equations, formula, tables, figures and other forms of illustrations are copyrights of King Mongkut's University of Technology Thonburi. Reproduction of these contents in any format for commercial purpose requires a prior written consent of the Editor of the Journal.


