《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (7): 2333-2341.DOI: 10.11772/j.issn.1001-9081.2024070999

• 多媒体计算与计算机仿真 • 上一篇    下一篇

复杂场景下跨层多尺度特征融合的安全帽佩戴检测算法

陈亮1,2(), 王璇1, 雷坤1   

  1. 1.西安工程大学 计算机科学学院,西安 710600
    2.陕西省服装设计智能化重点实验室(西安工程大学),西安 710600
  • 收稿日期:2024-07-17 修回日期:2024-09-26 接受日期:2024-10-09 发布日期:2025-07-10 出版日期:2025-07-10
  • 通讯作者: 陈亮
  • 作者简介:陈亮(1977—),男,湖南怀化人,教授,博士,CCF会员,主要研究方向:人工智能、云计算与大数据、数据分析与可视化 chenliang@xpu.edu.cn
    王璇(2000—),女,陕西渭南人,硕士研究生,主要研究方向:目标检测、图像处理
    雷坤(2001—),男,陕西西安人,硕士研究生,主要研究方向:人工智能、数据分析与可视化。
  • 基金资助:
    陕西省教育厅重点科学研究计划项目(22JS021)

Helmet wearing detection algorithm for complex scenarios based on cross-layer multi-scale feature fusion

Liang CHEN1,2(), Xuan WANG1, Kun LEI1   

  1. 1.School of Computer Science,Xi’an Polytechnic University,Xi’an Shaanxi 710600,China
    2.Shaanxi Key Laboratory of Clothing Intelligence (Xi’an Polytechnic University),Xi’an Shaanxi 710600,China
  • Received:2024-07-17 Revised:2024-09-26 Accepted:2024-10-09 Online:2025-07-10 Published:2025-07-10
  • Contact: Liang CHEN
  • About author:CHEN Liang, born in 1977, Ph. D., professor. His research interests include artificial intelligence, cloud computing and big data, data analysis and visualization.
    WANG Xuan, born in 2000, M. S. candidate. Her research interests include object detection, image processing.
    LEI Kun, born in 2001, M. S. candidate. His research interests include artificial intelligence, data analysis and visualization.
  • Supported by:
    Key Scientific Research and Development Program of Education Department of Shaanxi Province(22JS021)

摘要:

为了解决施工场景下安全帽佩戴检测时,由于人员密集、遮挡和复杂背景等原因造成的小目标漏检和错检的问题,提出一种基于YOLOv8n的双重注意力机制的跨层多尺度安全帽佩戴检测算法。首先,设计微小目标检测头,以提高模型对小目标的检测能力;其次,在特征提取网络中嵌入双重注意力机制,从而更加关注复杂场景下目标信息的特征捕获;然后,将特征融合网络替换成重参数化泛化特征金字塔网络(RepGFPN)改进后的跨层多尺度特征融合结构S-GFPN (Selective layer Generalized Feature Pyramid Network),以实现小目标特征层信息和其他特征层的多尺度融合,并建立长期的依赖关系,从而抑制背景信息的干扰;最后,采用MPDIOU(Intersection Over Union with Minimum Point Distance)损失函数来解决尺度变化不敏感的问题。在公开数据集GDUT-HWD上的实验结果表明,改进后的模型比YOLOv8n的mAP@0.5提升了3.4个百分点,对蓝色、黄色、白色和红色安全帽的检测精度分别提升了2.0、1.1、4.6和9.1个百分点,在密集、遮挡、小目标、反光和黑暗这5类复杂场景下的可视化检测效果也优于YOLOv8n,为实际施工场景中安全帽佩戴检测提供了一种有效方法。

关键词: 复杂场景, 目标检测, 小目标, 多尺度特征融合, YOLOv8

Abstract:

To address the issue of missed and false detections of small objects of helmet wearing detection in construction scenarios, caused by reasons such as crowding, occlusion, and complex backgrounds, a cross-layer multi-scale helmet wearing detection algorithm with double attention mechanism based on YOLOv8n was proposed. Firstly, a small object detection head was designed to enhance the model’s ability to detect small objects. Secondly, the double attention mechanism was embedded in the feature extraction network to focus more on capturing object features in complex scenarios. Thirdly, the feature fusion network was replaced with the cross-layer multi-scale feature fusion structure S-GFPN (Selective layer Generalized Feature Pyramid Network), which was improved with Re-parameterized Generalized Feature Pyramid Network (RepGFPN), so as to enable multi-scale fusion of small object feature layer with other layers and establish long-term dependencies, thus reducing background information interference. Finally, the MPDIOU (Intersection Over Union with Minimum Point Distance) loss function was employed to address non-sensitivity issues related to scale changes. Experimental results on the public dataset GDUT-HWD show that compared to the YOLOv8n, the improved model increases the mAP@0.5 by 3.4 percentage points, and improves the detection accuracy for blue, yellow, white, and red helmets by 2.0, 1.1, 4.6, and 9.1 percentage points, respectively. The model also outperforms the YOLOv8n in five complex scenarios: density, occlusion, small objects, light reflection, and darkness, and provides an effective method for helmet wearing detection in real-world construction scenarios.

Key words: complex scenario, object detection, small object, multi-scale feature fusion, YOLOv8 (You Only Look Once v8)

中图分类号: