Abstract
Facial landmark detection is a critical component in computer vision, supporting applications from augmented reality to 3D facial modeling. Traditional approaches generally fall into two categories: heatmap-based methods, which suffer from quantization errors and high computational costs, and coordinate regression methods, which often struggle to maintain spatial relationships. This paper introduces the Deformable Transformer Landmark Detector (DTLD), an end-to-end coordinate regression framework that leverages cascaded transformers. By integrating self-attention to capture global facial geometry and deformable attention for local precision, DTLD achieves state-of-the-art performance across multiple benchmarks, including WFLW and COFW, while maintaining a competitive efficiency profile.
Introduction
Locating facial landmarks—such as the corners of the eyes, the tip of the nose, and the contour of the jaw—is a foundational task in facial analysis. Historically, the field has been divided between heatmap-based prediction and direct coordinate regression. Heatmap methods are highly accurate but are limited by the resolution of the probability maps, leading to "quantization errors" where the predicted point is constrained by the grid size. Conversely, direct regression is faster and fully differentiable but often relies on fully connected layers that discard vital spatial information.
DTLD aims to bridge this gap. By formulating landmark detection as a sequence of refinements within a Transformer architecture, the model preserves spatial structure and learns the inherent geometric constraints of the human face (e.g., the relative positioning of eyes and mouth) without the overhead of high-resolution heatmaps.
Methodology
The DTLD architecture consists of three primary components designed to refine landmark positions from coarse estimates to high-precision coordinates.
1. Backbone and Query Initialization
The process begins with a standard ResNet-18 backbone to extract multi-scale image features. Unlike standard Transformers that might start with random queries, DTLD employs a "Query Initialization" module. This module uses high-level image features to generate an initial set of coordinates ($Y_0$), providing the model with a statistically informed starting point that accelerates convergence.
2. Cascaded Transformer Decoders
The core of the model is a series of transformer decoder layers (typically 3 to 6). Each layer performs two distinct types of attention:
- Self-Attention: This mechanism allows landmarks to interact with one another. By attending to the entire set of points, the model learns the structural constraints of the face, ensuring that even if one part of the face is obscured, its position can be inferred from the visible landmarks.
- Deformable Attention: This is the critical innovation for local precision. Rather than attending to every pixel in the feature map, the model samples a small, learned set of pixels around the current landmark estimate across multiple feature scales. This "coarse-to-fine" approach allows the model to focus on fine-grained textures without the computational burden of global attention.
3. DTLD+ Parallel Refinement
An advanced variant, DTLD+, introduces a parallel structure where image features are updated alongside the landmark coordinates at each stage. This iterative feature enhancement allows the model to adapt its internal representation to the specific facial structure it is analyzing, further boosting accuracy with minimal parameter growth.
Experimental Results
DTLD was evaluated on several rigorous 2D facial landmark benchmarks, demonstrating superior robustness and accuracy.
- WFLW (Wider Facial Landmarks in-the-wild): On this challenging dataset characterized by extreme poses and expressions, DTLD+ achieved a 4.05% Normalized Mean Error (NME), surpassing the previous state-of-the-art of 4.20%.
- COFW (Caltech Occluded Faces in the Wild): To test robustness against occlusions, the model was evaluated on COFW, reaching an NME of 3.02%. This result highlights the effectiveness of the self-attention mechanism in inferring hidden landmarks based on global facial geometry.
- Efficiency: The model is relatively lightweight, containing 13.3M parameters and requiring 2.5 GFLOPs. On a V100 GPU, it operates between 78 and 100 FPS, offering a favorable trade-off between the high accuracy of heatmap methods and the speed of regression models.
Discussion and Limitations
The success of DTLD stems from its ability to balance global and local information. The combination of self-attention for structural integrity and deformable attention for local texture refinement allows it to handle "tough" cases, such as faces partially obscured by hands or accessories. Furthermore, by avoiding heatmaps, the model remains fully differentiable and free from resolution-based bottlenecks.
However, limitations remain. While DTLD is efficient, it is not as fast as specialized real-time models like PIPNet due to its iterative refinement stages. Future work may involve using knowledge distillation to compress the cascaded stages into a faster single-pass model. Additionally, while the model is robust, extreme occlusions where the face boundary is almost entirely lost still present a challenge for the geometric inference capabilities of the transformer.
Conclusion
DTLD represents a significant step forward for coordinate-based facial landmark detection. By utilizing cascaded transformers and deformable attention, the researchers have created a model that matches or exceeds the accuracy of heatmap-based systems while maintaining the end-to-end simplicity of regression. This approach provides a robust framework for future developments in facial analysis and structural point detection.
Summary updated