Source-linked AI summary
FaceX-Zoo: A PyTorch Toolbox for Face Recognition
Jun Wang, Yinglu Liu, Yibo Hu, Hailin Shi, Tao Mei
TL;DR
Face-recognition research and production need public support for model training, evaluation, and deployment, including emerging masked-face settings. FaceX-Zoo supplies modular training and standardized evaluation alongside a face SDK; its shallow-data experiments report that poly-mode training is effective.
Problem
Practical face-recognition research needs public support for modular model training, standardized evaluation, deployment, and emerging challenges such as masked-face recognition.
Source: §1 · p. 1Method
Results
Experiments on shallow face data report that poly-mode training is effective.
Source: §5.1 · p. 6Takeaways & Limitations
The framework provides a baseline for deployment and further development, with an additional module supporting masked-face training and testing.
Source: §7 · p. 7
Abstract
from arXiv · showhide
Deep learning based face recognition has achieved significant progress in recent years. Yet, the practical model production and further research of deep face recognition are in great need of corresponding public support. For example, the production of face representation network desires a modular training scheme to consider the proper choice from various candidates of state-of-the-art backbone and training supervision subject to the real-world face recognition demand; for performance analysis and comparison, the standard and automatic evaluation with a bunch of models on multiple benchmarks will be a desired tool as well; besides, a public groundwork is welcomed for deploying the face recognition in the shape of holistic pipeline. Furthermore, there are some newly-emerged challenges, such as the masked face recognition caused by the recent world-wide COVID-19 pandemic, which draws increasing attention in practical applications. A feasible and elegant solution is to build an easy-to-use unified framework to meet the above demands. To this end, we introduce a novel open-source framework, named FaceX-Zoo, which is oriented to the research-development community of face recognition. Resorting to the highly modular and scalable design, FaceX-Zoo provides a training module with various supervisory heads and backbones towards state-of-the-art face recognition, as well as a standardized evaluation module which enables to evaluate the models in most of the popular benchmarks just by editing a simple configuration. Also, a simple yet fully functional face SDK is provided for the validation and primary application of the trained models. Rather than including as many as possible of the prior techniques, we enable FaceX-Zoo to easily upgrade and extend along with the development of face related domains. The source code and models are available at https://github.com/JDAI-CV/FaceX-Zoo.
1. Introduction
FaceX-Zoo addresses the need for broader research and production support as deep face-recognition techniques develop. It combines modular training, standardized evaluation, and a deployment SDK in an extensible PyTorch framework.
1. Introduction
- FaceX-Zoo targets the need for a more comprehensive framework and standard evaluation to support face-recognition research and development.The paper presents it as a modular, flexible, and scalable PyTorch library.Source: §1 · p. 1
- Its core components are a state-of-the-art training pipeline, standard evaluation, and a deployment SDK for proof of concept and applications.The introduction describes these as support for training, evaluation, and deployment.Source: §1 · p. 1
- The project releases source code and trained models to support community development of face-recognition solutions for real-world challenges.Source: §1 · p. 1
2. Overview of FaceX-Zoo
FaceX-Zoo combines modular training and evaluation components with deployment and masked-face support. Its architecture is designed to accommodate varied model choices, test protocols, and extensions.
2.1. Architecture
- The architecture comprises training, evaluation, additional, and face-SDK modules, with training and evaluation as its core components.The described components include pre-processing, training mode, backbone, supervisory head, and test protocol.Source: §2.1 · p. 2
- Training supports a conventional routine and a shallow-data strategy, while backbone architectures and supervisory heads provide choices for feature extraction and learning.Other architectures can be customized through configuration and an architecture definition file.Source: §2.1 · pp. 2–3
- The evaluation module integrates common LFW- and MegaFace-based protocols, supports configuration-based testing, and allows additional protocols to be added.The listed protocols include cross-pose, cross-age, racial-bias, large-scale, and masked-face benchmarks.Source: §2.1 · p. 3
2.2. Characteristics
- Object-oriented modules are intended to make it easy to add training modes, backbones, supervisory heads, data samplers, and test protocols.Source: §2.2 · pp. 3–4
- The training offering includes data augmentation, varied backbones, softmax-style losses, and Semi-Siamese Training for shallow face learning.Source: §2.2 · p. 4
- A Python face SDK provides a functional demonstration for learning module use and developing later versions.The paper describes it as a deployment-oriented SDK.Source: §2.2 · p. 4
- The open-source evaluation implementation supports fair, convenient testing on LFW- and MegaFace-based benchmarks through configuration changes.The project also plans to release 106-point facial landmarks for benchmark face alignment.Source: §2.2 · p. 4
- Masked-face support brings together training data, a training algorithm, and an evaluation benchmark via 3D face-mask addition.Source: §2.2 · p. 4
3. Detailed Design
FaceX-Zoo’s detailed design organizes training, evaluation, and face-SDK components as modular classes. The design connects configurable model training and benchmark evaluation with model loading, face cropping, and inference support.
3.1. Training Module
- TrainingMode aggregates the training module’s BackboneFactory, HeadFactory, and DataLoader components.The factories supply the backbone and configuration-selected supervisory head, while DataLoader loads training data.Source: §3.1 · p. 4
3.2. Evaluation Module
- LFWEvaluator and MegaFaceEvaluator use CommonExtrator for feature extraction, with ModelLoader and DataLoader supplying models and test data.LFW also uses PairsParseFactory; MegaFace evaluation separates CommonMegaFaceEvaluator and MaskedMegafaceEvaluator as subclasses of MegaFaceEvaluator.Source: §3.2 · p. 4, Figure 3 · p. 4
3.3. Face SDK
- Face SDK’s ModelLoader, ImageCropper, and ModelHandler support model loading, normalized face cropping, and pre- and post-processing with inference.ModelLoader handles detection, landmark-localization, and feature-extraction models; ImageCropper uses detected landmarks to crop the facial area.Source: §3.3 · pp. 4–5, Figure 4 · p. 5
- Face SDK provides models for masked and non-masked recognition, training the masked-scenario models with data expanded by FMA-3D.For the non-masked scenario, the recognition model uses MobileFaceNet and MV-Softmax on MS-Celeb-1M-v1c; the masked scenario uses the same algorithms with expanded training data.Source: §3.3 · p. 5
4. Experiments of SOTA Components
The experiments examine state-of-the-art backbones and supervisory heads to support reproducing and using FaceX-Zoo. They hold other settings constant across trials and report component performance in Tables 1 and 2.
4. Experiments of SOTA Components
- Experiments compare state-of-the-art backbones and supervisory heads to help readers reproduce and use the framework.MS-Celeb-1M-v1c is used as training data; backbone trials share MV-Softmax, while head trials share MobileFaceNet.Source: §4 · pp. 5–6
- Each trial uses four NVIDIA Tesla P40 GPUs, 18 epochs, and batch size 512, with learning rate 0.1 reduced tenfold at epochs 10, 13, and 16.The remaining settings are kept the same across trials.Source: §4 · p. 6
- Backbone and supervisory-head test results are reported in Table 1 and Table 2, respectively.The authors present the results as guidance for using and verifying the framework.Source: §4 · p. 6
5. Task-specific Solutions
FaceX-Zoo addresses shallow face learning with Semi-Siamese Training and masked face recognition with FMA-3D virtual-mask synthesis. Experiments report gains for both task-specific solutions.
5.1. Shallow Face Learning
- With only two images per identity, shallow data lacks intraclass diversity and can lead to feature-dimension collapse, model degeneration, or over-fitting.FaceX-Zoo adopts Semi-Siamese Training (SST) to tackle this shallow face learning problem.Source: §5.1 · p. 6
- Tests on LFW, CPLFW, CALFW, AgeDB, and RFW verify poly-mode training's effectiveness on shallow data.The comparison used MobileFaceNet and shallow MS-Celeb-1M-v1c data, with two images selected per identity.Source: §5.1 · p. 6
5.2. Masked Face Recognition
- FMA-3D synthesizes a masked image by combining a real masked image's mask with the facial area of a non-masked image.It maps both images' texture maps into UV space, blends them, then renders the result using the non-masked image's UV position map.Source: §5.2 · p. 6
- Compared with 2D-based and GAN-based methods, FMA-3D shows superior robustness and fidelity, especially for large head poses.Source: §5.2 · p. 6
- FMA-3D can augment existing face datasets with masked images, retaining identity annotations for network training without additional labeling.Training can use conventional training or SST, with backbones and supervisory heads available in FaceX-Zoo.Source: §5.2 · pp. 6–7
- Rank1 accuracy rose from 27.03% (model1) to 71.44% (model2) and 78.39% (model3), reaching 79.26% for their ensemble.Model1 used non-masked training data, model2 used upper-face crops, and model3 used synthesized masked training data.Source: §5.2 · p. 7
6. Future Work
Future work targets broader functionality, deeper coverage of face-recognition methods, and greater training efficiency.
- Planned breadth and depth improvements include adding face parsing and face lighting modules and supplementing backbone architectures and supervisory heads.Source: §6 · p. 7
- The authors plan to improve training efficiency through distributed data parallel techniques and mixed-precision training.Source: §6 · p. 7
7. Conclusion
FaceX-Zoo is a modular, scalable open-source face-recognition framework for training, evaluation, and pipeline development. Its released code, logs, and trained models are offered as a prototype and baseline for further work.
- FaceX-Zoo provides training with varied backbones and supervisory heads, automatic evaluation, a face SDK, and masked-face support via 3D virtual-mask addition.The SDK includes face detection, landmark localization, and feature extraction modules.Source: §7 · p. 7
- The released source code, logs, and trained models can be used as a prototype and baseline for further development.Source: §7 · p. 7
Related papers
This paper cites
- PyTorch: An Imperative Style, High-Performance Deep Learning Library2019
- Squeeze-and-Excitation Networks2017
- FaceNet: A Unified Embedding for Face Recognition and Clustering2015
- MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systems2015
- Residual Attention Network for Image Classification2017
- RepVGG: Making VGG-style ConvNets Great Again2021