Abstract:It is inefficient and highly risky to identify whether pedestrians are wearing a mask or not through naked eyes during the prevention and control of the COrona VIrus Disease 2019 (COVID-19). To solve this, we devise an algorithm to detect whether the pedestrians are wearing masks in the natural scenes with the improvement in the loss function of bounding box regression. The algorithm improves the YOLOv3 loss function and uses GIoU to calculate the bounding box loss to detect whether pedestrians wear masks in natural scenes. The algorithm is trained on the open-source WIDER FACE dataset and MAFA dataset. When the natural scene pictures are collected for testing, the mAP (mean Average Precision) of whether pedestrians wear masks is as high as 88.4%. In the detection of natural scene videos, the average number of frames per second is 38.69, which meets the requirements of real-time detection.