Abstract:Safety helmets are crucial to the safety of construction workers, However, there is still a phenomenon that the construction workers do not wear safety helmets all the time.Current helmet detection algorithms have the problems of high computational complexity and low detection accuracy in complex construction scenarios, so there is an urgent need for a real-time high-precision method to detect helmet wearing in complex construction scenarios.In this paper, we propose a lightweight helmet detection algorithm based on the improved YOLOv8, which firstly replaces the YOLOv8 backbone network with MobileNetv4 and retains the SPPF part; secondly, replaces the traditional depth-separable convolution with GSconv in the neck network, replaces the CSP network layer with GhostNet, and fuses the GhostBottleneck and C2f modules, and introduces the S2f module.C2f module and introduce SENet to optimise C2f; finally, the EMA module is introduced in the head network.The experiments show that compared with the six models such as Faster R-CNN and YOLOv5s, the improved YOLOv8 model improves significantly in terms of accuracy, recall, mean average precision, computation volume and frame rate, etc. The accuracy rate of 90.12%, the recall rate of 89.27%, and the mean average precision value of 84.28% meet the requirements of safety for construction workers on construction sites, and it is suitable for the actual construction sites.environment, improving construction safety.