Research on Real-Time Detection of Electric Bicycle Helmets Based on YOLOv8 Under Complex Road Conditions
Abstract
To meet the demand for real-time detection of electric bicycle helmet wearing in intelligent transportation scenarios, this paper constructs a helmet recognition and detection model based on YOLOv8. A self-built traffic scene dataset containing 5,448 images is established, covering complex road conditions including multiple weather conditions, multi-view angles, far and near shooting distances, day and night environments. The dataset is split into a training set and a validation set at an 8:2 ratio. All model training experiments are carried out on hardware equipped with an Intel i9-13900K CPU and an NVIDIA RTX 4090 GPU, with a batch size of 16, an initial learning rate of 0.0001, and a maximum training epoch of 100. Precision, Recall, F1-Score, mAP@0.5 and mAP@0.5:0.95 are adopted as core evaluation metrics. Experimental results show that the overall mAP@0.5 of the model reaches 0.911; the maximum precision hits 0.972 at a confidence threshold of 0.972, and the global Recall is 0.95. The optimal F1-Score of 0.87 is achieved at a confidence threshold of 0.443. All metrics converge and stabilize after 50 training epochs. When deployed on an NVIDIA GTX 1060 graphics card, the model achieves a single-frame inference latency of 33 ms and a frame rate of 30 FPS, which satisfies the real-time requirement of 25 FPS for traffic monitoring systems. The proposed model exhibits strong robustness under variable illumination, viewpoints and weather conditions, providing a high-precision, low-latency visual detection solution for intelligent supervision of electric bicycle helmet compliance.