基于改进YOLOv8n的井下人员安全帽佩戴检测

王琦, 夏鲁飞, 陈天明, 韩鸿胤, 王亮

王琦,夏鲁飞,陈天明,等. 基于改进YOLOv8n的井下人员安全帽佩戴检测[J]. 工矿自动化,2024,50(9):124-129. DOI: 10.13272/j.issn.1671-251x.2024040054
引用本文: 王琦,夏鲁飞,陈天明,等. 基于改进YOLOv8n的井下人员安全帽佩戴检测[J]. 工矿自动化,2024,50(9):124-129. DOI: 10.13272/j.issn.1671-251x.2024040054
WANG Qi, XIA Lufei, CHEN Tianming, et al. Detection of underground personnel safety helmet wearing based on improved YOLOv8n[J]. Journal of Mine Automation,2024,50(9):124-129. DOI: 10.13272/j.issn.1671-251x.2024040054
Citation: WANG Qi, XIA Lufei, CHEN Tianming, et al. Detection of underground personnel safety helmet wearing based on improved YOLOv8n[J]. Journal of Mine Automation,2024,50(9):124-129. DOI: 10.13272/j.issn.1671-251x.2024040054

基于改进YOLOv8n的井下人员安全帽佩戴检测

基金项目: 国家自然科学基金项目(51974170)。
详细信息
    作者简介:

    王琦(2000—),男,山东泰安人,硕士研究生,研究方向为煤矿智能化,E-mail:1365644991@qq.com

  • 中图分类号: TD67

