arXiv:2611.01822cs.CVNov 2026

Manuscript Offprint

arXiv:2611.01822

RCFormer: Reliability-aware Context Transformer for Occlusion-Robust Facial Landmark Detection

Ashish Kumar, Prashant Kumar, Mallika Garg

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Facial landmark detection has advanced substantially under regular imaging conditions, yet occlusion, poor illumination, and large pose changes remain major sources of error because local facial evidence can become incomplete or misleading. Context-guided latent patch recovery offers a promising way to address this issue by inferring unreliable patch representations from surrounding facial context before heatmap prediction. However, the recovered context can itself be unreliable when it is weakly adapted to the input face, influenced by corrupted neighboring patches, or blended without preserving local spatial coherence. We propose RCFormer, a Reliability-aware Context Transformer for occlusion-robust facial landmark detection. RCFormer strengthens latent patch recovery with three reliability-oriented components: visible-context conditioning (VCC), which adapts the context representation using a visibility-weighted global facial summary; visibility-guided context aggregation (VGCA), which reduces the influence of unreliable source patches during attention; and spatial residual correction (SRC), which refines blended latent features using neighboring patch information. The recovered heatmaps are then used as reliability-aware structural cues for existing landmark detection networks. Experiments show that RCFormer improves heatmap recovery and achieves strong landmark localization results on the WFLW, COFW, and 300W datasets. Code is available at: https://github.com/havelhakimi/RCFormer

1 Introduction

Facial landmark detection (FLD) aims to identify semantically meaningful facial keypoints, such as those around the eyes, nose, mouth, and facial contour. It serves as a fundamental component in many face-related applications, including face recognition [☐], facial expression analysis [☐], head-pose estimation [☐], and augmented reality [☐]. With advances in deep neural networks, FLD methods have achieved strong performance under regular imaging

© 2026. The copyright of this document resides with its authors. It may be distributed unchanged freely in print or electronic forms. *All authors contributed equally to this work.

arXiv:2611.01822v1 [cs.CV] 1No.26 conditions. However, their performance often degrades in challenging scenarios involving occlusion, extreme illumination, and large head-pose variation, where local facial evidence may be incomplete or misleading. In such cases, features extracted from affected regions can become corrupted, making accurate landmark localization difficult. Therefore, improving FLD robustness requires not only detecting reliable facial evidence but also recovering useful structural cues when local observations are degraded or unavailable.

A promising direction in occlusion-robust FLD is context-guided latent patch recovery, which addresses unreliable facial regions in the latent feature space before landmark prediction. Rather than relying only on features extracted from a potentially occluded patch, this approach estimates its representation from surrounding facial context. This is motivated by the strong structural dependency among facial regions: visible areas around the eyes, nose, mouth, and contour can provide cues about the expected representation of a missing or corrupted region. The recovered patch feature therefore serves as a context-derived alternative when the target patch is unreliable or unavailable. By recovering degraded latent features before heatmap decoding, context-guided recovery can generate more reliable heatmaps and improve landmark localization under partial visibility. ORFormer [☐] is a representative method in this direction, introducing messenger tokens that aggregate information from non-target patches and use it for occlusion-aware feature recovery.

Although context-guided latent patch recovery offers an effective way to handle corrupted facial regions, it introduces a second reliability problem: the recovered context is useful only when the context itself is trustworthy. A context query that is mainly shaped by learned tokens may not fully adapt to the visible structure of the current face, where pose, expression, identity, and occlusion patterns can vary significantly. Moreover, the surrounding context may also contain unreliable patches, so aggregating features without explicitly suppressing corrupted source regions can propagate degraded information into the recovered representation. Finally, recovering each latent patch through patch-wise blending can overlook the local continuity of facial contours and neighboring structures, leading to features that are context-derived but not spatially coherent. These limitations motivate a recovery mechanism that is image-adaptive, visibility-aware, and spatially refined before heatmap decoding.

Building on context-guided latent patch recovery, we introduce RCFormer, a Reliability-aware Context Transformer for occlusion-robust FLD. RCFormer addresses the reliability limitations above by making context recovery image-adaptive, visibility-aware, and spatially coherent. First, visible-context conditioning (VCC) adapts the context representation using a visibility-weighted global facial summary, allowing the recovery branch to reflect the visible structure of the current face. Second, visibility-guided context aggregation (VGCA) suppresses unreliable source patches during attention, so corrupted regions contribute less to the recovered representation. Third, spatial residual correction (SRC) refines the blended latent features with neighboring patch information, improving local continuity especially in regions predicted to be unreliable.

We incorporate the recovered heatmaps generated by RCFormer as reliability-aware structural cues for existing landmark detection networks. These heatmaps transfer recovered facial structure to the landmark network and improve prediction under partial visibility. Experiments on WFLW [☐], COFW [☐], and 300W [☐] show that RCFormer improves heatmap quality and achieves strong landmark localization performance. Our main contributions are summarized as follows:

  • We identify a reliability gap in context-guided latent patch recovery, where the recov-

ered context may be insufficiently adaptive to the input face, affected by unreliable source patches, or weakly constrained by local spatial structure.

  • We propose RCFormer, a reliability-aware context transformer with visible-context conditioning (VCC), visibility-guided context aggregation (VGCA), and spatial residual correction (SRC) to improve context recovery.

  • We validate RCFormer on WFLW, COFW, and 300W, showing improved heatmap recovery and strong landmark localization under challenging facial conditions.