Face Mask Wearing Detection Based on YOLOv5

Yunshan Xie, Zhi-yi Hu, Jun-Peng Yu
{"title":"Face Mask Wearing Detection Based on YOLOv5","authors":"Yunshan Xie, Zhi-yi Hu, Jun-Peng Yu","doi":"10.2478/ijanmc-2022-0017","DOIUrl":null,"url":null,"abstract":"Abstract In recent years, COVID-19 has swept the world, and people in crowded public places are usually large. In order to reduce the risk of virus transmission, stop the spread of the epidemic and reduce cross-infection, wearing masks correctly has become an important measure to prevent the virus. Aiming at the time-consuming and laborious situation of wearing masks manually, this paper proposes a mask wearing detection method based on yolov5. The input layer is mainly used for mosaic data enhancement, that is, adaptive anchor box and adaptive image scaling technology; Yolov5 in backbone mainly adopts focus and CSP (cross stage partial) structure; The neck layer adopts spp (spatial pyramid pooling) module and FPN (feature pyramid networks) + pan (pixel aggregation network) structure; The output mainly adopts ciou for the bounding box loss function_Loss is the average index of NMS (non maximum suppression). This method uses 8000 preprocessed images as the data set and trains 200 epochs to get the final model. The algorithm visually displays the training and test results through tensor board, and inputs the pictures captured by the camera into the model to detect whether the face wears a mask. The accuracy, recall and mean accuracy (map) of the algorithm on the test set are 94.8%, 89.0% and 93.5% respectively, which are higher than the detection results of yolov3 and yolov4 algorithms.","PeriodicalId":193299,"journal":{"name":"International Journal of Advanced Network, Monitoring and Controls","volume":"125 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Journal of Advanced Network, Monitoring and Controls","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2478/ijanmc-2022-0017","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Abstract In recent years, COVID-19 has swept the world, and people in crowded public places are usually large. In order to reduce the risk of virus transmission, stop the spread of the epidemic and reduce cross-infection, wearing masks correctly has become an important measure to prevent the virus. Aiming at the time-consuming and laborious situation of wearing masks manually, this paper proposes a mask wearing detection method based on yolov5. The input layer is mainly used for mosaic data enhancement, that is, adaptive anchor box and adaptive image scaling technology; Yolov5 in backbone mainly adopts focus and CSP (cross stage partial) structure; The neck layer adopts spp (spatial pyramid pooling) module and FPN (feature pyramid networks) + pan (pixel aggregation network) structure; The output mainly adopts ciou for the bounding box loss function_Loss is the average index of NMS (non maximum suppression). This method uses 8000 preprocessed images as the data set and trains 200 epochs to get the final model. The algorithm visually displays the training and test results through tensor board, and inputs the pictures captured by the camera into the model to detect whether the face wears a mask. The accuracy, recall and mean accuracy (map) of the algorithm on the test set are 94.8%, 89.0% and 93.5% respectively, which are higher than the detection results of yolov3 and yolov4 algorithms.
基于YOLOv5的口罩佩戴检测
近年来,新型冠状病毒感染症(COVID-19)席卷全球,人群密集的公共场所通常人数众多。为了降低病毒传播的风险,阻止疫情的蔓延,减少交叉感染,正确佩戴口罩已成为预防病毒的重要措施。针对人工佩戴口罩耗时费力的情况,本文提出了一种基于yolov5的口罩佩戴检测方法。输入层主要用于拼接数据增强,即自适应锚盒和自适应图像缩放技术;骨干Yolov5主要采用焦点和CSP (cross stage partial)结构;颈部层采用spp(空间金字塔池化)模块和FPN(特征金字塔网络)+ pan(像素聚合网络)结构;输出主要采用ciou作为边界盒损失函数_loss为NMS的平均指数(非最大抑制)。该方法使用8000张预处理图像作为数据集,训练200次epoch得到最终模型。该算法通过张量板直观地显示训练和测试结果,并将摄像头拍摄的图片输入到模型中,检测人脸是否戴口罩。该算法在测试集上的准确率、召回率和平均准确率(map)分别为94.8%、89.0%和93.5%,均高于yolov3和yolov4算法的检测结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信