| With the improvement of people’s awareness of wearing masks and the popularization of the good effect of wearing masks in preventing seasonal influenza,pneumonia and other diseases,it is particularly important to study the mask wearing detection algorithm in multi-application scenarios.In order to build an effective face mask detection algorithm,the following research is carried out based on YOLOv5s:(1)This paper proposes some optimization strategies for YOLOv5s: Improved K-means++ clustering method based on RDIo U is proposed,which overcomes the problem that GIo U degenerates into Io U,and clusters more accurate anchor box.Focal loss is introduced into the confidence loss of YOLOv5 s to control the weights of positive and negative samples and the weights of samples that are difficult to classify,which enhances the robustness of the model.Combining Soft-NMS to replace the traditional NMS algorithm,the convergence speed of the model is accelerated and the loss of training set and verification set is reduced.(2)In order to make the network more lightweight,this article proposes an improved YOLOv5 Lite algorithm based on Ghost Net,Channel Shuffle and Group Conv: YOLOv5 Lite Ghost.Conv module in Shuffle_Block is replaced by Ghost Conv module.Ordinary convolution in Neck is replaced by the Shuffle Conv module that combines the group convolution and the channel shuffle module.Compared with YOLOv5 s,YOLOv5-Lite-Ghost has improved the detection performance of side face targets,multiple targets,overlapping targets and small targets,with an increase of 2.80% in detection accuracy and 20.57% in detection speed.(3)In order to further improve the accuracy of the network model,this paper constructs an improved DA-YOLOv5 model.DA-YOLOv5 introduces D-CBAM module into PANet,which combines dilated convolution module and CBAM,to enhance the key information and suppress the redundant information.Finally,three feature layers of the feature enhancement are input to the ASFF detection to complete the detection.Compared with YOLOv5 s,the improved model improves the detection accuracy by 3% overall,and the detection speed by 19.98%.Besides,DA-YOLOv5 improves face mask detection performance in dense scenes and reduces the false detection rate,which is more suitable for face mask detection.This paper proposes two mask detection models: YOLOv5-Lite-Ghost and DA-YOLOv5.YOLOv5-Lite-Ghost mainly improves network lightweight for easy deployment on mobile devices;DA-YOLOv5 can balance detection speed and accuracy,making it more suitable for mask detection. |