TL;DR
FocusFace is a multi-task contrastive learning framework designed to make face recognition robust to face masks without sacrificing standard verification performance. By jointly optimizing for identity verification and mask detection while minimizing the distance between masked and unmasked embeddings, it achieves state-of-the-art performance on masked-masked face verification. Crucially, it can be trained from scratch or easily adapted as a lightweight add-on to existing pre-trained face recognition models.
What Problem Does This Paper Address?
The widespread adoption of face masks during the COVID-19 pandemic introduced a major hurdle for biometric security: standard face recognition (FR) systems perform poorly when key facial features are occluded. Studies show that even highly accurate commercial and academic models experience failure rate spikes of up to 50% when attempting to verify a masked individual against an unmasked reference image.
Existing attempts to solve this usually involve either training massive models from scratch on synthetically masked datasets or strictly cropping images to the periocular (eye) region. The former is computationally expensive, while the latter discards valuable unoccluded information from the rest of the face. The authors of FocusFace set out to create a system that learns where to focus in an end-to-end fashion, while remaining computationally efficient and compatible with existing state-of-the-art FR models.
Methods
FocusFace addresses masked face recognition through a combination of multi-task learning and contrastive regularization.
- Multi-Task Architecture: The network splits the final layer of a standard convolutional backbone (such as ResNet-50 or ResNet-100) into two parallel fully-connected layers to generate two distinct embeddings:
- Identity Embedding (512-d): Optimized using ArcFace loss to enforce high intraclass similarity for facial recognition.
- Mask Detection Embedding (32-d): Optimized using standard Cross-Entropy loss to determine whether the subject is wearing a mask.
- Contrastive Learning: To ensure the identity branch ignores mask-related artifacts, the network is fed pairs of images of the same individual—one masked (augmented synthetically) and one unmasked. A Mean Squared Error (MSE) loss minimizes the distance between these two identity embeddings. This forces the network to focus exclusively on facial features common to both images (i.e., unoccluded areas).
- Plug-and-Play Training: FocusFace can be trained end-to-end from scratch, or it can be applied to a frozen, pre-trained backbone (like ElasticFace). In the latter case, only the new embedding layers are trained, drastically reducing computational overhead.
Datasets
- Training: MS1MV2 (a refined version of MS-Celeb-1M containing 5.8M images across 85k identities). The authors doubled the dataset size by applying synthetic masks (surgical, N95, KN95, and cloth) offline using the MaskTheFace tool.
- Validation: Labeled Faces in the Wild (LFW), similarly augmented with synthetic masks to tune hyperparameters.
- Testing: The IJCB 2021 Masked Face Recognition (MFR) Competition Dataset. Unlike the training data, this dataset contains real masks collected from 47 subjects over three distinct video sessions, providing a realistic benchmark for Unmasked-Masked (U-M) and Masked-Masked (M-M) verification.
Key Insights and Ideas
- Implicit Attention: Instead of hard-cropping images to the eyes, forcing the network to simultaneously detect masks and align identity embeddings acts as an implicit attention mechanism. The network naturally learns to ignore the mask area on its own.
- Preserving Base Capabilities: By freezing a pre-trained backbone and only training the parallel embedding heads, the model retains its original, high-fidelity capabilities for conventional (unmasked) face recognition. This avoids the "catastrophic forgetting" common when fine-tuning entire networks.
- Compute Efficiency: Freezing the backbone reduces the number of trainable parameters by roughly 47.6%, offering a much lighter and faster convergence path for deployment.
Key Results
The models were evaluated using the FMR100 metric (the lowest False Non-Match Rate for a False Match Rate $\le$ 1.0%).
- Masked-Masked (M-M) Setting: FocusFace achieved an FMR100 of 5.509%, outperforming the baseline ArcFace model (5.925%) and beating all top-3 solutions from the IJCB 2021 MFR competition.
- Unmasked-Masked (U-M) Setting: It achieved an FMR100 of 5.750%, significantly outperforming the baseline (6.009%) and performing competitively with specialized competition models.
- Mask Detection: The auxiliary mask detection task achieved a perfect 1.00 AUC on the validation dataset, demonstrating that the network successfully separates mask features from identity features.
Limitations and Future Work
While FocusFace shows strong performance on real-world test data, it relies entirely on synthetic masks during the training phase. Synthetic masks may lack the realistic wrinkles, strap placements, or varied textures of real-world masks, which could limit the model's ultimate accuracy boundaries.
The authors note that future work will explore more sophisticated contrastive learning modules, dynamic online data augmentation techniques, and testing the framework on even larger, more modern backbone architectures.
Summary updated