Contact Us Search Paper

Optimizing YOLOv5 algorithm for Mask-wearing Detection

Yang Fana, Wu Wangb

Corresponding Author:

Wu Wang

Affiliation(s):

School of Mathematics and Computer Science, Yunnan Minzu University, 2929# Yuehua Street, Kunming, 650500, China

a. [email protected], b. [email protected]


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.

Keywords:

COVID-19, target detection, mask-wearing detection, YOLOv5, attention mechanism

Downloads: 64 Views: 411
Cite This Paper:

Yang Fan, Wu Wang (2023). Optimizing YOLOv5 algorithm for Mask-wearing Detection. Journal of Networking and Network Applications, Volume 3, Issue 2, pp. 58–65. https://doi.org/10.33969/J-NaNA.2023.030201.

References:

[1] Liu, Shao, Sos S. Agaian. ”COVID-19 face mask detection in a crowd using multi-model based on YOLOv3 and hand-crafted features.” Multi-modal Image Exploitation and Learning 2021. Vol. 11734. SPIE, 2021.

[2] Mercaldo, Francesco, Antonella Santone. ”Transfer learning for mobile real-time face mask detection and localization.” Journal of the American Medical Informatics Association 28.7 (2021): 1548-1554.

[3] Arya, Chandrakala, H Pandey,et al. ”Object detection using deep learn-ing: A review.” Journal of Physics: Conference Series. Vol. 1854. No.

1. IOP Publishing, 2021.

[4] Feng, Guochen, Chen, Yanyan, Chen, Ning et al. ”Research on Au-tomatic Helmet Recognition Technology Based on Machine Vision.” Mechanical Design and Manufacturing Engineering 44.10 (2015): 39-42.

[5] Li, Meiling, Wang, Fu, Jing HuiXiao et al. ”Road Extraction of High-Resolution Remote Sensing Imagery.” Remote Sensing Information 31.2 (2016): 64-68.

[6] Zhang, Xiubao, Lin, Ziyuan, Tian, Wangxin et al. ”Face Wearing Mask Recognition Technology in All-weather Natural Scenes.” Science China:Information Science 50.7(2020):11.

[7] Xu, Yunhui, Cao, Yilin, Liu, Yiwei. ”Research on pedestrian detection based on improved SSD algorithm.” 2021 international conference on information science, parallel and distributed systems (ISPDS). IEEE, 2021.

[8] Deng, Huangxiao. ”Method of mask wearing detection based on transfer learning and RetinaNet.” Electronic Technology and Software Engineer-ing 5 (2020): 209-211.

[9] Wang, Yihao, Ding, Hongwei, Li, Bo, Yang, Zhijun et al. ”Mask wearing detection algorithm based on improved YOLOv3 in complex scenes.” Computer engineering 46.11 (2020): 12-22.

[10] Tan, Shilei, Lu, Gonglin, Jiang, Ziqiang, Huang,Li. ”Improved YOLOv5 network model and application in safety helmet detection.” 2021 IEEE International Conference on Intelligence and Safety for Robotics (ISR). IEEE, 2021.

[11] Redmon J, Divvala S, Girshick R et al. ”You only look once: Unified, real-time object detection.” Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.

[12] Bochkovskiy, Alexey, Wang, Chienyao, Liao, Hongyuan. ”Yolov4: Optimal speed and accuracy of object detection.” arXiv preprint arXiv:2004.10934 (2020).

[13] Shi,Wenzhe, Jose Caballero, Ferenc Husz´ar et al. ”Real-time single im-age and video super-resolution using an efficient sub-pixel convolutional neural network.” Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.

[14] Hu, Jie, Li, Shen, Sun, Gang. ”Squeeze-and-excitation networks.” Pro-ceedings of the IEEE conference on computer vision and pattern recognition. 2018.

[15] Yu, Caixia, Zhao, Jingtao, Wang, Yanfei. ”Seismic detection method for small-scale discontinuities based on dictionary learning and sparse representation.” Journal of Applied Geophysics 137 (2017): 55-62.

[16] Gavrila, Dariu M., Stefan Munder. ”Multi-cue pedestrian detection and tracking from a moving vehicle.” International journal of computer vision 73 (2007): 41-59.

[17] Jiang, BoruiLuo, Rui,xuanMao, JiayuanXiao et al. ”Acquisition of localization confidence for accurate object detection.” Proceedings of the European conference on computer vision (ECCV). 2018. for object detection and instance segmentation.” IEEE Transactions on Cybernet-ics 52.8 (2021): 8574-8586.

[18] Sethi, Shilpa, Mamta Kathuria, Trilok Kaushik. ”Face mask detec-tion using deep learning: An approach to reduce risk of Coronavirus spread.” Journal of biomedical informatics 120 (2021): 103848.

[19] Tzutalin, D. ”tzutalin/labelImg.” (2015).

[20] Zheng, Zhaohui, Wang, PingWei, Liu,Li, Ye, Jinze et al. ”Distance-IoU loss: Faster and better learning for bounding box regression.” Proceed-ings of the AAAI conference on artificial intelligence. Vol. 34. No. 07. 2020.