进入施工场地未正确佩戴安全帽是导致人员伤亡的主要原因,但现有检测算法存在精确率低、复杂度高等问题。为此,提出了基于混合局部通道注意力和动态卷积改进YOLOv8n的安全帽佩戴检测算法YOLOv8n-DM,设计使用SIoU(Soft Intersection over Union)优化边界框回归损失函数提升预测框准确度和加快收敛速度。试验结果表明,相比原始YOLOv8n算法,该算法复杂度下降了 15%,检测精确率提高了 5百分点。相比YOLOv5s、YOLOv7-tiny等算法,所提算法的参数量、复杂度和模型尺寸均有显著下降。该算法在自建数据集上的精确率达到了 92。4%,处理每张图片用时2。2 ms,兼顾了高检测性能和实时性要求,更适用于实际施工现场的部署与应用。
Research on the enhanced YOLOv8n-DM algorithm for safety helmet detection at construction sites
The primary cause of casualties on construction sites is the improper use of safety helmets.However,existing detection algorithms suffer from low accuracy and high complexity.To address these issues,this paper introduces the YOLOv8n-DM helmet wear detection algorithm,which leverages mixed local channel attention and dynamic convolution.First,the Dynamic Convolution(C2f_DynamicConv)method is employed to create a new backbone network for extracting image features.This approach allows for dynamic adjustment and optimization of computing resources,effectively reducing the model's floating-point computation requirements.This approach not only reduces the complexity of the network model but also enhances the accuracy of analysis and decision-making,while improving the model's generalization ability and robustness.Second,the Mixed Local Channel Attention(MLCA)module is integrated into the model's neck network.This module enhances information processing within the same-sized receptive field by leveraging rich contextual data,thereby improving the model's efficiency.By enhancing the network's ability to capture relevant features while maintaining computational efficiency,this addition significantly boosts the model's detection capabilities.Finally,Soft Intersection over Union(SIoU)is employed to optimize the boundary frame regression loss function,enhancing the accuracy of prediction frames and accelerating convergence speed.Experimental results demonstrate that,compared to the original YOLOv8n algorithm,this improved approach reduces algorithm complexity by 15%,increases detection accuracy by 5 percentage point,and enhances mean average precision by 1.6 percentage point.In comparison to YOLOv5s and YOLOv7-tiny,the proposed algorithm reduces the number of parameters by 37%and 26%,respectively.Additionally,floating-point computations are decreased by 56%and 47%,respectively,while model sizes are also reduced by 37%and 26%.Floating-point computations are reduced by 56%and 47%,respectively,while model sizes decrease by 37%and 26%.The algorithm achieves an accuracy of 92.4%on the self-built dataset,processing each image in just 2.2 ms.This combination of high detection performance and real-time processing makes it particularly well-suited for deployment in actual construction sites.
safety engineeringsafety helmettarget detectionYOLOv8ndynamic convolutionmixed local channel attention