Related Experiment Video
Updated: Sep 4, 2025

06:37
Author Spotlight: Addressing Technical and Subjective Challenges in Measuring Classroom Attention
Published on: December 15, 2023
4.0K
Face Mask-Wearing Detection Model Based on Loss Function and Attention Mechanism.
Zhong Wang1, Wu Sun1, Qiang Zhu1
1School of Computer Science and Technology, Hefei Normal University, Hefei 230601, China.
Computational Intelligence and Neuroscience
|July 22, 2022
Summary
This study enhances face mask detection accuracy in complex environments using a YOLOv5s model with an attention mechanism and CIoU loss. The improved model achieves 90.96% mAP, significantly outperforming traditional methods for real-world safety applications.
Area of Science:
- Computer Vision
- Artificial Intelligence
- Deep Learning
Background:
- Face mask detection is crucial for public health and safety, especially during epidemics.
- Existing methods struggle with accuracy due to occlusion, varied lighting, and crowded scenes.
Purpose of the Study:
- To develop a robust neural network model for accurate face mask detection in challenging environments.
- To improve feature utilization and positioning accuracy in mask detection systems.
Main Methods:
- An enhanced YOLOv5s model incorporating attention mechanisms (CBAM, SE, CA) and CIoU loss function was proposed.
- A custom dataset of 7,958 mask-wearing images and unlabeled images was curated.
- The model's performance was evaluated using mean Average Precision (mAP) on a validation set.
Main Results:
- The proposed model achieved a mAP of 90.96% on the validation set, surpassing traditional deep learning approaches.
- Integration of attention mechanisms and CIoU loss significantly boosted detection accuracy.
- The model demonstrated effectiveness in real-world scenarios, meeting daily detection needs.
Conclusions:
- The novel YOLOv5s-based model offers superior performance for face mask detection in complex conditions.
- The findings suggest the model's viability for real-time safety monitoring and epidemic control.
- Attention mechanisms and advanced loss functions are key to improving object detection accuracy.

