| With the spread of influenza virus,it has caused certain troubles to human daily life.Influenza virus is mainly transmitted through air droplets and contact.The spread of influenza virus can be blocked by wearing masks,measuring body temperature and keeping distance in crowded places.Blocking the spread of influenza virus by wearing a mask is the simplest and very effective measure.Therefore,it is very necessary to check the wearing of masks in crowded places.The use of human monitoring may cause the monitoring personnel to be infected with the virus.Therefore,it is necessary to use Efficient intelligent detection means for mask wearing detection,and the use of machines for mask wearing detection is very efficient.This paper proposes an improved mask wearing detection algorithm model based on YOLOv3-Tiny.The main work of the paper is as follows:(1)The self-labeled mask data set was used for mask detection training,verification and testing,with a total of 21,221 charts,including various mask wearing scenarios.The categories include correct mask wearing,non-wearing and incorrect mask wearing.(2)For the ReLU(Rectified Linear Unit)function will cause some neurons in the model to fail to activate during the training process,and the gradient will disappear.Use SMU(Smooth Maximum Unit)to replace ReLU,and adjust the optimal curve through custom parameters.Optimize the defect of ReLU function.(3)In view of the problem that the distance evaluation standard of the IOU(Intersection over Union)loss function is unreasonable between the predicted frame and the real frame,which leads to the problem of slow convergence of the network model,the loss function is replaced with DIOU(Distance-Io U)to solve The defect of IOU loss speeds up model convergence and improves detection accuracy.(4)As the YOLOv3-Tiny network is weak in small target detection,a spatial pyramid pooling(Spatial Pyramid Pooling,SPP)network structure is added to increase the mixed receptive field of the model to improve the model’s ability to detect small targets.For the problem of poor accuracy caused by insufficient focusing ability of small targets,the CA(Coordinate Attention)attention mechanism is added to increase the ability of the network to focus on the target of interest to improve the detection accuracy of the detected target.(5)Considering that the equipment in most mask detection scenarios has low computing power,the deployment model test on the Jetson Nano found that the speed is slow.By using depth-separable convolution to replace the standard convolution,the number of model parameters is reduced and the detection speed is improved.The improved YOLOv3-Tiny model was tested on mask detection and found that the improved model can correct the missed detection and false detection in the original model.The m AP(Mean Average Precision)was 82.14%,an increase of 4.12%,and the FPS(Frames Per Second)was 173.After optimizing the model parameters,the number of model parameters is reduced by 5561930,and the m AP is 81.67%,which is 3.65% higher than the original model.The test inference speed on the RTX 3060 is 334 FPS,and the test inference speed on the lowcomputing device Jetson Nano is 33 FPS,to meet the needs of real-time mask detection. |