Improved helmet detection algorithm based on yolov5s
Aiming at the problem that the existing safety hat detection algorithm has low detection accuracy for the identification and detection of the safety hat in remote targets and construction site scenes with complex background,this paper improved the yolov5s structure,introduced CoorAtt attention mechanism into the backbone network to enhance the feature extraction capability and strengthen the attention on important small target information,and then the SPP module of the original model is replaced by the ASPP module,by using void convolution layer instead of pool layer,the loss of feature information caused by maximum pool is reduced,and the receptive field is enlarged with different expansion rates,and features of different scales are extracted effectively Secondly,the BIFPN structure is used in the neck network to fuse the feature information more efficiently,and finally,the loss function is changed to WIOU by introducing a dynamic non-monotonic focusing mechanism,the balance model focuses on each quality sample to improve the overall performance of the network,thus improving the accuracy of target detection.In order to test the effectiveness of the algorithm,this paper carries on the experiment on the public data set Safety Helmet Detection.Experimental results show that the improved yolov5s algorithm achieves 88.5%mAP detection,which is 2.1%higher than the yolov5s algorithm before the improvement.