Author:
Pan Xu,Liang Xiyin,Ma Zhen,Deng Pengfei
Abstract
Since the outbreak of the COVID-19 pandemic, standardized mask-wearing has become a powerful measure to combat the epidemic. Although the epidemic has been brought under control, vigilance in densely populated areas remains essential. Manual supervision is not only inefficient but also increases the risk of infection among relevant personnel. As a result, this paper proposes a lightweight real-time mask-wearing detection algorithm to monitor mask-wearing in crowds in real time. Built upon the YOLOv5 framework, the proposed algorithm replaces the backbone feature extraction network of the original model with an improved EfficientNetV2, reducing the model's parameter count and enhancing accuracy. The introduction of the ECA module in place of the SE module in the EfficientNetV2 network, coupled with the substitution of DIoU-NMS for the weighted NMS in the original model, further reduces model parameters and improves convergence. Additionally, this approach enhances the detection of occluded objects. Experimental results based on a publicly collected mask dataset demonstrate that the proposed algorithm reduces the model's parameter count by 44.7%, achieves a mAP of 95.3%, and attains an inference speed of 270.3 FPS. The algorithm introduced in this paper effectively identifies whether individuals are wearing masks correctly. Its lightweight nature makes it suitable for deployment on resource-constrained mobile devices, aligning well with post-pandemic epidemic prevention and control efforts in the era to come.