Abstract:
Aiming at the phenomenon that complex background often exists in non-motorized drivers' helmet detection and the diversity of detection target scales often exists in the detection scene, which in turn leads to the low detection efficiency and misdetection and omission, a YOLOv8 algorithm oriented to the detection of traffic helmets is proposed. Combining the advantages of GSConv and CBAM in the C2f module, the C2f_BC module is designed to effectively improve the feature extraction capability of the model while reducing the number of model parameters. A multi-core parallel perception network (MP-Parnet) is designed to improve the model's perception and feature extraction ability for multi-scale targets so that it can be better applied to complex scenes. To alleviate the problem of positive and negative sample imbalance in complex scenes, Focaler-IoU is introduced based on the original model's loss function CIoU, and a threshold parameter is introduced to improve the calculation of the IoU loss, thus alleviating the phenomenon of positive and negative sample imbalance,and effectively improves the model's accuracy of target frame localization in complex background. The experimental results show that compared with the original model, the improved YOLOv8n maintains a decrease in the number of parameters while the mAP50 and mAP50: 95 increase by 2.2% and 1.9% on the self-built dataset Helmet, and 1.8% and 1.9% on the open-source dataset TWHD, which suggests that the improved model can be better applied to the helmet detection of non-motorized drivers in the scenario.