The COVID-19 has lasted for three years.Since the epidemic became normalized,it is no longer required to wear masks at all times.However,wearing a mask can not only prevent the spread of the new coronavirus,but there are still many viruses that can be transmitted through droplets,aerosols and other carriers in the air,which are highly contagious.Therefore,there is still a need to wear masks for some closed places(such as subways,high-speed rails,and airplanes);in addition,some special workplaces(such as grinding workshops,dust-free workshops,hospitals)need to wear masks at all times for work.However,some people do not wear masks or even do not wear masks because of the inconvenience and discomfort of wearing masks.They have a fluke mentality,which greatly increases the risk of virus transmission.Therefore,it is essential to check and remind pedestrians to wear masks in public places.The manual inspection method is inefficient and slow,and is prone to false detection and missed detection.It has become an inevitable trend to use smart devices to automatically detect the wearing of face masks.Based on the deep learning method,the paper conducts research on the mask standard wearing recognition algorithm.The work content is as follows:(1)From the four large-scale face datasets,the pictures containing occluded targets,group targets,small targets,and different light targets were screened out.For the lack of unregulated wearing masks,related pictures were collected from the Internet as the data set of this paper and marked.Use YOLOv3,YOLOv4 and YOLOv5 three algorithms to train and predict on the self-made data set.According to the training results and prediction results,YOLOv5 has the highest accuracy rate and the fastest detection speed,but the detection effect on small targets and group targets There is still room for improvement.(2)The YOLOv5 network has been improved in view of the missed detection and false detection under multi-scene detection.First of all,in terms of data enhancement,the combination of Mosaic and Mixup data enhancement methods enhances the generalization ability of the model;secondly,in terms of network structure,ECANet attention mechanism is added to make the features of small targets on the shallow feature map.Get better expression,improve the detection accuracy of small targets,and reduce the missed detection rate;finally,optimize the network training by introducing the Wise-IoU loss function,let the network pay more attention to the learning of high IoU features,strengthen the extraction of features,and improve the detection performance of the model further improvement.The m AP of the final improved YOLOv5 algorithm reached87.31%,which is 2.84% higher than the m AP of the original YOLOv5.Effectively reduce the missed detection rate and false detection rate of each category.And promote the model in this paper,collect flame and smoke pictures as a data set and mark them,and use the improved YOLOv5 model for training and prediction,correctly identify smaller flame targets and smoke targets,and verify the effectiveness of the improved algorithm in this paper. |