Precise Facial Landmark Detection by Reference Heatmap Transformer

Jun Wan, Jun Liu, Jie Zhou, Zhihui Lai, Linlin Shen, Hang Sun, Ping Xiong, Wenwen Min

Abstract

Facial Landmark Detection (FLD) is a critical task for applications ranging from facial recognition to 3D reconstruction. However, standard heatmap regression methods often fail in "in-the-wild" scenarios characterized by extreme poses, heavy occlusions, or poor lighting. This paper introduces the Reference Heatmap Transformer (RHT), a novel framework that leverages a high-quality reference image with known landmarks to guide the prediction of a target face. By integrating local feature correlations with global geometric alignment, RHT achieves state-of-the-art accuracy across major benchmarks, demonstrating significant robustness to structural challenges.

Introduction

Locating precise points such as eye corners, nose tips, and mouth edges is fundamental to computer vision. While deep learning has significantly advanced FLD, existing models typically rely solely on the target image. This approach is prone to failure when visual information is missing—for instance, when a face is partially obscured by a hand or turned at a sharp angle.

Human faces share a consistent underlying structure regardless of individual variations. The Reference Heatmap Transformer (RHT) exploits this consistency by using a reference image as a structural "prior." This reference acts as a spatial guide, providing the model with a template to infer missing or ambiguous landmarks on the target face.

Methodology

The RHT framework is built upon three core components designed to transfer and fuse information from the reference to the target image effectively:

1. Soft Transformation Module (STM)

The STM utilizes an attention mechanism to identify local correlations between the target and reference images. It dynamically selects and transfers features from the reference heatmap that correspond to the target's local appearance, allowing the model to adapt to fine-grained variations.

2. Hard Transformation Module (HTM)

While the STM focuses on local details, the HTM addresses global geometry. It estimates a 2D affine transformation—encompassing scaling, rotation, and translation—to align the entire reference heatmap with the target face's orientation. This ensures that the global facial structure remains coherent.

3. Multi-Scale Feature Fusion Module (MSFFM)

To capture both high-level semantic information and low-level details, the MSFFM fuses transformed reference features with the target image’s features across multiple scales (1x, 2x, and 4x). This multi-resolution approach ensures the model maintains precision for both individual points and the overall face shape.

Additionally, the authors implement a specific transformation loss ($L_2$) to encourage consistency between the STM and HTM outputs, further refining the geometric alignment during training.

Experimental Results

The researchers evaluated the RHT model (using an HRNet backbone, designated RHT-H) against four major benchmark datasets, each representing different challenges:

  • 300W: A standard benchmark where RHT-H achieved a Normalized Mean Error (NME) of 2.74% on the Fullset, outperforming previous leaders like ADNet (2.93%).
  • COFW (Calories Over Facial Work): Designed for occlusion testing, RHT-H reduced the NME to 4.38% with a remarkably low failure rate of 0.59%.
  • WFLW (Wider Facial Landmarks in the Wild): On the specific "Pose" subset, the model achieved an NME of 6.77%, proving its efficacy for profile views.
  • AFLW (Annotated Facial Landmarks in the Wild): The model set a record-low 0.97% NMEdiag on the frontal subset.

Discussion and Insights

The success of RHT stems from its "cheat sheet" approach. By referencing a known facial structure, the model can accurately place landmarks even when they are not visible in the target image. A key finding is the complementarity of the STM and HTM; local attention and global alignment work together to maintain structural integrity.

Furthermore, the model's performance is surprisingly resilient to the choice of reference image. While using a reference with a similar pose (selected via SIFT matching) provides the best results, even a neutral or randomly selected face as a reference significantly outperforms non-reference models. The inclusion of boundary-aware heatmaps—predicting lines between landmarks—also helps the network learn structural constraints more effectively.

Conclusion and Future Work

The Reference Heatmap Transformer represents a significant step forward in robust facial landmark detection. By utilizing structural priors, it overcomes many of the limitations inherent in single-image regression. While the model introduces some computational overhead and requires a reference image during inference, its performance in challenging conditions is unparalleled. Future research may focus on optimizing the model for real-time mobile applications or developing methods to synthesize optimal reference images automatically.

Summary updated

BibTeX
@article{wan2023precise,
  author = {Jun Wan and Jun Liu and Jie Zhou and Zhihui Lai and Linlin Shen and Hang Sun and Ping Xiong and Wenwen Min},
  title = {{Precise Facial Landmark Detection by Reference Heatmap Transformer}},
  journal = {IEEE Trans. Image Process.},
  year = {2023},
  url = {https://openreview.net/forum?id=5VtqGSgSly5},
}
Figure