| The current situation regarding the prevention and control of the COVID-19 pandemic is still very severe,and the virus poses a threat to the health of people globally,causing a great impact on our social work and daily life.Airports,subway stations,stores,and other places where the flow of people is both dense and continuous,mask wear testing is usually implemented in the form of staff supervision,which can be labor-intensive and costly,detection efficiency is low,there may also be missed detection and can waste a lot of public resources.With the continuous growth of deep learning,many mask wearing detection algorithms have emerged.Existing models have the problems of large structure and slow detection speed,and they are still lacking in accuracy and real-time,which are not beneficial to endpoint deployment and cost control in practical application scenarios.In response to these questions,the thesis presents a study on lightweight mask wearing detection based on attention mechanism.Automated detection of masks through lightweight mask wear detection based on attention mechanism,which can solve the problems of large and complex model structure,many computational parameters and low detection efficiency,and also meet the demand of real-time detection in epidemic prevention and control scenarios.The main research elements of this thesis are as follows:(1)Ghost Net-based YOLOv4 lightweight mask wear detection model(GN-YOLOv4).For the problems of large and complex network structure,many parameters and slow detection speed in the mask wearing detection model,the GN-YOLOv4 model is proposed.First,the model by replacing the backbone of the original network with Ghost Net,the number of params in the model is reduced,reducing the calculation complication,thus increasing the speed of network detection.Then,the partial convolution in PANet of YOLOv4 was improved,which increases the perceptual field and allowing the number of model parameters to be further reduced.Experimental showed that the number of parameters and computation of the model is reduced by 60% and 76% compared to YOLOv4,and the detection speed is increased by 75%,resulting in lightweight and fast mask wear detection.(2)GN-YOLOv4 lightweight mask wear detection model based on attention mechanism(GN-Att-YOLOv4).Based on the GN-YOLOv4 model,GN-Att-YOLOv4 is proposed.The model first introduces a deep separable convolution and attention mechanism to improve some of the convolution modules in the backbone network,reducing the model computation and improve the detection speed.Then use Rep VGG network instead of all 3×3convolution operations of the Conv×5 convolution block to improve the feature extraction ability and detection accuracy of the model.Finally,a batch normalization strategy is introduced into the computation of the convolutional layer to further decrease the calculation complication of the model.The experiments show that the model improves both detection accuracy and detection speed,with 0.64% higher accuracy value and 99.9 FPS detection speed compared to GN-YOLOv4 model,which can be applied to more complex detection situations.(3)Prototype system design for mask wear detection based on GN-Att-YOLOv4.A mask wearing detection system was developed by using Python language programming and Pycharm development tool,and GN-YOLOv4 model research method based on attention mechanism.The system can automatically and quickly identify the mask wearing situation of people in pictures or videos,which has important application value. |