Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (8): 62-69.DOI: 10.3778/j.issn.1002-8331.2009-0356

Previous Articles     Next Articles

Mask Detection Algorithm Based on Improved YOLO Lightweight Network

WANG Bing, LE Hongxia, LI Wenjing, ZHANG Menghan   

  1. 1.School of Computer Science, Southwest Petroleum University, Chengdu 610500, China
    2.Chengdu Branch of China Telecom Corporation Limited, Chengdu 610051, China
    3.Scholl of Information and Software Engineering, University of Electronic Science and Technology, Chengdu 610500, China
  • Online:2021-04-15 Published:2021-04-23



  1. 1.西南石油大学 计算机科学学院,成都 610500
    2.中国电信股份有限公司 成都分公司,成都 610051
    3.电子科技大学 信息与软件工程学院,成都 610500


Aiming at the problem of insufficient feature extraction and low feature utilization in mask wearing detection tasks in the current YOLO lightweight network, a lightweight network algorithm based on improved YOLOv4-tiny is proposed. It increases the Max Module structure to obtain more main features of the target and improves the detection accuracy. A bottom-up multi-scale fusion is proposed, which combines low-level information to enrich the feature level of the network to improve feature utilization. It uses CIoU as the bounding box regression loss function to speed up model convergence. Compared with the original algorithm, in the public data set PASCAL VOC and mask wearing detection tasks, mAP is increased by 4.9 percentage points and 3.3 percentage points, respectively, and the detection rate reaches 74 frame/s and 64 frame/s, respectively, which meets the accuracy and real-time performance of mask wearing detection tasks.

Key words: mask wearing detection, YOLOv4-tiny, Max Module structure, multi-scale fusion, CIoU


针对目前YOLO轻量网络在口罩佩戴检测任务中出现的特征提取不足和特征利用率不高的问题,提出了一种基于改进YOLOv4-tiny的轻量化网络算法。增加Max Module结构以获取更多目标的主要特征,提高检测准确率。提出自下而上的多尺度融合,结合低层信息丰富网络的特征层次,提高特征利用率。使用CIoU作为边框回归损失函数,加快模型收敛速度。相较于原算法,在公开数据集PASCAL VOC和口罩佩戴检测任务中,mAP分别提高4.9个百分点和3.3个百分点,检测速率分别达到74 frame/s和64 frame/s,满足口罩佩戴检测任务的准确率和实时性。

关键词: 口罩佩戴检测, YOLOv4-tiny, Max Module结构, 多尺度融合, CIoU