基于改进YOLO的安全帽佩戴检测算法研究
Research on Helmet Wear Detection Algorithm Based on Improved YOLO
摘要: 高危场景下的安全帽佩戴检测任务是保障施工人员生命财产安全的重要一环。本文针对复杂场景下传统安全帽检测中小目标检测性能不佳、模型参数量大等问题,提出一种基于改进YOLOv7-Tiny的安全帽检测方法。该方法设计一种针对小目标检测的特征提取网络,从而加强网络对小目标的识别能力;引入轻量化上采样算子CARAFE,改进上采样过程从而提高特征融合质量;使用K-means++聚类算法对数据集中目标的锚框进行重新聚类,得到适应安全帽检测的锚框尺寸;并引入CA注意力机制,让网络更加关注有用的坐标信息,加强网络对小目标的识别能力。实验结果表明,在公开数据集SHWD上,改进后的算法相比YOLOv4-Tiny、YOLOX-Tiny等传统算法精度分别提升了14.1%和2.8%,相比原算法在参数量减少了31.7%的同时精度提升了1.5%,满足实际场景中对安全帽的检测要求。
Abstract: The task of helmet wear detection in high-risk scenarios is an important part of safeguarding the lives and properties of construction workers. In this paper, we propose a helmet detection method based on an improved YOLOv7-Tiny, addressing challenges related to the poor performance of small target detection and the large number of model parameters associated with traditional helmet de-tection in complex scenes. Our method incorporates a feature extraction network designed specifically for small target detection, enhancing the network’s capability to recognize small targets. Addi-tionally, we introduce a lightweight upsampling operator, CARAFE, to optimize the up-sampling process, thereby improving the quality of feature fusion. To adapt anchor frames to helmet detec-tion, we employ the K-means++ clustering algorithm to recluster the anchor frames of targets in the dataset. Furthermore, we integrate the CA attention mechanism, allowing the network to prioritize useful coordinate information and reinforce its ability to recognize small targets. Experimental results on the SHWD public dataset demonstrate that the improved algorithm enhances mAP by 14.1% and 2.8% compared to traditional algorithms like YOLOv4-Tiny and YOLOX-Tiny, respec-tively. Moreover, it improves mAP by 1.5% compared to the baseline while reducing the number of parameters by 31.7%. These results meet the requirements for safety helmet detection in real sce-narios.
文章引用:刘聪. 基于改进YOLO的安全帽佩戴检测算法研究[J]. 计算机科学与应用, 2023, 13(12): 2551-2561. https://doi.org/10.12677/CSA.2023.1312254

参考文献

[1] 唐凯, 陈陆, 张洲境, 张善勇. 我国建筑施工行业生产安全事故统计分析及对策[J]. 建筑安全, 2020, 35(9): 40-43.
[2] 张仕廉, 王黎明, 叶贵, 王玉合. 建筑安全全要素投入研究: 以重庆市为例[J]. 中国安全科学学报, 2018, 28(3): 161-166.
[3] 王玲敏, 段军, 辛立伟. 引入注意力机制的YOLOv5安全帽佩戴检测方法[J]. 计算机工程与应用, 2022, 58(9): 303-312.
[4] 冯国臣, 陈艳艳, 陈宁, 李鑫, 宋程程. 基于机器视觉的安全帽自动识别技术研究[J]. 机械设计与制造工程, 2015, 44(10): 39-42.
[5] Vanbang, L.E., 朱煜, Anhtu, N. 深度图像手势分割及HOG-SVM手势识别方法研究[J]. 计算机应用与软件, 2016, 33(12): 122-126.
[6] 胡恬. 利用几何分析法和BP神经网络进行人脸识别的研究[J]. 计算机工程与设计, 2002(9): 18-21.
[7] 刘晓慧, 叶西宁. 肤色检测和Hu矩在安全帽识别中的应用[J]. 华东理工大学学报(自然科学版), 2014, 40(3): 365-370.
[8] Redmon, J., Divvala, S., Girshick, R., et al. (2016) You Only Look Once: Unified, Real-Time Object Detection. 2016 IEEE Conference on Com-puter Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 779-788. [Google Scholar] [CrossRef
[9] Redmon, J. and Farhadi, A. (2017) YOLO9000: Better, Faster, Stronger. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, 21-26 July 2017, 7263-7271. [Google Scholar] [CrossRef
[10] Redmon, J. and Farhadi, A. (2018) Yolov3: An Incremental Im-provement. [Google Scholar] [CrossRef
[11] Bochkovskiy, A., Wang, C.Y. and Liaoh, Y.M. (2020) Yolov4: Optimal Speed and Accuracy of Object Detection. [Google Scholar] [CrossRef
[12] 徐印赟, 江明, 李云飞, 等. 基于改进YOLO及NMS的水果目标检测[J]. 电子测量与仪器学报, 2022, 36(4): 114-123.
[13] 李振华, 张雷. 改进YOLOv3的安全帽佩戴检测方法[J]. 国外电子测量技术, 2022, 41(12): 148-155.
[14] 孙备, 左震, 吴鹏, 等. 面向无人艇环境感知的改进型SSD目标检测方法[J]. 仪器仪表学报, 2021, 42(9): 52-61.
[15] 丁田, 陈向阳, 周强, 等. 基于改进YOLOX的安全帽佩戴实时检测[J]. 电子测量技术, 2022, 45(17): 72-78. [Google Scholar] [CrossRef
[16] Wang, C.Y., Bochkovskiy, A. and Liao, H.Y.M. (2022) YOLOv7: Trainable Bag-Of-Freebies Sets New State-Of-The-Art for Real-Time Object Detectors. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 17-24 June 2023. [Google Scholar] [CrossRef
[17] Hou, Q., Zhou, D. and Feng, J. (2021) Coordinate Attention for Efficient Mobile Network Design. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 20-25 June 2021, 13713-13722. [Google Scholar] [CrossRef
[18] Wang, J., Chen, K., Xu, R., et al. (2019) Carafe: Con-tent-Aware Reassembly of Features. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, 27 October-02 November 2019, 3007-3016. [Google Scholar] [CrossRef