MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss

The world today is being hit by COVID-19. As opposed to fingerprints and ID cards, facial recognition technology can effectively prevent the spread of viruses in public places because it does not require contact with specific sensors. However, people also need to wear masks when entering public plac...

Full description

Bibliographic Details
Main Authors: Hongxia Deng, Zijian Feng, Guanyu Qian, Xindong Lv, Haifang Li, Gang Li
Format: Article
Language:English
Published: MDPI AG 2021-08-01
Series:Applied Sciences
Subjects:
Online Access:https://www.mdpi.com/2076-3417/11/16/7310
id doaj-e20f8b4b69624538bfe75aab7395ac55
record_format Article
spelling doaj-e20f8b4b69624538bfe75aab7395ac552021-08-26T13:29:31ZengMDPI AGApplied Sciences2076-34172021-08-01117310731010.3390/app11167310MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine LossHongxia Deng0Zijian Feng1Guanyu Qian2Xindong Lv3Haifang Li4Gang Li5Department of Information and Computer, Taiyuan University of Technology, Taiyuan 030024, ChinaDepartment of Information and Computer, Taiyuan University of Technology, Taiyuan 030024, ChinaDepartment of Information and Computer, Taiyuan University of Technology, Taiyuan 030024, ChinaDepartment of Information and Computer, Taiyuan University of Technology, Taiyuan 030024, ChinaDepartment of Information and Computer, Taiyuan University of Technology, Taiyuan 030024, ChinaCollege of Software, Taiyuan University of Technology, Taiyuan 030024, ChinaThe world today is being hit by COVID-19. As opposed to fingerprints and ID cards, facial recognition technology can effectively prevent the spread of viruses in public places because it does not require contact with specific sensors. However, people also need to wear masks when entering public places, and masks will greatly affect the accuracy of facial recognition. Accurately performing facial recognition while people wear masks is a great challenge. In order to solve the problem of low facial recognition accuracy with mask wearers during the COVID-19 epidemic, we propose a masked-face recognition algorithm based on large margin cosine loss (MFCosface). Due to insufficient masked-face data for training, we designed a masked-face image generation algorithm based on the detection of the detection of key facial features. The face is detected and aligned through a multi-task cascaded convolutional network; and then we detect the key features of the face and select the mask template for coverage according to the positional information of the key features. Finally, we generate the corresponding masked-face image. Through analysis of the masked-face images, we found that triplet loss is not applicable to our datasets, because the results of online triplet selection contain fewer mask changes, making it difficult for the model to learn the relationship between mask occlusion and feature mapping. We use a large margin cosine loss as the loss function for training, which can map all the feature samples in a feature space with a smaller intra-class distance and a larger inter-class distance. In order to make the model pay more attention to the area that is not covered by the mask, we designed an Att-inception module that combines the Inception-Resnet module and the convolutional block attention module, which increases the weight of any unoccluded area in the feature map, thereby enlarging the unoccluded area’s contribution to the identification process. Experiments on several masked-face datasets have proved that our algorithm greatly improves the accuracy of masked-face recognition, and can accurately perform facial recognition with masked subjects.https://www.mdpi.com/2076-3417/11/16/7310facial recognitioncosinedetection of key featuresattention mechanism
collection DOAJ
language English
format Article
sources DOAJ
author Hongxia Deng
Zijian Feng
Guanyu Qian
Xindong Lv
Haifang Li
Gang Li
spellingShingle Hongxia Deng
Zijian Feng
Guanyu Qian
Xindong Lv
Haifang Li
Gang Li
MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss
Applied Sciences
facial recognition
cosine
detection of key features
attention mechanism
author_facet Hongxia Deng
Zijian Feng
Guanyu Qian
Xindong Lv
Haifang Li
Gang Li
author_sort Hongxia Deng
title MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss
title_short MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss
title_full MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss
title_fullStr MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss
title_full_unstemmed MFCosface: A Masked-Face Recognition Algorithm Based on Large Margin Cosine Loss
title_sort mfcosface: a masked-face recognition algorithm based on large margin cosine loss
publisher MDPI AG
series Applied Sciences
issn 2076-3417
publishDate 2021-08-01
description The world today is being hit by COVID-19. As opposed to fingerprints and ID cards, facial recognition technology can effectively prevent the spread of viruses in public places because it does not require contact with specific sensors. However, people also need to wear masks when entering public places, and masks will greatly affect the accuracy of facial recognition. Accurately performing facial recognition while people wear masks is a great challenge. In order to solve the problem of low facial recognition accuracy with mask wearers during the COVID-19 epidemic, we propose a masked-face recognition algorithm based on large margin cosine loss (MFCosface). Due to insufficient masked-face data for training, we designed a masked-face image generation algorithm based on the detection of the detection of key facial features. The face is detected and aligned through a multi-task cascaded convolutional network; and then we detect the key features of the face and select the mask template for coverage according to the positional information of the key features. Finally, we generate the corresponding masked-face image. Through analysis of the masked-face images, we found that triplet loss is not applicable to our datasets, because the results of online triplet selection contain fewer mask changes, making it difficult for the model to learn the relationship between mask occlusion and feature mapping. We use a large margin cosine loss as the loss function for training, which can map all the feature samples in a feature space with a smaller intra-class distance and a larger inter-class distance. In order to make the model pay more attention to the area that is not covered by the mask, we designed an Att-inception module that combines the Inception-Resnet module and the convolutional block attention module, which increases the weight of any unoccluded area in the feature map, thereby enlarging the unoccluded area’s contribution to the identification process. Experiments on several masked-face datasets have proved that our algorithm greatly improves the accuracy of masked-face recognition, and can accurately perform facial recognition with masked subjects.
topic facial recognition
cosine
detection of key features
attention mechanism
url https://www.mdpi.com/2076-3417/11/16/7310
work_keys_str_mv AT hongxiadeng mfcosfaceamaskedfacerecognitionalgorithmbasedonlargemargincosineloss
AT zijianfeng mfcosfaceamaskedfacerecognitionalgorithmbasedonlargemargincosineloss
AT guanyuqian mfcosfaceamaskedfacerecognitionalgorithmbasedonlargemargincosineloss
AT xindonglv mfcosfaceamaskedfacerecognitionalgorithmbasedonlargemargincosineloss
AT haifangli mfcosfaceamaskedfacerecognitionalgorithmbasedonlargemargincosineloss
AT gangli mfcosfaceamaskedfacerecognitionalgorithmbasedonlargemargincosineloss
_version_ 1721195198187307008