School of Computer Science and Technology, Hefei Normal University, Hefei 230601, China.
Comput Intell Neurosci. 2022 Jul 12;2022:2452291. doi: 10.1155/2022/2452291. eCollection 2022.
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.
戴口罩检测对于疫情期间的安全防护具有重要意义。针对戴口罩检测中存在的遮挡、复杂光照、口罩密度等问题导致检测精度低的问题,本文提出了一种基于损失函数和注意力机制的神经网络模型,用于复杂环境下的戴口罩检测。在 YOLOv5s 的基础上,首先在特征融合过程中引入注意力机制,提高特征利用率,研究不同注意力机制(CBAM、SE、CA)对改进深度网络模型的效果,然后探讨不同边界框损失函数(GIoU、CIoU、DIoU)对戴口罩识别的影响。采用 CIoU 作为框回归损失函数,提高定位精度。通过收集 7958 张戴口罩图像和大量不戴口罩的人的图像作为数据集,并以 YOLOv5s 为基准模型,本文提出的模型在验证集上的 mAP 达到 90.96%,明显优于传统的深度学习方法。在真实环境中进行戴口罩检测,所提出方法的实验结果能够满足日常检测需求。