An Improved Face Mask Detection Simulation Algorithm Based on YOLOv5 Model

An Improved Face Mask Detection Simulation Algorithm Based on YOLOv5 Model

Yue Qi, Yiqin Wang, Yunyun Dong
Copyright: © 2024 |Pages: 16
DOI: 10.4018/IJGCMS.343517
Article PDF Download
Open access articles are freely available for download

Abstract

This paper proposes an advanced approach for detecting faces with mask occlusion based on YOLOv5 to address various challenges encountered in face detection, including illumination blur and occlusion. The proposed methodology involves the integration of a convolutional block attention module into the backbone network and different network levels in the neck of the YOLOv5s. This approach enables the suppression of irrelevant features and emphasizes the identification of masked facial features. Replacing the conventional loss function with the Focal Loss function addresses the problem of sample imbalance. The enhanced YOLOv5s network was applied to detect mask-occluded faces. Empirical evaluations were conducted on the WIDER Face and AIZOO datasets. The simulation comparison results demonstrate that the proposed method achieves superior real-time detection performance, fulfilling the objective of developing a lightweight detection model.
Article Preview
Top

Introduction

Face recognition technology has developed rapidly in recent decades, driven by advancements in hardware precision and computer processing power (Wang et al., 2022). Convolutional neural networks have significantly developed, enhancing the accuracy of face recognition (Li et al., 2023). However, the outbreak of COVID-19 in 2019 urged people to wear masks. The large area of covered faces made the existing face recognition systems unable to correctly recognize faces (Liu et al., 2022). For example, facial recognition for phone unlocking and high-speed railway station ticket verification becomes inoperable when masks are worn (Wang et al., 2023). In scenarios where facial payment is required, password payment is also necessary (Yan et al., 2021). Currently, there are two main difficulties in facial recognition caused by mask occlusion. Firstly, facial recognition simulation algorithms achieve identity recognition by comparing facial features. Due to the opacity of the mask, the camera cannot capture the nose and mouth of the face. Therefore, the simulation system cannot accurately detect the position of the mask-occluded face and extract sufficient information (Chen et al., 2021). In addition, facial recognition algorithms based on deep learning technology rely on a large amount of data for training. However, there is almost no dataset available for training on occluded faces (Vukovic et al., 2021).

In the past two years, significant research has been conducted on mask-wearing efficacy to enhance epidemic prevention and control measures. Overall, these detection algorithms are divided into two types based on different application scenarios and purposes (Melkani & Maggu, 2021). The first type is detection at checkpoints, access control, and other locations. Personnel are close to the collection equipment, and the image quality obtained through the camera is high. An image only contains one face target. This application scenario has certain requirements for precision. The second type is suitable for crowded places with heavy traffic. This application scenario has many interfering factors and high difficulty. An image contains multiple scales of mask face targets, and most of them are small-scale (Oualla et al., 2021; Zheng & Xu, 2021). To solve real-time pedestrian, mask-wearing detection in such scenarios, various improved methods based on universal object detection models have been proposed to adapt to mask occlusion facial object detection (Guo et al., 2021). However, most existing simulation algorithms cannot obtain reliable detection results when facing difficult problems such as small-scale and complex-scene occlusion. Therefore, an improved mask occlusion face detection algorithm based on YOLOv5 is proposed in this paper. The innovation points of the proposed algorithm are summarized as follows:

  • 1)

    To focus on the key information of the face under mask occlusion, the proposed algorithm introduces the Convolutional Block Attention Module (CBAM). It is placed within the YOLOv5s network backbone on the P5 layer and within the neck section on both the P4 and P5 layers. This configuration aims to obtain more effective features for detection tasks and improve detection accuracy.

  • 2)

    Since the binary cross entropy loss function has unbalanced positive and negative samples, the proposed method is improved by using the Focal Loss function to balance samples and ensure the detection effect.

The remainder of this article is organized as follows. The next section, “Related Work,” outlines the advantages and disadvantages of existing detection algorithms. The following section is the “Method” of this article and discusses in detail the YOLOv5s network and improvement measures, as well as the detection process of masks blocking faces. Next, the “Results and Analysis” section verifies the effectiveness of the proposed algorithm through the WIDER Face and the AIZOO datasets. Lastly, the conclusion summarizes the proposed algorithm and analyzes future research directions.

Complete Article List

Search this Journal:
Reset
Volume 16: 1 Issue (2024)
Volume 15: 1 Issue (2023)
Volume 14: 4 Issues (2022): 2 Released, 2 Forthcoming
Volume 13: 4 Issues (2021)
Volume 12: 4 Issues (2020)
Volume 11: 4 Issues (2019)
Volume 10: 4 Issues (2018)
Volume 9: 4 Issues (2017)
Volume 8: 4 Issues (2016)
Volume 7: 4 Issues (2015)
Volume 6: 4 Issues (2014)
Volume 5: 4 Issues (2013)
Volume 4: 4 Issues (2012)
Volume 3: 4 Issues (2011)
Volume 2: 4 Issues (2010)
Volume 1: 4 Issues (2009)
View Complete Journal Contents Listing