Abstract:Aiming at the problem that the current traffic safety helmet detection model can’t balance the accuracy of detection with the size of the model and the poor generalization of the model, a method based on improving you only look once version 5 (YOLOv5) is proposed. By incorporating the lightweight GhostNet module into the YOLOv5 backbone network, we effectively reduce the model size. The addition of the receptive fields block (RFB) module enhances feature extraction and improves the feature acquisition capability of the lightweight model. Subsequently, the high-performance lightweight convolution, GSConv, is integrated into the neck structure for further model size compression. Moreover, the baseline model’s loss function is substituted with efficient insertion over union (EIoU), accelerating network convergence and enhancing detection precision. Experimental results corroborate the effectiveness of this improved algorithm in real-world traffic scenarios.