Towards End-to-End Face Recognition through Alignment Learning

Yuanyi Zhong, Jiansheng Chen, Bo Huang · DOI

Abstract

Plenty of effective methods have been proposed for face recognition during the past decade. Although these methods differ essentially in many aspects, a common practice of them is to specifically align the facial area based on the prior knowledge of human face structure before feature extraction. In most systems, the face alignment module is implemented independently. This has actually caused difficulties in the designing and training of end-to-end face recognition models. In this paper we study the possibility of alignment learning in end-to-end face recognition, in which neither prior knowledge on facial landmarks nor artificially defined geometric transformations are required. Specifically, spatial transformer layers are inserted in front of the feature extraction layers in a Convolutional Neural Network (CNN) for face recognition. Only human identity clues are used for driving the neural network to automatically learn the most suitable geometric transformation and the most appropriate facial area for the recognition task. To ensure reproducibility, our model is trained purely on the publicly available CASIA-WebFace dataset, and is tested on the Labeled Face in the Wild (LFW) dataset. We have achieved a verification accuracy of 99.08% which is comparable to state-of-the-art single model based methods.

Introduction

Traditional face recognition pipelines are typically fragmented into four distinct stages: detection, landmark localization, alignment, and feature extraction. This modularity introduces two significant challenges: the high cost of manual landmark labeling and the potential suboptimality of human-defined alignment priors (like 2D similarity transforms based on eye centers). This paper proposes an end-to-end approach that learns to automatically align faces into an optimal position for recognition using only identity labels, eliminating the need for explicit landmark supervision.

Methodology

The core of the proposed method is a unified architecture consisting of three main components:

  • Localization Network: A small CNN that predicts the parameters ($\theta$) for a geometric transformation.
  • Spatial Transformer (STN): A differentiable layer that applies the predicted warping to the input image.
  • Recognition Network: A deep ResNet-style architecture that extracts features from the aligned image.
The proposed end-to-end trainable network architecture, integrating localization, transformation, and recognition modules.

The model is optimized using a combination of Softmax loss and Center Loss. Crucially, the localization network is trained via backpropagation from the final recognition loss, allowing it to learn the most suitable transformation for the recognition task.

Experimental Results

The model was trained on the CASIA-WebFace dataset and evaluated on the Labeled Face in the Wild (LFW) dataset, achieving a verification accuracy of 99.08%.

Emergent Alignment

A key insight is the "emergent alignment" phenomenon. Despite receiving no landmark data, the model "discovers" that the best way to recognize a face is to rotate it to an upright, frontal position. This suggests that standard human alignment is actually quite close to the mathematical optimum for CNNs.

Visualization of the learned alignment (red boxes) compared to the initial detection results (green boxes) across various facial poses.

Transformation Analysis

The authors experimented with different geometric models to determine the impact on recognition performance:

  • Identical Transformation: 97.68%
  • Similarity Transform: 98.65%
  • Affine Transform: 98.71%
  • Projective Transform: 99.08%

Projective transformations performed best as they can more accurately model the perspective distortions of the camera imaging process compared to simpler linear models.

Conclusion

This research demonstrates that explicit knowledge of facial structures is not a prerequisite for high-quality face perception. By integrating alignment learning into an end-to-end pipeline, the model achieves state-of-the-art performance while reducing the need for laborious manual supervision. Future work will focus on integrating the initial detection stage to create a fully end-to-end "pixels-to-identity" system.

Summary updated

BibTeX
@article{zhong2017towards,
  author = {Yuanyi Zhong and Jiansheng Chen and Bo Huang},
  title = {{Towards End-to-End Face Recognition through Alignment Learning}},
  journal = {IEEE Signal Processing Letters},
  year = {2017},
  url = {https://openreview.net/forum?id=MjqyFTd1GwL},
}
Figure