Jie ZHU, Jian-li WANG, Bin WANG. Lightweight mask detection algorithm based on improved YOLOv4-tiny[J]. Chinese journal of liquid crystals and displays, 2021, 36(11): 1525-1534.
DOI:
Jie ZHU, Jian-li WANG, Bin WANG. Lightweight mask detection algorithm based on improved YOLOv4-tiny[J]. Chinese journal of liquid crystals and displays, 2021, 36(11): 1525-1534. DOI: 10.37188/CJLCD.2021-0059.
Lightweight mask detection algorithm based on improved YOLOv4-tiny
新冠疫情防控期间,为防止病毒扩散,需要在机场、车站等公共场所对人流的口罩佩戴情况实施管控。为了高效地监测人流的口罩佩戴情况,提出了一种基于YOLOv4-tiny改进的轻量级口罩检测算法。在YOLOv4-tiny的骨干网络之后引入空间金字塔池化结构,对输入特征层进行多尺度池化并融合,同时大幅增强网络的感受野。结合路径聚合网络,分两条路径将不同尺度的特征层相互融合、反复增强,以提升特征层对目标的表达能力。使用标签平滑策略优化了网络损失函数,以抑制网络训练过程中的过拟合问题。实验结果表明,该算法在口罩目标和人脸目标上的检测精度分别达到了94.7%和85.7%,相比于YOLOv4-tiny分别提高了4.3%和7.1%,实时检测速度达到76.8 FPS (on GeForce GTX 1050Ti),满足了多种场景下口罩检测任务的检测精度与实时性要求。
Abstract
During the period of 2019-nCoV controlling
to prevent the spread of the virus
it is necessary to regulate the coverage of mask wearing in densely populated places such as airports and stations. In order to effectively monitor the coverage of mask wearing of crowd
this paper proposes a lightweight mask detection algorithm based on improved YOLOv4-tiny. Following the backbone network of YOLOv4-tiny
a spatial pyramid pooling structure is introduced to pool and fuse the input features at multi-scale
which makes the receptive field of the network enhanced. Then
combined with the path aggregation network
multi-scale features are fused and enhanced repeatedly in two paths to improve the expressive ability of feature maps. Finally
label smoothing is utilized to optimize the loss function for modifying the over-fitting problem in the training process. The experimental results show that the proposed algorithm achieves 94.7% AP and 85.7% AP on mask target and face target respectively (at real-time speed of 76.8 FPS on GeForce GTX 1050ti)
which is 4.3% and 7.1% higher than that of YOLOv4-tiny. The proposed algorithm meets the accuracy and real-time requirements of mask detection tasks in various scenes.
关键词
Keywords
references
REDMON J, DIVVALA S, GIRSHICK R, et al . You only look once: unified, real-time object detection[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Las Vegas: IEEE, 2016: 779-788.
REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Honolulu: IEEE, 2017: 6517-6525.
REDMON J, FARHADI A. Yolov3: an incremental improvement[J]. arXiv : 1804.02767, 2018.
BOCHKOVSKIY A, WANG C Y, LIAO H Y M. Yolov4: optimal speed and accuracy of object detection[J]. arXiv : 2004.10934, 2020.
WANG C Y, BOCHKOVSKIY A, LIAO H Y M. Scaled-YOLOv4: scaling cross stage partial network[J]. arXiv : 2011.08036, 2020.
R GIRSHICK , J DONAHUE , T DARRELL , 等 . Region-based convolutional networks for accurate object detection and segmentation . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2016 . 38 ( 1 ): 142 - 158 . DOI: 10.1109/TPAMI.2015.2437384 http://doi.org/10.1109/TPAMI.2015.2437384 .
GIRSHICK R. Fast R-CNN[C]// Proceedings of the IEEE International Conference on Computer Vision . Santiago: IEEE, 2015: 1440-1448.
S Q REN , K M HE , R GIRSHICK , 等 . Faster R-CNN: towards real-time object detection with region proposal networks . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2017 . 39 ( 6 ): 1137 - 1149 . DOI: 10.1109/TPAMI.2016.2577031 http://doi.org/10.1109/TPAMI.2016.2577031 .
A CABANI , K HAMMOUDI , H BENHABILES , 等 . MaskedFace-Net-a dataset of correctly/incorrectly masked face images in the context of COVID-19 . Smart Health , 2021 . 19 100144 DOI: 10.1016/j.smhl.2020.100144 http://doi.org/10.1016/j.smhl.2020.100144 .
WANG Z Y, WANG G C, HUANG B J, et al . Masked face recognition dataset and application[J]. arXiv : 2003.09093, 2020.
Z D NIU , T QIN , H D LI , 等 . Improved algorithm of RetinaFace for natural scene mask wear detection . Computer Engineering and Applications , 2020 . 56 ( 12 ): 1 - 7 . https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG202012002.htm https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG202012002.htm .
Y H WANG , H W DING , B LI , 等 . Mask wearing detection algorithm based on improved YOLOv3 in complex scenes . Computer Engineering , 2020 . 46 ( 11 ): 12 - 22 . https://www.cnki.com.cn/Article/CJFDTOTAL-JSJC202011002.htm https://www.cnki.com.cn/Article/CJFDTOTAL-JSJC202011002.htm .
LIN T Y, MAIRE M, BELONGIE S, et al . Microsoft COCO: common objects in context[C]//13 th European Conference on Computer Vision . Zurich: Springer, 2014: 740-755.
K M HE , X Y ZHANG , S Q REN , 等 . Spatial pyramid pooling in deep convolutional networks for visual recognition . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2015 . 37 ( 9 ): 1904 - 1916 . DOI: 10.1109/TPAMI.2015.2389824 http://doi.org/10.1109/TPAMI.2015.2389824 .
LIU S, QI L, QIN H F, et al . Path aggregation network for instance segmentation[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Salt Lake City: IEEE, 2018: 8759-8768.
LIN T Y, DOLLÁR P, GIRSHICK R, et al . Feature pyramid networks for object detection[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Honolulu: IEEE, 2017: 936-944.
MVLLER R, KORNBLITH S, HINTON G. When does label smoothing help?[J]. arXiv : 1906.02629, 2019.
WANG C Y, LIAO H Y M, WU Y H, et al . CSPNet: a new backbone that can enhance learning capability of CNN[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops . Seattle: IEEE, 2020: 1571-1580.
Z H ZHENG , P WANG , W LIU , 等 . Distance-IoU loss: faster and better learning for bounding box regression . Proceedings of the AAAI Conference on Artificial Intelligence , 2020 . 34 ( 7 ): 12993 - 13000 . DOI: 10.1609/aaai.v34i07.6999 http://doi.org/10.1609/aaai.v34i07.6999 .
LIU W, ANGUELOV D, ERHAN D, et al . SSD: single shot multibox detector[C]//14 th European Conference on Computer Vision . Amsterdam: Springer, 2016: 21-37.
SIMONYAN K, ZISSERMAN A. Very deep convolutional networks for large-scale image recognition[J]. arXiv : 1409.1556, 2014.