GridFace: Face Rectification via Learning Local Homography Transformations

Erjin Zhou, Zhimin Cao, Jian Sun

Abstract

In this paper, we propose a method, called GridFace, to reduce facial geometric variations and improve the recognition performance. Our method rectifies the face by local homography transformations, which are estimated by a face rectification network. To encourage the image generation with canonical views, we apply a regularization based on the natural face distribution. We learn the rectification network and recognition network in an end-to-end manner. Extensive experiments show our method greatly reduces geometric variations, and gains significant improvements in unconstrained face recognition scenarios.

Introduction

Despite the massive success of deep learning, face recognition "in the wild" remains difficult because of geometric variations. When a person turns their head (pose) or the face detection box is slightly off (misalignment), the features extracted by a neural network change drastically, even if the identity is the same. Existing solutions usually fall into two camps: global transformers, which are often too coarse to handle complex non-rigid distortions, and 3D frontalization, which can be computationally heavy and introduce "ghosting" artifacts. GridFace seeks a middle ground: a non-rigid, local approach that is learned end-to-end specifically to help recognition.

Methodology

The GridFace architecture consists of two main modules: a Rectification Module and a Recognition Module.

The GridFace architecture, illustrating the joint training of the Rectification Module (with DAE regularization) and the Recognition Module.

Local Homography Grid

Instead of warping the whole face at once, GridFace divides the image into an $n \times n$ grid (e.g., $8 \times 8$). The Rectification Network predicts a unique homography matrix for every single cell. This allows the model to approximate complex 3D shapes using a collection of small, deformable planes. To prevent the grid cells from tearing apart, a "deformation loss" ($\mathcal{L}_{de}$) acts like virtual springs at the corners of the grid cells, enforcing continuity.

DAE Regularization and Joint Learning

To ensure the rectified face looks natural, the authors use a Denoising Autoencoder (DAE) trained on frontal faces. The DAE acts as a canonical view prior; during training, the gradient of the DAE's reconstruction error pushes the rectification network toward producing "natural" frontal faces. Crucially, the rectification and recognition networks are trained together. This joint learning ensures that the straightening process preserves the specific facial details necessary for identifying a person, rather than just producing an "average" face.

Experiments and Results

The authors utilized massive datasets for training, including SNFace (10 million images) and MS-Celeb-1M. Evaluation was performed on standard benchmarks such as LFW, YTF, IJB-A, and Multi-PIE.

Visual results of GridFace rectification. The top rows show the predicted local homography grids, while the bottom rows show the resulting rectified images.

Key Insights

  • Local vs. Global: Moving from a $1 \times 1$ grid (global) to an $8 \times 8$ grid (local) showed a massive jump in performance, as local transformations better handle perspective distortions.
  • Implicit Priors: Using a DAE allows the system to treat the concept of a frontal face as a probability distribution, making it more flexible than methods requiring paired profile/frontal training images.

Performance Metrics

GridFace achieved state-of-the-art results across several tasks. On the Multi-PIE dataset at a 90-degree yaw, GridFace improved identification accuracy to 75.4%, compared to 44.3% for a standard baseline. On LFW, the model reached 99.70% accuracy, while on the challenging IJB-A verification task, it improved the baseline from 71.3% to 83.9% (at FAR=0.001).

Conclusion

GridFace effectively "un-rotates" faces and fixes alignment issues, resulting in cleaner facial images for recognition engines. While it is robust to pose, it does not currently handle extreme occlusions (e.g., sunglasses). Future work may involve incorporating temporal information from video frames to further boost performance in dynamic scenarios.

Summary updated

BibTeX
@inproceedings{zhou2018gridface,
  author = {Erjin Zhou and Zhimin Cao and Jian Sun},
  title = {{GridFace: Face Rectification via Learning Local Homography Transformations}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  url = {https://openreview.net/forum?id=rJZKVqbuWr},
}
Figure