Abstract:Under the requirements of the normalization of the prevention and control of the covid-19 pandemic, the current mask-wearing detection device is affected by numerous factors, such as a large number of people in complex scenes, the easy obstruction of the gathering crowd, and the small size of the inspection target, which are prone to false detections and missing inspections. To solve the above problems, a mask-wearing detection algorithm based on YOLOv5 is proposed to realize real-time detection in complex scenes. Firstly, do Mosaic data enhancement and other processes on the data set. Then, apply the Focus process to remain more complete down sampling information of the images for subsequent feature extraction. Later, Feature enhancement using SPP fusion of multi-scale information and retain spatial information within Neck. Finally, considering the overlapping area, center point distance and aspect ratio between target frame and detection frame, CIoU Loss function is selected s to improve the positioning accuracy. And during the training process, a dynamic adjustment strategy is adopted for the learning rate. Experimental results show that the average accuracy of the improved algorithm reaches 99.3%.