Lightweight Face Mask Detection Algorithm with Attention Mechanism

Yanhua Shao,Jiajia Ning,Huicao Shao,Duo Zhang,Hongyu Chu,Zhenwen Ren
DOI: https://doi.org/10.1016/j.engappai.2024.109077
IF: 8
2024-01-01
Engineering Applications of Artificial Intelligence
Abstract:Lightweight computer vision models with a better balance of speed and accuracy are critical for intelligent system devices. Wearing a mask correctly can effectively prevent the spread of respiratory diseases. However, most of the deep learning-based face mask detection(FMD) algorithms are too large and have limited accuracy, limiting their deployment in real-world application scenarios. Therefore, this paper proposes a novel object detector, lightweight FMD through You Only Look Once (LFMD-YOLO), which can achieve an excellent balance of precision and speed. First, the C3E(CSP Bottleneck with 3 convolutions-ECA) module and MECAPF(max-pooling ECA pyramid-fast) module based on the effective attention mechanism (ECA) are designed to enrich channel information. Further, a new backbone network combining C3E and MECAPF modules is proposed. Second, the weighted bidirectional feature pyramid network based on the C3E module (E-BiFPN) is designed as the feature fusion neck, making full use of multi-scale features to mine more local information and enhancing the representation of small objects of face masks. Third, the model performance is further enhanced by adding detection heads and improving intersection over union (IoU), etc. Finally, two public databases were benchmarked and compared with sixteen other state-of-the-art detection algorithms. The experimental results show that the proposed LFMD-YOLO achieves higher detection accuracy with mAPs of 68.7% and 60.1%, respectively, while having lower parameters and GFLOPs. In addition, we conducted experiments on the Jetson NVIDIA TX2 to further verify the effectiveness of the LFMD-YOLO. The code is available at https://github.com/ddhappy18/LFMD-YOLO.
What problem does this paper attempt to address?