Research on face mask recognition based on YOLOv5 lightweight network
10.19745/j.1003-8868.2024166
- VernacularTitle:基于YOLOv5轻量化网络的人脸口罩识别方法研究
- Author:
Liang WEN
1
;
Jiang WANG
;
Guo-Biao LIANG
;
Zhen-Ni LI
Author Information
1. 北部战区总医院神经外科,沈阳 110016
- Keywords:
face mask recognition;
YOLOv5s model;
ShuffleNetv2;
lightweight network;
attention mechanism
- From:
Chinese Medical Equipment Journal
2024;45(9):7-13
- CountryChina
- Language:Chinese
-
Abstract:
Objective To propose a YOLOv5 lightweight network-based face mask recognition method to solve the problems due to limited storage and computation resources of edge and mobile devices.Methods A YOLOv5 model composed of a backbone network(Backbone),a neck module(Neck)and a head module(Head)was selected as the base framework.Firstly,the Backbone part was modified and replaced using the ShuffleNetv2 lightweight network;secondly,a Ghost module and a C3_S module were introduced in the Neck part;finally,a Shuffle_Yolo_GS_CBAM model was formed by incorporating a convolutional block attention module(CBAM)to improve the detection accuracy.The model was trained and verified with the AIZOO dataset,which was evaluated for face mask recognition by mean average precision(mAP),frames per second(FPS),giga floating-point operations per second(GFLOPS)and parameters.Results The model proposed recognized face masks with the mAP being 89.5%,FPS being 158.7 frames/s,parameters being 2.38 M and and GFLOPS being 4.5 GFLOPS,which had the detection speed enhanced by 39.7%,parameters decreased by 67.3%and operations reduced by73.8%when compared with the YOLOv5s model.Conclusion The method proposed behaves well in increasing detection speed,decreasing parameters and operations and ensuring detection precision,and thus is worthy promoting for face mask recognition on edge and mobile devices.[Chinese Medical Equipment Journal,2024,45(9):7-13]