Abstract:Aiming at the characteristics of helmet images in complex scenes of construction sites, such as complex background information, different light intensity and shooting angles, which lead to low recognition accuracy of YOLOv7-tiny helmet detection algorithm, and prone to missed detection and false detection, a MCWE-YOLO helmet detection algorithm has been proposed. Data enhancement is performed by improving the Mosaic method to enrich data diversity; the CoordAttention module is embedded in the YOLOv7-tiny model to enhance the model’s ability to extract small target semantic information and global perception capabilities; a new FR-ODConv dynamic convolution is proposed to replace the static convolution in the head, and the weights of the convolution kernel are adaptively and dynamically adjusted, so that the model can better extract the key features of helmets of different shapes and sizes; the loss function of the algorithm is improved to focus on anchor boxes of ordinary quality and improve the overall detection performance of the model; a new Res-EDH decoupling head structure is proposed to replace the original detect structure, decouple classification and regression, and reduce latency while improving accuracy. The open source GDUT-HWD helmet dataset was used for training and testing. The experimental results show that the mAP of the MCWE-YOLO algorithm reaches 87.3%, which is 1.6% higher than the original YOLOv7-tiny algorithm and 2.1% higher than the optimal value of other algorithms. It can effectively improve the accuracy of helmet detection and realize the automatic detection of helmets on construction sites.