Smart Traffic Enforcement: A Deep Learning-based Framework for Helmet Violation Detection and Fine Collection
Motorcycle traffic accidents have been on the rise because of low compliance with helmet laws and there is need for automated traffic monitoring and enforcement systems. This paper proposes a traffic enforcement solution that combines YOLOv8 based object detection and PaddleOCR for automatic violation detection and license plate recognition of motorcyclists. The system will detect motorcycles, riders, helmets and license plates from traffic images, identify the helmet violation cases by analyzing their spatial relationship and extract the registration numbers of the vehicles for automatic enforcement. The solution is trained and tested using 4,169 traffic images that have been labeled. The helmet detection model obtains an mAP@50 score of 0.983, and the license plate detection module gives localization of the license plates which makes them recognizable by the OCR. There is a Flask based web app that allows users to upload images, detect violations, generate evidence, and notify fines.