PDF (1030K)
摘要
新冠疫情期间,正确佩戴口罩可以有效防止疫情扩散,传统的图像处理算法不能很好地对口罩佩戴进行检测,而经典的深度学习模型直接用于口罩佩戴的检测时精度低,收敛速度慢,效果不甚理想.针对上述问题,在YOLOv5模型的基础上,引入了CBAM注意力机制,解决模型的特征提取能力弱的问题;嵌入C2f结构,解决C3模块特征提取效率低的问题,进一步提高模型的检测精度和速度;使用SIoU损失函数替换GIoU损失函数,解决检测框定位不准确的问题.实验结果表明,与原始YOLOv5s模型相比,其mAP值提升了2.3%,参数量减少了14.13%,FPS提升了18.19%.
Abstract
During the COVID-19 epidemic, proper mask wearing can effectively prevent the spread of the epidemic. Traditional image processing algorithms cannot detect mask wearing well, while the classical deep learning model is less effective when directly used for the detection of mask wearing with low detection accuracy and slow convergence speed. To address the above problems, this paper, on the basis of the YOLOv5 model, solves the problem of weak feature extraction ability of the model by introducing the CBAM attention mechanism; embeds the C2f structure to solve the problem of low feature extraction efficiency of the C3 module and further improves the detection accuracy and speed of the model; uses the SIoU loss function to replace the GIoU loss function to solve the problem of inaccurate detection frame localization. The experimental results show that compared with the original YOLOv5s model, the mAP of this paper's method is improved by 2.3%, the parameters are reduced by 14.13% and the FPS is improved by 18.19%, which proves that this paper’s method has better effect on mask wearing detection.
关键词
Key words
[Author(id=1305171451486102460, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1305171451549017025, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, authorId=1305171451486102460, language=EN, stringName=Xuan GUO, firstName=Xuan, middleName=null, lastName=GUO, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Electrical and Electronic Engineering, Hubei Univ. of Tech. , Wuhan 430068, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1305171451595154373, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, authorId=1305171451486102460, language=CN, stringName=郭旋, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=湖北工业大学 电气与电子工程学院 , 湖北武汉 430068, bio={"content":"郭旋(1996-),男,湖北武汉人,湖北工业大学硕士研究生,研究方向为深度学习、目标检测.
"}, bioImg=null, bioContent=郭旋(1996-),男,湖北武汉人,湖北工业大学硕士研究生,研究方向为深度学习、目标检测.
, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1305171451406410679, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, xref=null, ext=[AuthorCompanyExt(id=1305171451423187896, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, companyId=1305171451406410679, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Electrical and Electronic Engineering, Hubei Univ. of Tech. , Wuhan 430068, China), AuthorCompanyExt(id=1305171451435770809, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, companyId=1305171451406410679, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=湖北工业大学 电气与电子工程学院 , 湖北武汉 430068)])]), Author(id=1305171451645486024, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1305171451704206284, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, authorId=1305171451645486024, language=EN, stringName=Xianjun ZHOU, firstName=Xianjun, middleName=null, lastName=ZHOU, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Electrical and Electronic Engineering, Hubei Univ. of Tech. , Wuhan 430068, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1305171451758732238, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, authorId=1305171451645486024, language=CN, stringName=周先军, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=湖北工业大学 电气与电子工程学院 , 湖北武汉 430068, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1305171451406410679, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, xref=null, ext=[AuthorCompanyExt(id=1305171451423187896, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, companyId=1305171451406410679, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Electrical and Electronic Engineering, Hubei Univ. of Tech. , Wuhan 430068, China), AuthorCompanyExt(id=1305171451435770809, tenantId=1045748351789510663, journalId=1155139928303341810, articleId=1305171450403972016, companyId=1305171451406410679, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=湖北工业大学 电气与电子工程学院 , 湖北武汉 430068)])])]
郭旋,周先军.
基于改进YOLOv5的人脸口罩佩戴检测方法研究[J].
湖北工业大学学报, 2026, 41(4): 1-6 DOI:
| [1] |
Liu W, Anguelov D, Erhan D, et al. Ssd: single shot multibox detector[C]// Computer Vision-ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part I 14. Springer International Publishing, 2016: 21-37.
|
| [2] |
Lin T Y, Goyal P, Girshick R, et al. Focal loss for dense object detection[C]// Proceedings of the IEEE international conference on computer vision. 2017: 2980-2988.
|
| [3] |
Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[J]. IEEE Computer Society, 2014. DOI: 10.1109/CVPR.2014.81.
|
| [4] |
Girshick R. Fast R-CNN[J]. Computer Science, 2015. DOI: 10.1109/ICCV.2015.169.
|
| [5] |
He K, Gkioxari G, Piotr Dollár, et al. Mask R-CNN[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017. DOI: 10.1109/TPAMI.2018.2844175.
|
| [6] |
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. 2016: 779-788.
|
| [7] |
Edmon J, Farhadi A. YOLO9000: better, faster, stronger[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2017: 7263-7271.
|
| [8] |
Redmon J, Farhadi A. YOLOv3: an incremental improvement[EB/OL]. (2018-04-08)[2021-11-01]. https://arxiv.org/abs/1804.02767.
|
| [9] |
Bochkovskiy A, Wang C Y, Liao H Y M. Yolov4: optimal speed and accuracy of object detection[J]. arXiv preprint arXiv: 2004.10934, 2020.
|
| [10] |
程长文, 陈玮, 陈劲宏, 等. . 改进YOLO的口罩佩戴实时检测方法[J]. 电子科技, 2023, 36(02): 8.
|
| [11] |
Loey M, Manogaran G, Taha M H N, et al. Fighting against COVID-19: A novel deep learning model based on YOLO-v2 with ResNet-50 for medical face mask detection[J]. Sustainable cities and society, 2021, 65: 102600.
|
| [12] |
陈继平, 陈永平, 谢懿, 等. . Ghost-YOLO: 轻量化口罩人脸检测算法[J]. 信号处理, 2022, 38(09): 1954-1964.
|
| [13] |
何义, 李捍东. 基于改进YOLOv5模型的复杂场景口罩佩戴识别[J]. 微处理机, 2022(002): 043.
|
| [14] |
Mnih V, Heess N, Graves A. Recurrent models of visual attention[J]. Advances in neural information processing systems, 2014, 27: 2204-2212.
|
| [15] |
Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[J]. Advances in neural information processing systems, 2017, 30: 5998-6008.
|
| [16] |
Woo S, Park J, Lee J Y, et al. Cbam: convolutional block attention module[C]// Proceedings of the European conference on computer vision (ECCV), 2018: 3-19.
|
| [17] |
Zhang X, Zeng H, Guo S, et al. Efficient long-range attention network for image super-resolution[C]// Computer Vision-ECCV 2002: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XⅦ. Cham: Springer Nature Switzerland, 2022: 649-667.
|
| [18] |
Rezatofighi H, Tsoi N, Gwak J Y, et al. Generalized intersection over union: a metric and a loss for bounding box regression[C]// 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2019. DOI: 10.1109/CVPR.2019.00075.
|
| [19] |
Chen D, Miao D. Control distance iou and control distance IoU loss function for better bounding box regression[J]. Pattern Recognition, 2021. DOI: 10.48550/arXiv.2103.11696.
|
基金资助
国家自然科学基金项目(61901165)
国家自然科学基金项目(61601177)
湖北省自然科学基金项目(2019CFB530)