| Literature DB >> 35865498 |
Zhong Wang1, Wu Sun1, Qiang Zhu1, Peibei Shi1.
Abstract
Face mask-wearing detection is of great significance for safety protection during the epidemic. Aiming at the problem of low detection accuracy due to the problems of occlusion, complex illumination, and density in mask-wearing detection, this paper proposes a neural network model based on the loss function and attention mechanism for mask-wearing detection in complex environments. Based on YOLOv5s, we first introduce an attention mechanism in the feature fusion process to improve feature utilization, study the effect of different attention mechanisms (CBAM, SE, and CA) on improving deep network models, and then explore the influence of different bounding box loss functions (GIoU, CIoU, and DIoU) on mask-wearing recognition. CIoU is used as the frame regression loss function to improve the positioning accuracy. By collecting 7,958 mask-wearing images and a large number of images of people without masks as a dataset and using YOLOv5s as the benchmark model, the mAP of the model proposed in the paper reached 90.96% on the validation set, which is significantly better than the traditional deep learning method. Mask-wearing detection is carried out in a real environment, and the experimental results of the proposed method can meet the daily detection requirements.Entities:
Mesh:
Year: 2022 PMID: 35865498 PMCID: PMC9296297 DOI: 10.1155/2022/2452291
Source DB: PubMed Journal: Comput Intell Neurosci
Figure 1The proposed model network structure.
Figure 2Convolutional block attention module.
Figure 3Sample images from the dataset.
The performance of different attention mechanisms.
| Model | Precision (%) | Recall (%) | mAP@0.5 (%) |
|---|---|---|---|
| YOLOv5s + SE | 95.00 | 84.03 | 89.70 |
| YOLOv5s + CBAM | 94.78 | 85.56 | 90.95 |
| YOLOv5s + CA | 95.15 | 76.91 | 82.51 |
Figure 4Performance detection curves of different attention mechanisms.
The performance of different loss functions.
| Loss function | Precision (%) | Recall (%) | mAP@0.5 (%) |
|---|---|---|---|
| IoU | 93.99 | 84.15 | 89.68 |
| GIoU | 93.87 | 85.24 | 90.17 |
| DIoU | 94.57 | 83.51 | 90.21 |
| aIoU-2 | 95.13 | 85.06 | 89.87 |
| aIoU-3 | 95.05 | 90.78 | 89.01 |
| Varifocal | 96.20 | 86.23 | 90.78 |
| CIoU | 93.69 | 84.90 | 90.43 |
Figure 5Performance curves of different loss functions. (a) Precision. (b) Recall. (c) mAP@0.5.
Figure 6Detection results with different loss function. (a) Varifocal. (b) CIoU.
The performance of different models.
| Model | Precision (%) | Recall (%) | mAP@0.5 (%) |
|---|---|---|---|
| YOLOv3 | 95.73 | 78.01 | 86.11 |
| Faster R-CNN | 72.99 | 90.51 | 89.78 |
| YOLOv5s + CIoU | 93.69 | 84.90 | 90.43 |
| YOLOv5s + CBAM + CIoU | 94.68 | 85.63 | 90.96 |
Figure 7Detection results with the proposed model. (a) YOLOv5s + CIoU and (b) YOLOv5s + CBAM + CIoU.