作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (4): 312-320. doi: 10.19678/j.issn.1000-3428.0064219

• 开发研究与工程应用 • 上一篇    

安全帽佩戴检测网络模型的轻量化设计

郭奕裕, 周箩鱼   

  1. 长江大学 电子信息学院, 湖北 荆州 434023
  • 收稿日期:2022-03-18 修回日期:2022-05-24 发布日期:2022-08-09
  • 作者简介:郭奕裕(1997-),男,硕士研究生,主研方向为深度学习、目标检测;周箩鱼(通信作者),副教授、博士。
  • 基金资助:
    国家自然科学基金(61901059,51978079);湖北省高等学校优秀中青年科技创新团队计划项目(T2020007)。

Lightweight Design of Safety Helmet Wearing Detection Network Model

GUO Yiyu, ZHOU Luoyu   

  1. School of Electronics and Information, Yangtze University, Jingzhou 434023, Hubei, China
  • Received:2022-03-18 Revised:2022-05-24 Published:2022-08-09

摘要: 现有的安全帽佩戴检测网络模型存在准确率低、推理速度慢、部署到边缘计算设备时精度和实时性均达不到应用要求等问题。提出一种轻量化设计的DT-YOLO模型,对YOLOv4-Tiny目标检测模型进行改进,通过增加一个检测层提高模型在密集场景下对小目标的检测能力,并引入空间金字塔池化模块,提高模型对不同尺寸目标的检测能力。使用局部稀疏因子衰减算法进行稀疏化训练,从而使经过稀疏化训练后模型的平均精度均值(mAP)得到提高。根据缩放系数判断通道的重要性,并进行模型的通道剪枝,压缩模型的大小和计算量。使用TensorRT推理加速引擎进行网络层水平和垂直融合,消除拼接层操作,并将参数压缩成16位浮点型,提高模型的推理速度,最后在Jeston Nano边缘计算设备上实现模型部署。实验结果表明,与YOLOv4-Tiny模型相比,DT-YOLO模型的mAP提高了3.6个百分点,模型大小减少了83.5%,帧率提高137.7%,能够满足安全帽佩戴检测的要求。

关键词: 安全帽佩戴检测, YOLOv4-Tiny模型改进, 局部稀疏因子衰减, 模型压缩, TensorRT推理加速引擎, Jeston Nano边缘计算设备

Abstract: The existing safety helmet wearing detection network model has such problems as low accuracy, slow reasoning speed, and the accuracy and real-time performance when deployed to edge computing devices can not meet the application requirements.Accordingly, a lightweight DT-YOLO model is proposed, the YOLOv4-Tiny target detection model features two significant improvements.Specifically, a detection layer is added to improve the detection of small targets in dense scenes, and a Spatial Pyramid Pooling(SPP) module is used to improve the detection of variable-sized targets.Secondly, the local sparsity factor attenuation algorithm is used during sparsity training to improve the model's mean Average Precision(mAP).Subsequently, the importance of the channel is judged according to the scaling factor, and channel pruning is carried out to compress the size and calculation burden of the model.Thirdly, the TensorRT reasoning acceleration engine is used to fuse the horizontal and vertical network layers, eliminate the splicing layer operation, and compress the parameters into 16 bit floating-point type, thereby accelerating the model's reasoning.Finally, the model is deployed on the edge computing device Jeston Nano.Experimental results indicate that compared with that of the YOLOv4-Tiny model, the mAP of DT-YOLO is increased by 3.6 percentage points, the model volume is reduced by 83.5%, and the frame rate is increased by 137.7%, and the proposed model satisfies the requirements of helmet wearing detection.

Key words: safety helmet wearing detection, YOLOv4-Tiny model improvement, local sparsity factor attenuation, model compression, TensorRT reasoning acceleration engine, Jeston Nano edge computing device

中图分类号: