计算机与现代化 ›› 2024, Vol. 0 ›› Issue (10): 49-54.doi: 10.3969/j.issn.1006-2475.2024.10.008

• 算法设计与分析 • 上一篇    下一篇

基于改进YOLOv5的施工防护佩戴检测



  

  1. (中北大学仪器与电子学院,山西 太原 030051)
  • 出版日期:2024-10-29 发布日期:2024-10-30
  • 基金资助:
    国家自然科学基金面上项目(52075504)

Construction Protective Wear Detection Based on Improved YOLOv5 

  1. (School of Instrument and Electronics, North University of China, Taiyuan 030051, China)
  • Online:2024-10-29 Published:2024-10-30

摘要: 针对现有算法在复杂环境下对安全帽和安全背心的检测存在漏检、定位错误、精度低等问题,提出一种基于CAS-YOLOv5的防护装备检测方法。首先,为了解决小目标的漏检问题,使用ASFF(Adaptively Spatial Feature Fusion)检测头提高模型对小目标的识别能力;其次,为了提高模型的检测精度以纠正定位错误,在主干网络中增加坐标注意力机制,增强模型对重要目标区域的感知力,提高目标检测的召回率;随后,使用WIoU损失函数,加快模型训练的收敛速度,同时在网络颈部增添由GSConv(Group Shuffle Convolution)模块构成的Slim-Neck,以减少特征图的维度,从而提高模型的计算效率;最后,通过在公共数据集上进行消融、对比实验可知该方法的mAP指标相比基准模型提高了5.6个百分点,召回率提高了4个百分点。改进后的方法能够减少漏检率并且有效提高检测性能,在施工防护装备检测方面具有广阔的应用前景。

关键词: 装备检测, 损失函数, GSConv, ASFF

Abstract:  A protective equipment detection method based on CAS-YOLOv5 is proposed to address the issues of missed detection, positioning errors, and low accuracy in the detection of helmets and safety vests in complex environments using existing algorithms. Firstly, in order to solve the problem of missed detection of small targets, the ASFF(Adaptively Spatial Feature Fusion) detection head is used to improve the model’s recognition ability for small targets. Secondly, in order to improve the detection accuracy of the model and correct positioning errors, a coordinate attention mechanism is added to the backbone network to enhance the model’s perception of important target areas and improve the recall rate of target detection. Once again, we use the WIoU loss function to accelerate the convergence speed of model training, and add Slim-Neck composed of GSConv(Group Shuffle Convolution) modules at the network neck to reduce the dimensionality of feature maps and improve the computational efficiency of the model. Finally, through ablation and comparative experiments on a public dataset, the mAP index of this method  is improved by 5.6 percentage points, and the recall rate is increased by 4 percentage points compared to the YOLOv5 model. The improved method can reduce the missed detection rate and effectively improve detection performance, which has good application prospects in construetion protective equipent detection.

Key words: equipment detection, loss function, GSConv, ASFF

中图分类号: