{"title":"基于YOLOv5算法的口罩检测优化","authors":"Yang Fan, Wu Wang","doi":"10.33969/j-nana.2023.030201","DOIUrl":null,"url":null,"abstract":"The novel coronavirus has a strong ability to spread and survive. Wearing a mask correctly can effectively reduce the spread of the virus among the crowd. How to intelligently and efficiently detect the wearing of a mask is of great significance. Detecting whether to wear a mask is the target detection content that many researchers are currently studying. YOLOv5 (You Only Look Once) is an excellent algorithm in target detection. Given that detecting whether a mask is worn is different from other target detection tasks, in this paper, we tried to optimize YOLOv5 algorithm to make it more suitable for mask-wearing detection. In words, detection layers, attention mechanism were added, and proper loss function was chosen strictly to the YOLOv5 target detection algorithm. So that optimal YOLOv5 algorithm model was proposed. The accuracy rate (precision), recall rate (recall) and average precision (mAP) of the algorithm on the test set were 83%, 83.3% and 81.7% respectively, higher than YOLOv3, YOLOv4, YOLOv5 detection algorithm.","PeriodicalId":384373,"journal":{"name":"Journal of Networking and Network Applications","volume":"12 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Optimizing YOLOv5 algorithm for Mask-wearing Detection\",\"authors\":\"Yang Fan, Wu Wang\",\"doi\":\"10.33969/j-nana.2023.030201\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The novel coronavirus has a strong ability to spread and survive. Wearing a mask correctly can effectively reduce the spread of the virus among the crowd. How to intelligently and efficiently detect the wearing of a mask is of great significance. Detecting whether to wear a mask is the target detection content that many researchers are currently studying. YOLOv5 (You Only Look Once) is an excellent algorithm in target detection. Given that detecting whether a mask is worn is different from other target detection tasks, in this paper, we tried to optimize YOLOv5 algorithm to make it more suitable for mask-wearing detection. In words, detection layers, attention mechanism were added, and proper loss function was chosen strictly to the YOLOv5 target detection algorithm. So that optimal YOLOv5 algorithm model was proposed. The accuracy rate (precision), recall rate (recall) and average precision (mAP) of the algorithm on the test set were 83%, 83.3% and 81.7% respectively, higher than YOLOv3, YOLOv4, YOLOv5 detection algorithm.\",\"PeriodicalId\":384373,\"journal\":{\"name\":\"Journal of Networking and Network Applications\",\"volume\":\"12 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1900-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Networking and Network Applications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.33969/j-nana.2023.030201\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Networking and Network Applications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.33969/j-nana.2023.030201","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
新型冠状病毒具有很强的传播能力和生存能力。正确佩戴口罩可以有效减少病毒在人群中的传播。如何智能、高效地检测口罩佩戴情况具有重要意义。检测是否戴口罩是目前很多研究者正在研究的目标检测内容。YOLOv5 (You Only Look Once)是一种优秀的目标检测算法。鉴于检测口罩是否佩戴与其他目标检测任务不同,本文尝试对YOLOv5算法进行优化,使其更适合于口罩佩戴检测。即在YOLOv5目标检测算法中增加检测层、注意机制、严格选择合适的损失函数。为此,提出了最优的YOLOv5算法模型。该算法在测试集上的准确率(precision)、召回率(recall)和平均准确率(mAP)分别为83%、83.3%和81.7%,均高于YOLOv3、YOLOv4、YOLOv5检测算法。
Optimizing YOLOv5 algorithm for Mask-wearing Detection
The novel coronavirus has a strong ability to spread and survive. Wearing a mask correctly can effectively reduce the spread of the virus among the crowd. How to intelligently and efficiently detect the wearing of a mask is of great significance. Detecting whether to wear a mask is the target detection content that many researchers are currently studying. YOLOv5 (You Only Look Once) is an excellent algorithm in target detection. Given that detecting whether a mask is worn is different from other target detection tasks, in this paper, we tried to optimize YOLOv5 algorithm to make it more suitable for mask-wearing detection. In words, detection layers, attention mechanism were added, and proper loss function was chosen strictly to the YOLOv5 target detection algorithm. So that optimal YOLOv5 algorithm model was proposed. The accuracy rate (precision), recall rate (recall) and average precision (mAP) of the algorithm on the test set were 83%, 83.3% and 81.7% respectively, higher than YOLOv3, YOLOv4, YOLOv5 detection algorithm.