Research on real-time detection algorithm of construction workers'hard hats in complex operating environments
To solve problems such as low detection accuracy when the safety helmet background is complex and the safety helmet target is too small to be detected,this paper proposes a real-time detection algorithm for safety helmets in complex working environments based on the YOLOv5 framework.In this paper,a new hard hat data set is generated for model training by selecting a public data set that conforms to the construction scene and combining images shot at the construction site and photos crawled from the network.In terms of the network model,the coordinate attention mechanism module is added after each C3 module in the YOLOv5 backbone network to make the network pay more attention to the specific location of the target area,improve the backbone network's ability to extract target feature information and prevent the interference of invalid background on the target.The adaptive spatial feature fusion module is introduced in the feature fusion layer so that the network may automatically learn the weights of multiple feature layers,enhancing feature fusion ability and further improving detection accuracy.Finally,the CIoU loss function is replaced by SIoU to solve the random matching problem of the prediction box during regression,improve the model's detection accuracy,and accelerate the convergence speed.The experimental results show that the modified algorithm outperforms other standard algorithms in detection accuracy and detection speed.Compared with Faster R-CNN and SSD,the average precision mean is improved by 16.09%and 13.59%,respectively.The improved network's accuracy is improved by 2.3%,and the average precision mean is improved by 2.1%,reaching 95.6%when compared with the original YOLOv5.The improved network pays more attention to the characteristic information of the safety helmet in the detection of the safety helmet,effectively improves the detection ability of the safety helmet in complex environments,and provides a more reliable solution for safety management in complex scenes such as construction sites.This study is expected to play a significant role in the practical application to improve safety and efficiency in the construction process.
safety engineeringhelmet detectionYOLOv5coordinate attentionfeature fusionloss function