Abstract:In this study, a new target detection method based on YOLOv5s is introduced to make up for the deficiencies of the current mainstream detection methods in terms of detection precision and missed detection of small target helmet wearing. Firstly, a small target detection layer is added to increase the detection precision of the small target helmet. Secondly, the ShuffleAttention mechanism is introduced. The number of ShuffleAttention groups is reduced from 64 to 16 in this study, which is more conducive to the global extraction of the depth and size of the model. Finally, the SA-BiFPN network structure is added to carry out the bidirectional multi-scale feature fusion to extract more effective feature information. Experiments show that compared with the original YOLOv5s algorithm, the average precision of the improved algorithm is increased by 1.7%, reaching 92.5%. The average precision of the algorithms with and without helmets is increased by 1.9% and 1.4% respectively. The proposed detection algorithm is compared with other target detection algorithms. The experimental results show that the SAB-YOLOv5s algorithm model is only 1.5M larger than the original YOLOv5s algorithm model, which is smaller than other algorithm models. It improves the average precision of target detection, reduces the probability of missing and false detection in small target detection, and achieves accurate and lightweight helmet wearing detection.