Source-linked AI summary
MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
Sheng Chen, Yang Liu, Xiang Gao, Zhen Han
TL;DR
Common mobile CNNs were not designed for face verification, creating a need for models that remain accurate while being small and fast on mobile devices. The paper analyzes this weakness and introduces MobileFaceNets, using tailored efficient CNN designs trained with ArcFace. MobileFaceNets achieve improved efficiency over prior mobile CNNs, with a 4.0MB model reaching 99.55% LFW accuracy and 92.59% TAR@FAR10^-6 on MegaFace.
Problem
Common mobile CNNs target general visual recognition, while accurate face-verification models are often too computationally demanding for mobile and embedded applications.
Method
The paper analyzes common mobile networks’ weaknesses and designs MobileFaceNets, training face-verification models with ArcFace loss on public datasets.
Results
MobileFaceNets achieve significantly improved efficiency over previous state-of-the-art mobile CNNs; a 4.0MB model reaches 99.55% LFW accuracy and 92.59% TAR@FAR10^-6 on MegaFace.
Takeaways & Limitations
MobileFaceNets provide extremely efficient CNN models for real-time face verification on mobile and embedded devices.
Abstract
from arXiv · showhide
We present a class of extremely efficient CNN models, MobileFaceNets, which use less than 1 million parameters and are specifically tailored for high-accuracy real-time face verification on mobile and embedded devices. We first make a simple analysis on the weakness of common mobile networks for face verification. The weakness has been well overcome by our specifically designed MobileFaceNets. Under the same experimental conditions, our MobileFaceNets achieve significantly superior accuracy as well as more than 2 times actual speedup over MobileNetV2. After trained by ArcFace loss on the refined MS-Celeb-1M, our single MobileFaceNet of 4.0MB size achieves 99.55% accuracy on LFW and 92.59% TAR@FAR1e-6 on MegaFace, which is even comparable to state-of-the-art big CNN models of hundreds MB size. The fastest one of MobileFaceNets has an actual inference time of 18 milliseconds on a mobile phone. For face verification, MobileFaceNets achieve significantly improved efficiency over previous state-of-the-art mobile CNNs.
1 Introduction
Face verification on mobile devices requires models that are accurate, small, and fast, but common mobile CNNs were designed for other visual tasks and perform poorly when used unchanged. MobileFaceNets address this gap with tailored, efficient architectures and strong verification results.
- Motivation: Mobile face-verification models must combine accuracy, small size, and fast inference for offline and resource-constrained applications.Applications include device unlock, application login, and mobile payment.
- Motivation: Common architectures such as ShuffleNet and MobileNetV2 were developed for general visual recognition rather than face verification.
- MobileFaceNets: MobileFaceNets use less than 1 million parameters and are tailored for high-accuracy real-time face verification on mobile and embedded devices.
- Results: Under the same experimental conditions, MobileFaceNets achieve significantly higher accuracy and more than 2 times actual speedup over MobileNetV2.
- Results: 4.0MB MobileFaceNet achieves 99.55% accuracy on LFW and 92.59% TAR@FAR10^-6 on MegaFace after ArcFace training on refined MS-Celeb-1M.
- Results: Experiments on LFW, AgeDB, and MegaFace show significantly improved efficiency over previous state-of-the-art mobile CNNs for face verification.
2 Related Work
Prior lightweight CNN research primarily targeted general visual recognition, while lightweight face-verification models were less studied and often traded accuracy against compactness.
- General mobile CNNs: Efficient architectures such as SqueezeNet, MobileNetV1, ShuffleNet, and MobileNetV2 were developed for common visual recognition tasks.
- Face-verification models: Light CNN-29 reaches 99.33% LFW accuracy with 12.6 million parameters, making it less lightweight for mobile and embedded platforms.
- Face-verification models: ShiftFaceNet uses 0.78 million parameters but achieves only 96.0% face-verification accuracy.
- Model compression: Knowledge distillation provides another route to compact face-verification models, including MobileID at 4.0MB and 97.32% LFW accuracy.
3 Approach
The approach targets efficient, reproducible face-verification CNNs by analyzing weaknesses of common mobile networks and training models with ArcFace on public datasets.
- Approach: The authors analyze common mobile networks’ weaknesses for face verification and design CNN models intended for accurate real-time deployment on mobile devices.
- Training: All face-verification models are trained with ArcFace loss on public datasets following the experimental settings in prior work.
3. 1 The Weakness of Common Mobile Networks for Face Verification
Common mobile networks are poorly matched to face verification because global average pooling treats all final feature-map units equally despite their differing information content. MobileFaceNets address this with global depthwise convolution and lightweight architectures tailored for efficient face feature embedding.
- Global average pooling is common in mobile networks, but face-verification studies report lower accuracy with it than without it.The paper motivates a receptive-field analysis for this phenomenon.
- Different units in the 7 × 7 final feature map carry different amounts of face information because their effective receptive fields differ.Central units have larger effective receptive fields than corner units for aligned faces.
- 62720 dimensions make MobileNetV2’s flattened final feature map unsuitable as a face vector, while a fully connected projection to 128 dimensions would add 8 million parameters.Global average pooling avoids the parameter cost but treats all feature-map units equally.
- Global depthwise convolution replaces global average pooling to assign different importance to final feature-map units while producing a compact feature vector.Its kernel spans the full input feature-map size with pad = 0 and stride = 1.
- 62720 MAdds and 62720 parameters are required for a 7 × 7 × 1280 global depthwise convolution in MobileNetV2.The operation outputs a 1280-dimensional face feature vector.
- MobileFaceNet uses MobileNetV2 residual bottlenecks with smaller expansion factors, PReLU, and modified input and projection layers for efficiency.The primary network uses 221 million MAdds and 0.99 million parameters; MobileFaceNet-M and MobileFaceNet-S further reduce parameters or computation.
4 Experiments
Experiments compare MobileFaceNets with mobile and published face-verification models under controlled training and evaluation settings. MobileFaceNets provide higher accuracy and faster inference than common mobile baselines, while retaining strong performance on LFW, AgeDB-30, and MegaFace.
- Training settings: MobileFaceNets and baseline models were trained from scratch with ArcFace loss on CASIA-Webface for fair comparison.Baselines included MobileNetV1, ShuffleNet, and MobileNetV2; the first convolutional layers used stride 1.
- Training settings: Table 2 reports accuracy and actual inference time in milliseconds on a Snapdragon 820 mobile CPU using four-thread NCNN inference.
- LFW and AgeDB-30: MobileFaceNets achieve significantly better accuracy with faster inference than common mobile-network baselines.The primary MobileFaceNet has the best accuracy, while the 96 × 96 variant has the fastest inference speed.
- LFW and AgeDB-30: 99.55% LFW accuracy is achieved by the primary MobileFaceNet after training on the cleaned MS-Celeb-1M set with ArcFace loss.The same training produces 96.07% accuracy on AgeDB-30.
- LFW and AgeDB-30: Table 3 compares MobileFaceNet accuracy on LFW with previously published face-verification models.
- MegaFace Challenge 1: On MegaFace Challenge 1, the primary MobileFaceNet shows comparable verification accuracy under both small- and large-training-data protocols.Facescrub is used as the probe set, and the protocols differ by whether training data contain fewer than 0.5 million images.
5 Conclusion
The paper proposes MobileFaceNets as extremely efficient face-feature-embedding CNNs for real-time verification on mobile and embedded devices. Experiments report improved efficiency over previous state-of-the-art mobile CNNs.
- MobileFaceNets are designed for extreme efficiency in real-time face verification on mobile and embedded devices.
- Experiments show significantly improved efficiency over previous state-of-the-art mobile CNNs for face verification.