Detection of underground personnel safety helmet wearing based on improved YOLOv8n

  • 摘要: 针对现有井下人员安全帽佩戴检测方法未考虑遮挡、目标较小、背景干扰等因素,存在检测精度差及模型不够轻量化等问题,提出一种改进YOLOv8n模型,并将其应用于井下人员安全帽佩戴检测。在颈部网络中加入P2小目标检测层,提高模型对小目标的检测能力,更好地捕捉安全帽目标细节;在主干网络中添加卷积块注意力模块(CBAM)提取图像关键特征,减少背景信息的干扰;将CIoU损失函数替换为WIoU损失函数,提升模型对检测目标的定位能力;采用轻量化共享卷积检测头(LSCD),通过共享参数的方式降低模型复杂度,并将卷积中的归一化层替换为群组归一化(GN),在尽可能保证精度的同时实现模型轻量化。实验结果表明:与YOLOv8n模型相比,改进YOLOv8n模型在交并比阈值为0.5时的平均精度均值(mAP@50)提升了1.8%,参数量减少了23.8%,计算量下降了10.4%,模型大小减小了17.2%;改进YOLOv8n模型检测精度高于SSD,YOLOv3−tiny,YOLOv5n,YOLOv7和YOLOv8n,模型复杂度仅高于YOLOv5n,较好地平衡了模型检测精度与复杂度;在井下复杂场景下,改进YOLOv8n模型能够实现对井下人员安全帽佩戴的准确检测,改善了漏检问题。
    Abstract: Existing methods for detecting safety helmet wearing among underground personnel fail to consider factors such as occlusion, small target size, and background interference, leading to poor detection accuracy and insufficient model lightweighting. This paper proposed an improved YOLOv8n model applied to safety helmet wearing detection in underground. A P2 small target detection layer was added to the neck network to enhance the model's ability to detect small targets and better capture details of safety helmets. A convolutional block attention module (CBAM) was integrated into the backbone network to extract key image features and reduce background interference. The CIoU loss function was replaced with the WIoU loss function to improve the model's localization capability for detection targets. A lightweight shared convolution detection head (LSCD) was used to reduce model complexity through parameter sharing, and normalization layers in convolutions were replaced with group normalization (GN) to reduce model weight while maintaining accuracy as much as possible. The experimental results showed that compared to the YOLOv8n model, the improved YOLOv8n model increased the mean average precision at an intersection over union threshold of 0.5 (mAP@50) by 1.8%, reduced parameter count by 23.8%, lowered computational load by 10.4%, and decreased model size by 17.2%. The improved YOLOv8n model outperformed SSD, YOLOv3-tiny, YOLOv5n, YOLOv7, and YOLOv8n in detection accuracy, with a complexity only slightly higher than YOLOv5n, effectively balancing detection accuracy and complexity. In complex underground scenarios, the improved YOLOv8n model were able to achieve accurate detection of safety helmet wearing among underground personnel, addressing the issue of missed detections.
  • 图  1   改进YOLOv8n模型结构

    Figure  1.   Improved YOLOv8n model structure

    图  2   改进YOLOv8n的检测层

    Figure  2.   Detection layer of improved YOLOv8n

    图  3   CBAM结构

    Figure  3.   Convolutional block attention module (CBAM) structure

    图  4   LSCD结构

    Figure  4.   Lightweight shared convolutional detection head (LSCD) structure

    图  5   加入CBAM前后热力图对比

    Figure  5.   Comparison of heat maps before and after adding CBAM

    图  6   YOLOv8n改进前后检测效果对比

    Figure  6.   Comparison of detection results before and after YOLOv8n improvement

    表  1   不同注意力机制对比实验结果

    Table  1   Comparison of experimental results with different attention mechanisms

    注意力机制精确率召回率mAP@50/%
    SE0.9120.87394.0
    EMA0.9020.87493.8
    CA0.9200.86694.1
    CBAM0.9100.88194.3
    下载: 导出CSV

    表  2   不同损失函数对比实验结果

    Table  2   Comparison of experimental results with different loss functions

    损失函数精确率召回率mAP@50/%
    CIoU0.9100.88194.3
    EIoU0.9140.87894.2
    SIoU0.9090.87294.1
    GIoU0.9090.88494.2
    WIoU0.9170.89495.1
    下载: 导出CSV

    表  3   消融实验结果

    Table  3   Ablation experiment results

    P2 CBAM WIoU LSCD mAP@50/% 参数量/
    106
    浮点运算
    数/109
    模型大
    小/MiB
    × × × × 93.0 3.15 8.7 6.11
    × × × 93.8 3.35 17.2 6.11
    × × × 93.3 3.22 8.7 6.24
    × × × 93.4 3.15 8.7 6.11
    × 95.1 3.42 17.2 6.24
    94.8 2.40 7.8 5.07
    下载: 导出CSV

    表  4   不同目标检测模型对比实验结果

    Table  4   Comparison of experimental results for different object detection models

    模型 mAP@50/% 参数量/106 浮点运算数/109 模型大小/MiB
    SSD 69.6 23.61 60.8 503.67
    YOLOv3−tiny 88.9 8.67 12.9 17.40
    YOLOv5n 85.6 1.77 4.2 3.78
    YOLOv7 94.1 37.19 105.1 74.80
    YOLOv8n 93.0 3.15 8.7 6.11
    改进YOLOv8n 94.8 2.40 7.8 5.07
    下载: 导出CSV
  • [1]

    OSUNMAKINDE I O. Towards safety from toxic gases in underground mines using wireless sensor networks and ambient intelligence[J]. International Journal of Distributed Sensor Networks,2013,9(2). DOI: 10.1155/2013/159273.

    [2]

    LIU Wei,ANGUELOV D,ERHAN D,et al. SSD:single shot multibox detector[C]. The 14th European Conference on Computer Vision,Amsterdam,2016:21-37.

    [3]

    REDMON J,DIVVALA S,GIRSHICK R,et al. You only look once:unified,real-time object detection[C]. IEEE Conference on Computer Vision and Pattern Recognition,Las Vegas,2016:779-788.

    [4]

    GIRSHICK R,DONAHUE J,DARRELL T,et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]. IEEE Conference on Computer Vision and Pattern Recognition,Columbus,2014:580-587.

    [5] 赵红成,田秀霞,杨泽森,等. 改进YOLOv3的复杂施工环境下安全帽佩戴检测算法[J]. 中国安全科学学报,2022,32(5):194-200.

    ZHAO Hongcheng,TIAN Xiuxia,YANG Zesen,et al. Safety helmet wearing detection algorithm in complex construction environment based on improved YOLOv3[J]. China Safety Science Journal,2022,32(5):194-200.

    [6]

    FU Chuan,WANG Rongxin. Research on safety helmet wearing YOLO-V3 detection technology improvement in mine environment[J]. Journal of Physics:Conference Series,2019,1345(4). DOI: 10.1088/1742-6596/1345/4/042045.

    [7] 李熙尉,孙志鹏,王鹏,等. 基于YOLOv5s改进的井下人员和安全帽检测算法研究[J]. 煤,2023,32(3):22-25. DOI: 10.3969/j.issn.1005-2798.2023.03.006

    LI Xiwei,SUN Zhipeng,WANG Peng,et al. Research on underground personnel and safety helmet detection algorithm based on YOLOv5s improvement[J]. Coal,2023,32(3):22-25. DOI: 10.3969/j.issn.1005-2798.2023.03.006

    [8] 李凤英,罗超. 基于深度学习的矿山作业安全帽穿戴规范性识别算法[J]. 有色金属(矿山部分),2023,75(4):7-13. DOI: 10.3969/j.issn.1671-4172.2023.04.002

    LI Fengying,LUO Chao. Normative recognition algorithm for safety helmet wearing in mining operations based on deep learning[J]. Nonferrous Metals (Mining Section),2023,75(4):7-13. DOI: 10.3969/j.issn.1671-4172.2023.04.002

    [9] 雷帮军,余翱,余快. 基于YOLOv8s改进的小目标检测算法[J]. 无线电工程,2024,54(4):857-870. DOI: 10.3969/j.issn.1003-3106.2024.04.009

    LEI Bangjun,YU Ao,YU Kuai. Small object detection algorithm based on improved YOLOv8s[J]. Radio Engineering,2024,54(4):857-870. DOI: 10.3969/j.issn.1003-3106.2024.04.009

    [10]

    WOO S,PARK J,LEE J Y,et al. CBAM:convolutional block attention module[C]. European Conference on Computer Vision,Munich,2018:3-19.

    [11]

    ZHENG Zhaohui,WANG Ping,REN Dongwei,et al. Enhancing geometric factors in model learning and inference for object detection and instance segmentation[J]. IEEE Transactions on Cybernetics,2022,52(8):8574-8586. DOI: 10.1109/TCYB.2021.3095305

    [12]

    TONG Zanjia,CHEN Yuhang,XU Zewei,et al. Wise-IoU:bounding box regression loss with dynamic focusing mechanism[EB/OL]. [2024-04-27]. https://arxiv.org/abs/2301.10051.

    [13] 陈伟,江志成,田子建,等. 基于YOLOv8的煤矿井下人员不安全动作检测算法[J/OL]. 煤炭科学技术:1-19[2024-04-14]. http://kns.cnki.net/kcms/detail/11.2402.td.20240322.1343.003.html.

    CHEN Wei,JIANG Zhicheng,TIAN Zijian,et al. Unsafe action detection algorithm of underground personnel in coal mine based on YOLOv8[J/OL]. Coal Science and Technology:1-19[2024-04-14]. http://kns.cnki.net/kcms/detail/11.2402.td.20240322.1343.003.html.

    [14]

    TIAN Zhi,SHEN Chunhua,CHEN Hao,et al. FCOS:a simple and strong anchor-free object detector[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,2022,44(4):1922-1933.

    [15]

    YANG Wenjuan,ZHANG Xuhui,MA Bing,et al. An open dataset for intelligent recognition and classification of abnormal condition in longwall mining[J]. Scientific Data,2023,10(1). DOI: 10.1038/s41597-023-02322-9.

    [16]

    HU Jie,SHEN Li,SUN Gang. Squeeze-and-excitation networks[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Salt Lake City,2018:7132-7141.

    [17]

    OUYANG Daliang,HE Su,ZHANG Guozhong,et al. Efficient multi-scale attention module with cross-spatial learning[C]. IEEE International Conference on Acoustics,Speech and Signal Processing,Rhodes Island,2023:1-5.

    [18]

    HOU Qibin,ZHOU Daquan,FENG Jiashi. Coordinate attention for efficient mobile network design[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Nashville,2021:13708-13717.

    [19]

    ZHANG Yifan,REN Weiqiang,ZHANG Zhang,et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing,2022,506:146-157. DOI: 10.1016/j.neucom.2022.07.042

    [20]

    GEVORGYAN Z. SIoU loss:more powerful learning for bounding box regression[EB/OL]. [2024-04-29]. https://doi.org/10.48550/arXiv.2205.12740.

    [21]

    REZATOFIGHI H,TSOI N,GWAK J,et al. Generalized intersection over union:a metric and a loss for bounding box regression[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Long Beach,2019:658-666.

  • 期刊类型引用(1)

    1. 李小军,赵明炀,李淼. 基于深度学习的钻孔冲煤量智能识别方法. 煤田地质与勘探. 2025(01): 257-270 . 百度学术

    其他类型引用(0)

图(6)  /  表(4)
计量
  • 文章访问数:  255
  • HTML全文浏览量:  95
  • PDF下载量:  48
  • 被引次数: 1
出版历程
  • 收稿日期:  2024-04-16
  • 修回日期:  2024-09-22
  • 网络出版日期:  2024-09-13
  • 刊出日期:  2024-08-31

目录

    /

    返回文章
    返回