华东师范大学学报(自然科学版) ›› 2021, Vol. 2021 ›› Issue (5): 134-145.doi: 10.3969/j.issn.1000-5641.2021.05.012

• 数据分析与应用 • 上一篇    下一篇

YOLO-S: 一种新型轻量的安全帽佩戴检测模型

赵红成1, 田秀霞1,*(), 杨泽森1, 白万荣2   

  1. 1. 上海电力大学 计算机科学与技术学院, 上海 200090
    2. 国网甘肃省电力公司电力科学研究院, 兰州 730070
  • 收稿日期:2021-08-24 出版日期:2021-09-25 发布日期:2021-09-28
  • 通讯作者: 田秀霞 E-mail:xxtian@shiep.edu.cn
  • 基金资助:
    国家自然科学基金(61772327); 国网甘肃省电力公司电力科学研究院横向项目(H2019-275)

YOLO-S: A new lightweight helmet wearing detection model

Hongcheng ZHAO1, Xiuxia TIAN1,*(), Zesen YANG1, Wanrong BAI2   

  1. 1. College of Computer Science and Technology, Shanghai University of Electric Power, Shanghai  200090, China
    2. State Grid Gansu Electric Power Research Institute, Lanzhou 730070, China
  • Received:2021-08-24 Online:2021-09-25 Published:2021-09-28
  • Contact: Xiuxia TIAN E-mail:xxtian@shiep.edu.cn

摘要:

针对现有施工场所下工人安全帽佩戴检测模型推理耗时长、对硬件要求高, 且复杂多变环境下的训练数据集单一、数量少导致模型鲁棒性较差等问题, 提出了一种轻量化的安全帽佩戴检测模型YOLO-S. 首先, 针对数据集类别不平衡问题, 设计混合场景数据增强方法, 使类别均衡化, 提高模型在复杂施工环境下的鲁棒性; 将原始YOLOv5s主干网络更改为MobileNetV2, 降低了网络计算复杂度. 其次, 对模型进行压缩, 通过在BN层引入缩放因子进行稀疏化训练, 判定各通道重要性, 对冗余通道剪枝, 进一步减少模型推理计算量, 提高模型检测速度. 最后, 通过知识蒸馏辅助模型进行微调得到YOLO-S. 实验结果表明, YOLO-S的召回率及mAP较YOLOv5s分别提高1.9%、1.4%, 模型参数量压缩为YOLOv5s的1/3, 模型体积压缩为YOLOv5s的1/4, FLOPs为YOLOv5s的1/3, 推理速度快于其他模型, 可移植性较高.

关键词: 安全帽佩戴检测, 数据增强, 模型压缩, 知识蒸馏

Abstract:

Traditional worker helmet wearing detection models commonly used at construction sites suffer from long processing times and high hardware requirements; the limited number of available training data sets for complex and changing environments, moreover, contributes to poor model robustness. In this paper, we propose a lightweight helmet wearing detection model—named YOLO-S—to address these challenges. First, for the case of unbalanced data set categories, a hybrid scene data augmentation method is used to balance the categories and improve the robustness of the model for complex construction environments; the original YOLOv5s backbone network is changed to MobileNetV2, which reduces the network computational complexity. Second, the model is compressed, and a scaling factor is introduced in the BN layer for sparse training. The importance of each channel is judged, redundant channels are pruned, and the volume of model inference calculations is further reduced; these changes help increase the overall model detection speed. Finally, YOLO-S is achieved by fine-tuning the auxiliary model for knowledge distillation. The experimental results show that the recall rate of YOLO-S is increased by 1.9% compared with YOLOv5s, the mAP of YOLO-S is increased by 1.4% compared with YOLOv5s, the model parameter is compressed to 1/3 of YOLOv5s, the model volume is compressed to 1/4 of YOLOv5s, FLOPs are compressed to 1/3 of YOLOv5s, the reasoning speed is faster than other models, and the portability is higher.

Key words: helmet-wearing detection, data augmentation, model compression, knowledge distillation

中图分类号: