Introduction
Face recognition (FR) presents unique challenges for computer vision models. While Vision Transformers (ViTs) excel at capturing long-range dependencies, they often struggle with the high computational costs of processing massive datasets and a lack of "locality bias" necessary for identifying subtle facial features. The Face Pyramid Vision Transformer (FPVT) addresses these issues by integrating convolutional properties into a hierarchical transformer architecture, achieving state-of-the-art performance with high parameter efficiency.
Architecture and Methodology
FPVT utilizes a four-stage pyramid structure that progressively reduces the spatial resolution of feature maps. This design allows the model to capture multi-scale representations, which is critical for handling variations in facial pose and expression.
Key Innovations
- Improved Patch Embedding (IPE): Unlike standard ViTs that use non-overlapping patches, IPE employs a convolutional approach to create overlapping tokens. This preserves local spatial continuity across patch boundaries, which is essential for capturing facial textures.
- Face Spatial Reduction Attention (F-SRA): To manage computational overhead, F-SRA reduces the spatial scale of Key and Value tensors before attention is computed. It uses adaptive max pooling to maintain performance while minimizing parameters.
- Convolutional Feed-Forward Network (CFFN): By replacing the standard MLP with depth-wise convolutions, the model better learns local representations of facial primitives.
- Face Dimensionality Reduction (FDR) Layer: This layer generates compact facial feature maps, significantly reducing the hardware requirements and training time for large-scale identity datasets.
Experimental Results
The FPVT was evaluated against several benchmarks, including LFW (Labeled Faces in the Wild) for unconstrained recognition and Age-DB for cross-age verification. The model was trained on a cleaned version of the Face Scrub dataset.
As shown in the results table, FPVT significantly outperforms traditional CNNs like ResNet-18 and other transformer variants. Specifically, FPVT achieved 92.0% accuracy on LFW and 75.0% on Age-DB. Notably, the model is highly efficient, reaching these benchmarks with only 28.2M parameters, compared to the 32.2M required by the baseline Pyramid Vision Transformer (PVT).
Conclusion
FPVT demonstrates that the integration of convolutional inductive biases—such as locality and overlapping windows—is vital for applying Vision Transformers to face recognition. By combining a hierarchical structure with efficient attention mechanisms and dimensionality reduction, FPVT offers a robust solution for high-accuracy, resource-constrained facial analysis. Future work may focus on scaling these architectures to "ultra-large" datasets like WebFace260M to further push the boundaries of transformer-based recognition.
Summary updated