| At the end of 2019,the novel coronavirus outbreak broke out across the world,causing serious harm to people’s health and seriously affecting our real life.The proper use of masks can be very effective in preventing the transmission of the Novel coronavirus from the air as we breathe in,thus effectively reducing the risk of infection.Nevertheless,there are still a number of people who,for various reasons,do not wear masks,which brings great trouble and risks to the epidemic prevention work and greatly increases the probability of transmission of the Novel coronavirus.In order to strengthen protection against COVID-19,a large number of medical staff have been deployed in almost all public places with heavy traffic,such as subways,railway stations,shopping malls and airports,to test the wearing of masks.For example,in office buildings and gated communities,it is not only necessary to detect whether people are wearing masks,but also to identify the identity of people who are wearing masks.At present,the human-oriented detection and identification method is too wasteful of human and material resources,and also a great waste of public resources.At the same time,this method of manual supervision is prone to miss and misdetection,and large areas of monitoring cannot be carried out.Instead,people can only be checked nearby,and distant people cannot be taken into consideratio.As a result,some people unconsciously wear masks when they are near the inspection place,which still poses a certain risk.With the rapid development of deep learning in recent years,its network performance is becoming more stable and powerful,and it has a better effect than machine learning in the field of computer vision.Therefore,the method based on deep learning is used for face mask wearing detection to realize the detection of people wearing masks,which can save manpower and material resources and achieve accurate and efficient detection.And deep learning-based facial mask recognition for face recognition in the case of mask wearing,which eliminates the need to remove the mask for identity authentication and avoids the risk of accidental spread of novel coronavirus in this process.It has great application value and practical significance for epidemic prevention and control under the current situation.In this paper,the main work is to study the face mask wearing detection algorithm and face mask recognition algorithm based on deep learning method,as follows:(1)The Faster R-CNN network has a poor ability to detect small scale targets.In the Faster R-CNN network,only the last feature layer of Res Net50 is used as the result of feature extraction,lacking sufficient spatial details.In this paper,three feature layers of different scales in Res Net50 are used to carry out multi-scale feature fusion based on them,which is then taken as the result of feature extraction to fully integrate low-level spatial information and high-level semantic information and enhance the feature extraction capability of the network.Then,aiming at the problem that the initial anchor size of the Faster R-CNN network is too large,which leads to the failure to accurately fit the real frame of small-scale targets in frame regression,the initial anchor size of the Faster R-CNN network is improved to make it more suitable for small-target detection.At the same time,clustering algorithm is used to cluster anchor size instead of manual adjustment,making anchor size more fit the real frame.The efficacy of the proposed multi-scale feature fusion Faster R-CNN network was verified by ablation experiments and contrast experiments on the face mask wearing detection dataset in this paper.(2)In view of the low accuracy of YOLOv4 network in the detection of small scale targets in the data set of this paper,this paper improves the feature pyramid structure by adding an effective feature layer and a detection head for detecting small scale targets,thus improving the detection performance of the network.At the same time,alpha-IOU loss with better performance than existing IOU loss is used to replace CIOU loss in the original YOLOv4 network,so as to improve the weight of high IOU targets in the training process and make the detection accuracy of the network higher.Finally,Triple-head was used to replace the detection Head of YOLOv4 network,and classification,location and confidence prediction were separated rather than carried out at the same time,so as to improve the prediction accuracy of the network.Ablation experiments and contrast experiments were conducted on the face mask wearing detection data set in this paper to effectively verify the improved algorithm proposed in this paper.(3)In face mask recognition task,mask occlusion will not only reduce the available face feature information in the picture,but also add useless mask features in the picture,which has a negative impact on face recognition.In this chapter,a face recognition algorithm combined with the attention mechanism is proposed.The attention mechanism module is used to change the weight of the region,so that the unmasked facial region is equipped with a larger weight,while the weight of the masked region is reduced,and the unmasked region is more fully utilized.Furthermore,the clipping method is used to remove most mask areas to reduce the negative impact of mask features on network identification accuracy.Through relevant ablation experiments and comparative experiments on the face mask recognition dataset in this paper,the proposed face recognition algorithm combined with attention mechanism is effectively verified. |