应用科学学报 ›› 2022, Vol. 40 ›› Issue (1): 93-104.doi: 10.3969/j.issn.0255-8297.2022.01.009

• 计算机应用专辑 • 上一篇    下一篇

基于Mask-YOLO的复杂场景口罩佩戴检测

魏明军1,2, 周太宇1, 纪占林1,2, 张鑫楠1   

  1. 1. 华北理工大学 人工智能学院, 河北 唐山 063210;
    2. 华北理工大学 河北省工业智能感知重点实验室, 河北 唐山 063210
  • 收稿日期:2021-10-27 出版日期:2022-01-28 发布日期:2022-01-28
  • 通信作者: 魏明军,教授,研究方向为图像处理、信息安全技术。E-mail:109849249@qq.com E-mail:109849249@qq.com
  • 基金资助:
    科技部重点研发项目基金(No.2017YFE0135700)资助

Mask Wearing Detection in Complex Scenes Based on Mask-YOLO

WEI Mingjun1,2, ZHOU Taiyu1, JI Zhanlin1,2, ZHANG Xinnan1   

  1. 1. College of Artificial Intelligence, North China University of Science and Technology, Tangshan 063210, Hebei, China;
    2. Hebei Provincial Key Laboratory of Industrial Intelligent Perception, North China University of Science and Technology, Tangshan 063210, Hebei, China
  • Received:2021-10-27 Online:2022-01-28 Published:2022-01-28

摘要: 针对公共场所口罩佩戴检测存在遮挡、密集和小尺度的情况而导致检测精度不高的问题,以实时目标检测算法YOLOv3为基础提出一种Mask-YOLO算法。首先在特征融合过程中引入通道注意力机制以突出重要特征,减少了融合后冗余特征的影响,有效提高了特征利用率;然后以完全交并比(complete intersection over union,CIoU)损失代替均方差损失(mean square error,MSE)作为边框回归的损失函数,提高了定位精度;最后除了检测佩戴和未佩戴口罩的情况外,还对不正确佩戴口罩的情况进行了检测。实验结果表明:与YOLOv3算法相比,Mask-YOLO算法在每秒帧率(frame per second,FPS)仅下降1%的情况下使平均精度均值(mean average precision,mAP)提高了4.78%。与其他主流的目标检测算法相比,Mask-YOLO算法在复杂场景下对口罩佩戴检测也有更好的效果和鲁棒性。

关键词: 口罩佩戴检测, Mask-YOLO, 注意力机制, 特征融合, 损失函数

Abstract: Aiming at the problem of low detection accuracy caused by occlusion, density and small scale in mask wearing detection in public places, a Mask-YOLO algorithm is proposed based on real-time target detection algorithm YOLOv3. First, the algorithm introduces channel attention mechanism in the process of feature fusion, effectively highlights the important features, reduces the influence of redundant features after fusion, and effectively improves the feature utilization. Then, complete intersection over union (CIoU) loss is used instead of mean square error (MSE) as the loss function of frame regression to improve the positioning accuracy. Finally, in addition to the cases of detecting wearing and not wearing masks, incorrect wearing of masks is also detected. Experimental results show that Mask-YOLO algorithm improves mean average precision (mAP) by 4.78% when frame per second (FPS) decreases by only 1% compared with YOLOv3 algorithm. As compared with other mainstream target detection algorithms, Mask-YOLO algorithm also has better detection effect and robustness for mask wearing detection in complex scenes.

Key words: mask wearing detection, Mask-YOLO, attention mechanism, feature fusion, loss function

中图分类号: