Abstract: Recently, heatmap regression methods based on 1D landmark representations have shown prominent performance on locating facial landmarks. However, previous methods ignored to make deep explorations on the good potentials of 1D landmark representations for sequential and structural modeling of multiple landmarks to track facial landmarks. To address this limitation, we propose a Transformer architecture, namely 1DFormer, which learns informative 1D landmark representations by capturing the dynamic and the geometric patterns of landmarks via token communications in both temporal and spatial dimensions for facial landmark tracking. For temporal modeling, we propose a confidence-enhanced multi-head attention mechanism with a recurrently token mixing strategy to adaptively and robustly embed long-term landmark dynamics into their 1D representations; for structure modeling, we design intra-group and inter-group geometric encoding mechanisms to encode the component-level as well as global-level facial structure patterns as a refinement for the 1D representations of landmarks through token communications in the spatial dimension via 1D convolutional layers. Experimental results on the 300VW and the TF databases show that 1DFormer successfully models the long-range sequential patterns as well as the inherent facial structures to learn informative 1D representations of landmark sequences, and achieves state-of-the-art performance on facial landmark tracking.
Rethinking Facial Landmark Tracking
Facial landmark tracking—the process of locating specific points like eye corners or the nose tip across video frames—is essential for applications ranging from emotion analysis to human-computer interaction. Traditionally, researchers relied on 2D heatmaps, which suffer from quadratic spatial complexity ($O(L^2)$). This means that increasing resolution significantly inflates memory costs, often leading to "quantization errors" where the model lacks the precision required for high-fidelity tracking.
Recent advancements introduced 1D heatmap methods, which predict two 1D vectors (marginal distributions for the x and y axes) instead of a 2D grid. This reduces complexity to linear ($O(L)$), allowing for higher resolution. However, existing 1D methods have struggled with two key issues: weak temporal modeling across long sequences and a failure to account for the rigid geometric structure of the human face.
The 1DFormer Framework
Presented at IJCAI-24, 1DFormer addresses these limitations by treating 1D landmark features as "tokens" within a Transformer architecture. The model introduces three primary innovations to enhance tracking accuracy and stability:
1. Recurrently Token Mixing Strategy
Processing every frame in a long video sequence is computationally prohibitive. 1DFormer utilizes a sliding window approach ($W$ frames) but incorporates a recurrent strategy to pass "memories" from previous windows forward. This allows the model to capture long-term temporal dynamics without the massive compute cost of global attention over an entire video.
2. Confidence-Enhanced Multi-Head Attention
In real-world scenarios, frames may be compromised by occlusions (e.g., a hand covering the face) or motion blur. 1DFormer includes a Confidence Branch that predicts the quality of features in each frame. These scores are used to down-weight unreliable frames during the attention process, ensuring that "bad" data does not corrupt the tracking history.
3. Hierarchical Structural Modeling
To maintain the integrity of the facial structure, 1DFormer groups landmarks into seven semantic components (eyes, eyebrows, nose, mouth, and contour). Using 1D Convolutional layers, the model captures:
- Intra-group patterns: Local relationships within a component (e.g., the specific shape of the mouth).
- Inter-group patterns: Global relationships between different components (e.g., the spatial distance between the eyes and the nose).
Experimental Results and Key Insights
The model was rigorously evaluated on the 300VW (300 Videos in the Wild) and TF (Talking Face) benchmarks. 1DFormer achieved state-of-the-art (SOTA) performance across several metrics:
- Accuracy: On the challenging 300VW S3 subset, it achieved a Normalized Root Mean Squared Error (NRMSE) of 3.80, a 7.7% improvement over the previous best 1D method.
- Stability: Tracking stability is critical for video applications. 1DFormer improved stability metrics by up to 45% on the TF database.
- Structural Integrity: The authors found that 1D CNNs were more effective than standard Transformer attention for modeling spatial structure, as they helped maintain the "semantic distinctness" of landmarks rather than blurring them together.
Conclusion and Future Work
1DFormer demonstrates that 1D representations are a "sweet spot" for facial tracking, offering high resolution with low memory overhead. By explicitly modeling temporal confidence and hierarchical geometry, the framework provides a robust solution for tracking in the wild.
Future research may focus on more direct supervision for the confidence branch, as the current model relies on flow-based pseudo-labels. Additionally, while highly efficient, the fixed grouping of facial landmarks suggests that adapting the architecture for non-human tracking (e.g., animal pose estimation) would require further refinement of the structural modeling modules.
Summary updated