计算机工程与应用 ›› 2022, Vol. 58 ›› Issue (20): 300-304.DOI: 10.3778/j.issn.1002-8331.2103-0372

• 工程与应用 • 上一篇    下一篇

融合自注意力机制的安全帽佩戴检测方法

孙国栋,李超,张航   

  1. 湖北工业大学 机械工程学院,武汉 430068
  • 出版日期:2022-10-15 发布日期:2022-10-15

Safety Helmet Wearing Detection Method Fused with Self-Attention Mechanism

SUN Guodong, LI Chao, ZHANG Hang   

  1. School of Mechanical Engineering, Hubei University of Technology, Wuhan 430068, China
  • Online:2022-10-15 Published:2022-10-15

摘要: 佩戴安全帽是防止施工现场工作人员头部损伤的有效方法之一,然而现有安全帽检测算法多存在重叠目标检测难度大、小目标漏检率高等缺点。为此,提出了一种通过融合自注意力机制来改进Faster R-CNN的目标检测算法,用于安全帽检测。通过自注意力层来捕获多个尺度上的全局信息,得到更丰富的高层语义特征并将更大的感受野范围引入模型,在区域建议网络(RPN)的训练中通过锚框补选增强的方法让小目标信息得到更多的训练,强化了网络对于小尺度目标的表达能力。实验结果表明:改进后的算法在安全帽佩戴检测上的mAP值较传统Faster R-CNN提高了6.4个百分点,对于不同场景不同尺度的安全帽有着较好的检测效果。

关键词: 小目标检测, Faster R-CNN算法, 自注意力机制, 安全帽佩戴识别

Abstract: Wearing a safety helmet is one of the effective methods to prevent head injury of workers on the construction site. However, the existing safety helmet detection algorithms mostly have disadvantages such as the difficulty of detecting overlapping targets and the high rate of missed detection of small targets. For this reason, an improved Faster R-CNN target detection algorithm by fusing the self-attention mechanism is proposed for helmet detection. First, the self-attention layer is used to capture global information on multiple scales to obtain richer high-level semantic features and introduce a larger range of receptive fields into the model, and then through the anchor box by-selection in the training of the regional proposal network(RPN), the enhanced method allows more training of small target information, and strengthens the network’s ability to express small-scale targets. The experimental results show that the improved algorithm has a 6.4 percentage points increase in the mAP value of the helmet wearing detection compared to the traditional Faster R-CNN, and it has a better detection effect for helmets in different scenarios and different scales.

Key words: small target detection, Faster R-CNN algorithm, self-attention mechanism, helmet wearing recognition