Font Size: a A A

Face Mask Detection Based On Deep Learning

Posted on:2024-02-05Degree:MasterType:Thesis
Country:ChinaCandidate:G H DongFull Text:PDF
GTID:2568307106455244Subject:Electrical engineering
Abstract/Summary:PDF Full Text Request
Although the fatality rate in COVID-19 has greatly decreased,the virus strains are constantly mutating,which will have various effects on people’s health,especially for the elderly with basic diseases.Therefore,wearing masks in crowded places can protect their own safety as much as possible.Masks are required to be worn in some special places,such as hospital medical staff,in order to prevent pathogen infection;In order to prevent toxic gas inhalation,construction,textile and chemical personnel in low-quality air environment.Therefore,the target detection algorithm wearing masks once became a research hotspot in the field of computer vision.Due to a large number of small-size targets and occluded human targets,the detection accuracy and speed of mask target detection tasks are required to be higher.Aiming at the above problems,this paper puts forward an improved YOLO v4 target detection algorithm based on convolutional neural network,which improves the accuracy and speed of face mask detection.The main work is as follows:(1)The establishment and preprocessing of data sets,the data sets are from open source data sets WIDER Face,MAFA(Masked face),a small number of pictures taken on campus and downloaded from the Internet,totaling 6,500.There are 14,380 face samples with and without masks.Label Img image labeling tool is used for manual labeling for image preprocessing,including 8,560 negative samples(mask)and 5,820 positive samples(face).Mosaic data enhancement strategy is used to cut and splice the images.(2)Optimization of backbone network,introducing depth separable convolution,which reduces the parameter quantity of the whole model,and then greatly improves the speed of mask wearing detection.Then,the introduction of coordinated attention mechanism is introduced,which better improves its ability to capture smaller objects in a large range,increase its semantics and positioning,increase its receptive field,further improve its speed and slightly improve its accuracy.The feature fusion pyramid is improved,the SPP module is improved,and the output feature layer is added to detect small target images,which increases the receptive field and improves the detection accuracy.(3)Improvement of loss function,combining Focal loss with target detection algorithm,by multiplying the original YOLO v4 algorithm LOSS by the index which is easy to detect the target’s contribution to network training,thus solving the problem that LOSS is easily affected by a large number of negative samples under the premise of uneven positive and negative samples in target detection task,making the accuracy of single-stage target algorithm comparable to that of two-stage algorithm and having better detection speed.K-means++ clustering algorithm is used to cancel the cluster box randomly generated by the cluster center,and a sample is randomly selected as the initial cluster center in the data set,which makes the initial candidate box parameter value closer to the real value.Experiments show that the AP of the improved algorithm in this paper reaches89.23% and 98.04% under the premise of not wearing a mask and wearing a mask respectively,which is 10.09% and 5% higher than the original algorithm,7.55%higher than the m AP,and 7 frames higher than the FPS,which effectively improves the speed and accuracy of face mask detection.
Keywords/Search Tags:COVID-19 epidemic, Mask testing, YOLO v4, Attention mechanism, Feature fusion
PDF Full Text Request
Related items