# Helmet Wearing Detection Algorithm Based on YOLOv5s-FCW
## 1 Introduction
Due to a more limited feature set, these methods do not have enough generalization ability and often struggle to cope with complex built environments, and they thus may not be able to accurately identify a target in a changing environment. At this stage, DL algorithms are widely used in helmet wearing detection and have become a mainstream technique. These algorithms are mainly categorized into two types, which are one-stage and two-stage methods. Two-stage methods (e.g., RCNN series) use the generation of region suggestions and FE to achieve accurate positioning, but the detection speed is slow; meanwhile, one-stage methods (e.g., SSD and YOLO) use an end-to-end architecture and directly output the position and category of the target frame, causing the speed of the detection to increase dramatically. [PERSON] et al. [7] improved the LeNet model based on a parallel network structure for human body detection and subsequently identified the presence of helmets by analyzing color features. [PERSON] et al. [8] utilized Faster R-CNN to generate candidate regions through RPN, extract image features, and then classify and detect whether a worker is wearing a helmet or not; this is inadequate for real-time detection and has a large computational burden when dealing with large-scale video data, in spite of its high detection accuracy. [PERSON] et al. [9] proposed an HD algorithm that combines OpenPose-v1 with Faster R-CNN, using OpenPose to accurately recognize the human head and neck regions in an image, but which may produce false detections when the worker is holding a helmet or the helmet is partially obscured. [PERSON] et al. [10] employed a K-means clustering algorithm to optimize a priori frames in 2020 and performed dimensional clustering concerning target frames on a homemade dataset by adjusting the size of a priori frames so that the model could more accurately obtain edge information about the target object, especially in a helmet-wearing scenario, and optimizing the YOLOv4 model by using a multiscale training strategy; however, the detection accuracy of the improved model is still deficient in highly dense scenarios and is not applicable on resource-constrained devices. [PERSON] et al. [11] and [PERSON] et al. [12] applied the YOLOv5 model to detecting SH, and the detection results had excellent performance in terms of speed and could reach a good balance with detection accuracy. However, due to the more limited samples in the real scenario of a construction site, the model lacks sufficient generalization ability. [PERSON] et al. [13] added an energetic detection scale to YOLOv5 to detect smaller targets. [PERSON] et al. in 2021 [14] used K-means++ to improve the size matching for a priori anchor frames to make the model more accurate in selecting the bounding box (BB), thus accelerating the model convergence, and the use of a depthwise coordinate attention mechanism (DWCA) had strengthened the attention to the important channels, but it still could not deal with the fact that the worker part is occluded or that, when the target is far away and small, the system may miss detection or misjudge. [PERSON] et al. [15] enhanced the model's ability to capture multi-scale feature details by applying a combined PP LCNet and collaborative attention mechanism (AM) module to the YOLOv4 model. The method significantly reduces the number of parameters and computations in the model, thus improving the detection speed and real-time performance for the model. Based on YOLOv5, [PERSON] et al. [16] introduced anchor-free SimOTA and SloU to further improve the regression accuracy. [PERSON] et al. [17] chose YOLOv5 as the main body of the algorithm and integrated FasterNet, CBAM, and Wise-IoU to build the proposed network, which was faster in processing speed and lower in number of parameters and computations than the baseline method. [PERSON] et al. [18] integrated the attention mechanism and concat Module in YOLOv5s and replaced the path aggregation network (PANet) with the weighted bidirectional feature pyramid network (BiFPN).