Masked Face Recognition Model

Sankar Murugesan
4 min readJan 29, 2021
Masked Face Recognition Model

Face Recognition is becoming a new trend in the security authentication systems. With the recent world-wide COVID-19 pandemic, using face masks have become an important part of our lives. People are encouraged to cover their faces when in public area to avoid the spread of infection. The use of these face masks has raised a serious question on the accuracy of the facial recognition system used for tracking school/office attendance. Face alterations and the presence of different masks make it too much challenging.

The primary concern to this work is about facial masks, and especially to enhance the recognition accuracy of different masked faces. A feasible approach has been proposed that consists of first detecting the facial regions

1. Data Processing

Due to lack of the masked face dataset, we propose using simulated masked face to train a deep network for face recognition through our open-source masking tool “MaskTheFace”

· Open-source tool “MaskTheFace” to generate masked face dataset from face dataset with extended feature support

· Using custom code, convert the unmasked face dataset into masked face dataset.

All faces in images and their landmarks will be detected by Multi-task Cascaded Convolutional Networks (MTCNN) algorithms We will use two eyes as landmarks for similarity transformation. When the detection fails, we simply discard the image. Dataset will be included web-collected training data, Real-world Masked Face Recognition Dataset (RMFRD). After removing the images with identities appearing in testing datasets

Dataset

2.Mask Face Recognition

We select the state-of-the-art deep network-based face recognition system Facenet . Facenet creates unified embeddings of the faces and then compares the faces in the embedding space to carry out decision making. We used the dlib library based face landmarks detector to identify the face tilt and six key features( eyes, nose, lips, face edges etc.,) of the face necessary for applying mask. The template mask is then transformed based on the six key features to fit perfectly on the face. Our model will convert those face features in encoding mappings. We will get more distinctive details about a person’s face. These details, such as distance between the eyes or texture, the color of skin, and eyebrow shape are then converted into a mathematical representation and compared to data on others

During the training phase, multiple image pairs are provided to the network. The network maps these image pairs to embedding vectors and calculates triplet loss . The triplets consist of two image pairs of same and different identities. Triplet loss aims to separate the pair of same identity (positive pair) from the pair of different identities (negative pair) by a distance margin

The model is trained on two sets of images: one to teach the algorithm how to recognize a mask(“mask detection”) and a second to figure out how to recognize a masked face (“face recognition”) based on above features. The algorithm doesn’t identify the faces which doesn’t available in a training set.

Model Output

Conclusion:

Masked recognition application task will be no longer difficult. we addressed the issue of recognizing masked faces through existing face recognition systems with reliable accuracy. We present an open-source tool,”MaskTheFace” and custom code which can be used to mask faces. This results in the creation of a large dataset of masked faces. The dataset generated with this tool can then use towards training an effective facial recognition system with target accuracy for masked faces. Even if the mask covers part of the face, the features of upper half of the face, such as eye and eyebrow, can still be used to improve the availability of the face recognition. “Masks are not going to stop facial recognition”

References:

  1. Masked Face Recognition Dataset and Application , Zhongyuan Wang, Guangcheng Wang, Baojin Huang, Zhangyang Xiong, Qi Hong, Hao Wu, Peng Yi, Kui Jiang, Nanxi Wang, Yingjiao Pei, Heling Chen, Yu Miao, Zhibing Huang, and Jinbi Liang

If you liked this article, pleases say 👋,Follow me on LinkedIn or here for more interesting content updates

--

--