Automated Traffic Violation Detection Using Deep Learning and Computer Vision
Keywords:
Computer vision, Convolutional neural networks, Deep learning, Helmet detection, Object detection, Road safety, Traffic violation detection, Triple riding, YOLO, YOLOv8Abstract
Road traffic violations such as triple riding on two-wheelers and failure to wear helmets are among the leading contributors to accident fatalities in India. Traditional enforcement methods relying on human observation are prone to error, inconsistency, and scale limitations. This paper presents a real-time automated traffic violation detection system that leverages deep learning and computer vision techniques to identify and report such violations from road imagery. The proposed solution employs a two-stage detection pipeline built on the YOLOv8s architecture. The first stage detects motorcycles, triple-riding instances, helmet status, and number plates simultaneously. The second stage performs targeted helmet verification on individual rider crops using a dedicated fine-tuned helmet model, reducing false positives for ambiguous cases. Experimental results demonstrate that the v2 system achieves precision of 82.7%, recall of 74.4%, and mAP@50 of 71.6% on the triple ride model, representing improvements of over 81 percentage points in precision compared to the heuristic-based v1 baseline. The helmet model achieves mAP@50 of 80.8% and precision of 81.2%. The complete pipeline operates at approximately 58 frames per second on a Tesla T4 GPU, making it suitable for real-time deployment. A Gradio-based web interface was developed to provide a user-friendly demonstration and inference platform.
References
J. Redmon and A. Farhadi, “YOLOv3: An Incremental Improvement,” arXiv.org, 2018.
A. Bochkovskiy, C.-Y. Wang, and H.-Y. M. Liao, “YOLOv4: Optimal Speed and Accuracy of Object Detection,” arXiv, vol. 1, Apr. 2020.
C.-Y. Wang and A. Bochkovskiy, “YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors,” 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2023.
G. Jocher, A. Chaurasia, and J. Qiu, “YOLOv8 by Ultralytics,” GitHub, 2023.
M. Kandala, M. Kaushik, V. Nambiar, G. S. Vignesh, C. Jyotsna, T. Singh, and P. Duraisamy, "Designing of VehiNet Using Convolutional Neural Networks and Deep Learning Techniques," Procedia Computer Science, vol. 235, pp. 1409–1418, 2024.
Y. Qian and B. Wang, "A new method for safety helmet detection based on convolutional neural network," PLOS ONE, vol. 18, no. 10, Art. no. e0292970, Oct. 2023.
A. Sayar and Y. Dikilitas. A Real-Time Traffic Violation Detection System on Highways Using Surveillance Cameras and Message-Oriented Middleware, IEEE Access, 2026.
P. Aashik Mathew, A. Jagarlamudi, N. Bharathwaj, and K. Jaspin, "Real-Time Number Plate and Helmet Detection of Motorcyclists Using YOLOv5 and ResNet-50," in Proc. 2023 International Conference on Sustainable Computing and Data Communication Systems (ICSCDS), Erode, India, Mar. 2023, pp. 709–714.
T.-Y. Lin, P. Dollar, R. Girshick, K. He, B. Hariharan, and S. Belongie, “Feature Pyramid Networks for Object Detection,” 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jul. 2017.
A. Susanto and Y. Kusumawati, “Helmet Detection Based on Cascade Classifier and Adaptive Boosting,” Journal of Applied Intelligent System, vol. 8, no. 2, pp. 121–128, Jul. 2023.
S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 39, no. 6, pp. 1137–1149, Jun. 2017.
C.-C. Shen and Y.-C. Chu, "DMAS Beamforming with Complementary Subset Transmit for Ultrasound Coherence-Based Power Doppler Detection in Multi-Angle Plane-Wave Imaging," Sensors, vol. 21, no. 14, Art. no. 4856, 2021.
L. Xu, P. Li, Q. Peng, Y. Zhao, et al., "Vehicle detection on roads based on Yolov5 with multi-scale feature fusion," Array, vol. 28, Art. no. 100522, 2025.
S. C. Satapathy, V. Bhateja, S. Das, and K. S. Raju, Eds., Proceedings of International Conference on Computer Vision and Image Processing (CVIP 2021), Communications in Computer and Information Science, vol. 1567. Cham, Switzerland: Springer, 2022.
A. Buslaev, V. I. Iglovikov, E. Khvedchenya, A. Parinov, M. Druzhinin, and A. A. Kalinin, “Albumentations: Fast and Flexible Image Augmentations,” Information, vol. 11, no. 2, p. 125, Feb. 2020.
B. Lu et al. GWmodelS: A software for geographically weighted models, SoftwareX, vol. 21, p. 101291, Feb. 2023.
J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 779–788, 2016.
W. Liu et al., “SSD: Single Shot MultiBox Detector,” Computer Vision – ECCV 2016, vol. 9905, no. 5, pp. 21–37, 2016.
M. Tan, R. Pang, and Q. V. Le, “EfficientDet: Scalable and Efficient Object Detection,” 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2020.
K. He, G. Gkioxari, P. Dollar, and R. Girshick, “Mask R-CNN,” 2017 IEEE International Conference on Computer Vision (ICCV), Oct. 2017.