Abstract
Head pose estimation plays an important role in many real-world applications. However, the performance of existing methods degrades significantly when facial regions are occluded by face masks. To address this limitation, this paper proposes a two-stage framework that integrates diffusion-based face restoration with landmark-independent head pose estimation. In the proposed framework, face mask regions are first detected through segmentation, and the occluded facial regions are reconstructed using a pretrained Stable Diffusion model. The restored facial images are then fed into a deep learning-based head pose estimation model to predict the yaw, pitch, and roll angles. Experiments were conducted on a masked-face dataset constructed from AFLW2000 dataset by synthesizing realistic face-mask occlusions. The proposed framework achieves an average Mean Absolute Error (MAE) of 3.83° under mask occlusion, outperforming the landmark-based baseline and the evaluated landmark-independent head pose estimation methods. Furthermore, an ablation study shows that diffusion-based face restoration reduces the Average MAE from 5.43° to 3.83°, demonstrating its effectiveness in mitigating the information loss caused by facial occlusion and improving head pose estimation accuracy.
1. Introduction
Head pose estimation plays a critical role in a wide range of applications, including human–computer interaction, driver assistance systems, augmented and virtual reality (AR/VR), and healthcare. In human–computer interaction, it is commonly used to infer a user’s gaze direction and attention state [1,2]. In driver assistance systems, head pose estimation is essential for detecting driver distraction and drowsiness, thereby improving driving safety [3,4]. In AR/VR environments, real-time head pose estimation enables natural viewpoint control and enhances user immersion [5]. In healthcare, it has also been applied to patient posture assessment and rehabilitation support [6].
1.1. Landmark-Based Head Pose Estimation
Head pose estimation methods can be broadly classified into two categories: landmark-based approaches and deep learning-based approaches.
Landmark-based head pose estimation methods detect facial feature points (e.g., the eyes, nose, and mouth) and estimate head pose based on their geometric relationships [7,8]. Typically, head pose is computed by solving a Perspective-n-Point (PnP) problem, which establishes correspondences between 2D facial landmarks and a predefined 3D face model [9]. This approach originated from early studies in the 1990s that estimated head pose by aligning facial feature points with a 3D rigid head model [10,11]. Subsequently, research evolved from geometric estimation using a small number of 2D feature points to more sophisticated model-based methods incorporating detailed 3D head models [12]. The introduction of textured 3D face models further improved robustness to variations in illumination and head pose [13].
The number of facial landmarks used for head pose estimation has also increased substantially over time. Early methods relied on only a few to a dozen feature points [14], whereas later approaches employed several dozen landmarks, enabled by advances in statistical shape modeling, to represent facial geometry more accurately [15,16]. In parallel, pose estimation techniques evolved from simple 2D geometric approximations to the direct estimation of physically consistent 3D pose parameters.
Landmark-based methods have a well-established theoretical foundation and can achieve satisfactory performance with relatively small amounts of training data. In addition, the explicit correspondence between facial landmarks and pose estimation results makes these methods highly interpretable. However, their performance strongly depends on the accuracy of landmark detection. When facial regions are occluded, landmarks may be inaccurately detected or completely missing, and these errors can propagate directly to the subsequent pose estimation stage, resulting in substantial performance degradation [17].
1.2. Deep Learning-Based Face Orientation Estimation
Deep learning has demonstrated strong performance in various image processing and machine vision applications [18,19]. In particular, deep learning-based head pose estimation methods have been extensively studied since the 2010s. These approaches take facial images as input and directly estimate the Euler angles (yaw, pitch, and roll) representing head pose [20,21]. Unlike landmark-based methods, many deep learning-based approaches do not require explicit landmark detection and instead exploit appearance features extracted directly from facial images. Early studies primarily adopted regression-based networks to predict Euler angles from 2D facial images. For example, HopeNet, proposed by Ruiz et al. [20], combines classification and regression for head pose estimation, improving estimation stability and accuracy.
As the field has evolved, network architectures have become increasingly sophisticated. Deeper and more expressive architectures, such as residual networks (ResNet), have been introduced to provide stronger feature representation capabilities [22]. FSA-Net [21] introduces feature aggregation to effectively combine features at different levels for accurate head pose estimation, while WHENet [23] extends the estimation range to handle large head rotations. Furthermore, several studies have formulated head pose estimation as a hybrid classification–regression problem by discretizing continuous pose angles into classification bins and subsequently recovering continuous angle values [24]. This strategy can improve training stability and estimation accuracy on large-scale datasets.
Meanwhile, the estimation paradigm has gradually expanded from direct 2D pose regression to methods that explicitly exploit 3D facial information. While early deep learning-based approaches directly estimated Euler angles from 2D images, more recent methods estimate the parameters of a 3D Morphable Model (3DMM) [25] or employ multi-task learning frameworks that jointly estimate 3D facial shape and head pose [26]. These developments have extended head pose estimation beyond direct image-based regression toward approaches that model the underlying three-dimensional facial structure.
Because many deep learning-based methods do not rely on explicit landmark extraction, they are generally less sensitive to errors caused by inaccurate landmark detection and can achieve higher estimation accuracy than conventional landmark-based approaches [20]. However, when large portions of the face are occluded, essential visual information is lost. Consequently, even deep learning-based methods may struggle to extract reliable features, leading to performance degradation under severe occlusion [27].
1.3. Face Orientation Estimation Under Occlusion
In real-world environments, fully observable facial conditions are often unavailable. Face masks, sunglasses, hats, hands, and hair can partially obscure facial regions, making facial occlusion a common phenomenon in practical applications.
Facial occlusion can be broadly categorized into two types: temporary occlusion and persistent occlusion. Temporary occlusion occurs when parts of the body, such as hands or hair, briefly and dynamically cover the face. In contrast, persistent occlusion refers to situations in which specific facial regions are continuously obscured by objects such as face masks, eyeglasses, or sunglasses. In this study, we focus on persistent occlusion caused by face masks. Unlike temporary occlusion, persistent occlusion continuously obscures specific facial regions and can affect both landmark detection and visual feature extraction, leading to degradation in head pose estimation accuracy.
To address facial occlusion, various approaches have been proposed. These include methods that learn occlusion-robust feature representations through latent space regression [26] and methods that combine attention mechanisms with Capsule Networks to emphasize informative features under occlusion [28]. Although these approaches improve robustness to occlusion, they estimate head pose directly from partially occluded facial images without explicitly recovering the missing facial information. Consequently, the loss of visual information caused by occlusion remains a challenge.
Recent advances in image generation techniques, particularly generative adversarial networks (GANs) [29] and diffusion models [30], have enabled high-quality reconstruction of missing image content [31,32]. Based on these advances, restore-then-estimate approaches first reconstruct occluded facial regions and subsequently perform head pose estimation on the restored images. For example, previous work [33] reconstructed occluded facial regions using an image completion model and then estimated head pose using facial landmarks and geometric fitting. Although facial restoration can recover information lost due to occlusion, the subsequent head pose estimation stage still depends on accurate facial landmark localization. Therefore, landmark localization errors in the restored facial images can propagate to the final head pose estimation.
Motivated by these limitations, this study integrates diffusion-based face restoration with landmark-independent head pose estimation. The proposed framework differs from existing approaches in two main aspects. First, unlike existing restore-then-estimate approaches that rely on facial landmarks and geometric fitting after face restoration, the proposed framework estimates head pose from the restored facial images using a deep learning-based model without explicit landmark detection. Second, unlike landmark-independent head pose estimation methods that can be applied directly to occluded facial images, the proposed framework first reconstructs the facial information lost due to occlusion and then performs landmark-independent head pose estimation on the restored images. In this way, the proposed framework combines the recovery of facial information lost due to occlusion with the elimination of dependence on facial landmark detection.
The main contributions of this study are summarized as follows:
- Landmark-independent restore-then-estimate framework for head pose estimation under facial occlusion.
We propose a two-stage framework that combines diffusion-based recovery of occluded facial information with landmark-independent head pose estimation. Unlike existing restore-then-estimate approaches that rely on facial landmarks and geometric fitting after restoration, the proposed framework estimates head pose directly from restored facial images without explicit landmark detection. Moreover, unlike landmark-independent methods that estimate head pose directly from occluded facial images, the proposed framework first recovers the missing facial information before pose estimation. This design addresses both occlusion-induced information loss and the dependence on facial landmark localization.
- Systematic evaluation of the contributions of face restoration and landmark-independent pose estimation.
We systematically evaluate the proposed framework on a masked-face dataset constructed from a publicly available dataset while preserving the original head pose annotations. Comparisons with a landmark-based restore-then-estimate baseline and representative landmark-independent methods, including HopeNet, FSA-Net, and WHENet, are conducted to evaluate the effectiveness of landmark-independent estimation after restoration. In addition, a controlled comparison using the same head pose estimation model with and without diffusion-based restoration is performed to evaluate the contribution of diffusion-based face restoration. Qualitative experiments on real masked-face images are also conducted to examine the applicability of the proposed framework to real-world face mask occlusion.
2. Proposed Method
In this study, we propose a two-stage framework that integrates face restoration with landmark-independent head pose estimation to improve estimation accuracy under facial occlusion. An overview of the proposed framework is shown in Figure 1. This study focuses specifically on persistent occlusion caused by face masks. However, the modular design allows the framework to be extended to other types of facial occlusion by adapting or replacing the corresponding components.
Figure 1.
Overview of the proposed framework.
The input to the proposed framework is a facial image, regardless of whether the subject is wearing a face mask. First, a segmentation model is employed to detect and localize mask-induced occlusion within the facial region. Based on the segmentation result, the framework determines whether face mask occlusion is present. If a face mask is detected, a diffusion-based image inpainting model is applied to reconstruct the occluded facial regions and generate a restored facial image. Otherwise, the original image is directly forwarded to the subsequent head pose estimation module without restoration. Finally, either the restored image or the original image is fed into a landmark-independent deep learning-based head pose estimation model, which estimates the three Euler angles: yaw, pitch, and roll.
In the proposed framework, head pose estimation is performed after restoring the facial information lost due to occlusion. By reconstructing the occluded facial regions before pose estimation, the framework provides more complete facial information for subsequent feature extraction and head pose estimation. In addition, the use of a landmark-independent head pose estimation model eliminates the need for explicit facial landmark detection and reduces the influence of inaccurate landmark localization.
The proposed framework follows a modular architecture rather than an end-to-end training scheme, with face restoration and head pose estimation implemented as separate stages. This design allows the individual modules to be independently replaced or updated according to application requirements.
2.1. Mask Segmentation Model
Wearing a face mask occludes a large portion of the face, particularly the mouth and nose regions, thereby obscuring important facial features and degrading head pose estimation accuracy. To address this issue, the proposed framework first determines whether the input facial image contains a face mask and performs face restoration only when mask-induced occlusion is detected.
In this study, ABANet [34] is adopted for face mask segmentation. ABANet is specifically designed to segment face mask regions in facial images, enabling reliable detection of mask-induced occlusion. Furthermore, it produces pixel-level segmentation masks, which can be directly used for the subsequent image inpainting process.
As shown in Figure 2, ABANet adopts an encoder–decoder architecture augmented with a boundary-aware attention module and a hybrid loss function, enabling accurate delineation of mask boundaries. The network was trained on the Masked Face Segmentation Dataset (MFSD) [34], which contains 11,601 images with 12,758 masked faces annotated at the pixel level. Experimental results reported in [34] demonstrate that ABANet achieves high segmentation accuracy on the MFSD, making it well suited for the proposed face restoration framework.
Figure 2.
Architecture of ABANet.
In this study, ABANet is applied to each input facial image to generate a segmentation map of the face mask region. The resulting segmentation map is converted into a binary mask, and the ratio of white pixels is calculated to determine whether a face mask is present. Specifically, the white pixel ratio is defined as the number of pixels classified as mask regions divided by the total number of pixels in the image. A face mask is considered to be present when the white pixel ratio exceeds a predefined threshold T. In this study, the threshold was set to T = 0.04, and its suitability was further evaluated through the sensitivity analysis presented in Section 3.5.2. When a face mask is detected, the binary mask is used as input to the subsequent diffusion-based face restoration module. Throughout this study, a publicly available pretrained ABANet model was used without additional training or fine-tuning.
2.2. Diffusion-Based Inpainting Model
Recent advances in image generation models, particularly Generative Adversarial Networks (GANs) [29] and diffusion models [30], have enabled the restoration of facial regions occluded by masks and other objects. Diffusion models generate images through a forward diffusion process, which gradually adds Gaussian noise to an image, and a reverse diffusion process, which progressively removes the noise to recover a clean image. During training, the model learns the probability distribution required to recover clean images from noisy observations, enabling high-quality image synthesis. Among diffusion models, Stable Diffusion [35] employs a latent diffusion architecture that performs the denoising process in a compressed latent space, enabling high-quality image generation and inpainting.
As illustrated in Figure 3, the proposed framework employs Stable Diffusion to restore facial regions occluded by a face mask. The binary mask generated by ABANet is used as the inpainting mask, and the masked facial region is reconstructed based on the visible facial information. During the restoration process, the input image is first encoded into a latent representation. Noise is added to the latent representation of the region to be restored, and the missing content is reconstructed through the reverse diffusion process conditioned on both the surrounding visual context and a text prompt. Consequently, Stable Diffusion uses the visible facial information to generate plausible facial structures in the occluded regions, including the nose, mouth, and jawline.
Figure 3.
Architecture of the Stable Diffusion model used in this study.
Since high-quality pretrained Stable Diffusion models are publicly available, additional training is not required. Previous work by Guo et al. [33] demonstrated the effectiveness of a pretrained Stable Diffusion model for face restoration. Therefore, Stable Diffusion v1.5 [36] was adopted in this study to restore facial regions occluded by face masks before head pose estimation.
Since diffusion-based face restoration is inherently stochastic, different restored images can be generated from the same input image. The objective of this study is not to perfectly reproduce the subject’s original appearance, but rather to recover the facial structural information necessary for accurate head pose estimation. Consequently, although each restored image may differ in local facial details, such as the contours of the nose or mouth, the overall head pose should remain consistent. To reduce the influence of random variations introduced by the restoration process, multiple restored images can be generated for each input image, and head pose is estimated independently from each restored image. The resulting yaw, pitch, and roll estimates are then averaged to obtain the final head pose. The influence of the number of restored images and the stochastic nature of diffusion-based restoration is further investigated in Section 3.5.1 and Section 3.5.3, respectively.
2.3. Head Pose Estimation Model
For head pose estimation, we adopt SixDRepNet [37], a Convolutional Neural Networks (CNN)-based landmark-independent head pose estimation model, as shown in Figure 4. Unlike conventional methods that directly regress Euler angles, SixDRepNet estimates head pose using a 6D rotation representation of the 3D rotation matrix. This representation avoids gimbal lock and angular discontinuities associated with Euler angles, enabling continuous and stable rotation estimation [37].
Figure 4.
Architecture of SixDRepNet.
SixDRepNet employs a ResNet backbone to extract facial features and estimate the 6D rotation representation. The network was trained on the 300W-LP dataset [25], a large-scale dataset containing diverse head pose variations. The results reported in [37] show that SixDRepNet achieves competitive head pose estimation accuracy on standard benchmark datasets.
In the proposed framework, the restored facial image is fed into SixDRepNet to estimate the head rotation matrix. The estimated rotation matrix is then converted into the corresponding Euler angles (yaw, pitch, and roll), which are used as the final head pose estimation results. Throughout this study, a publicly available pretrained SixDRepNet model was used without additional training or fine-tuning.
3. Experiments and Results
3.1. Experimental Setup
3.1.1. Dataset
In this study, the AFLW2000 dataset [25] is used as the basis for quantitative evaluation of head pose estimation under both non-occluded and mask-occluded conditions. AFLW2000 is a widely used benchmark constructed from a subset of the AFLW dataset [38]. It contains 2000 facial images with 3D facial annotations. Each image is annotated with head pose information obtained by fitting a 3D face model, providing the three Euler angles: yaw, pitch, and roll. The dataset includes images captured in unconstrained environments with diverse head poses, facial expressions, illumination conditions, and backgrounds, and has been widely used for evaluating head pose estimation methods [20,21,38].
Although several real masked-face datasets are publicly available, most do not provide continuous ground-truth head pose angles for yaw, pitch, and roll, which are required for MAE-based quantitative evaluation. Therefore, to quantitatively evaluate head pose estimation under face mask occlusion while preserving reliable head pose annotations, a corresponding masked-face dataset was constructed from AFLW2000 by synthetically adding face masks to the original images. The synthesized images retain the original AFLW2000 head pose annotations, enabling quantitative evaluation under mask occlusion.
Face mask synthesis was performed using MaskTheFace [39], which generates masked facial images based on facial landmark information. The tool estimates facial geometry from detected landmarks and overlays mask templates according to the position, scale, and orientation of the face. In this study, MaskTheFace was applied to all images in AFLW2000 to generate corresponding masked images. To increase the diversity of mask occlusion, mask templates were randomly selected from multiple types, including surgical masks, KN95 masks, and cloth masks with different colors and shapes. Examples of the original and synthesized masked images are shown in Figure 5.
Figure 5.
Examples of original AFLW2000 images and corresponding images with synthesized face masks.
The original and synthesized masked AFLW2000 images are used to evaluate head pose estimation performance under non-occluded and mask-occluded conditions, respectively. Since the synthesized masked images retain the original head pose annotations, the influence of face mask occlusion can be quantitatively evaluated under consistent head pose conditions.
To further examine the applicability of the proposed framework to real face mask occlusion, real masked-face images from the MAFA dataset [40] are additionally used for qualitative evaluation. MAFA contains facial images with real face mask occlusions captured under diverse real-world conditions. However, because MAFA does not provide continuous ground-truth head pose angles for yaw, pitch, and roll, it is used only for qualitative evaluation in this study. Details of this evaluation are presented in Section 3.4.
3.1.2. Evaluation Metrics
In this study, Mean Absolute Error (MAE) is used to evaluate head pose estimation performance. Since head pose is represented by three Euler angles—yaw, pitch, and roll—the MAE is calculated separately for each angle, and the arithmetic mean of the three MAE values is reported as the Average MAE, which provides an overall measure of head pose estimation performance across the three pose angles. All MAE values are reported in degrees (°).
The error for each pose angle is defined as the absolute difference between the predicted value and the corresponding ground truth:
where θpred and θgt denote the predicted and ground-truth pose angles, respectively.
Error = |θpred − θgt|
The mean absolute error over the evaluation dataset is calculated as:
where N is the number of images used for evaluation.
3.1.3. Implementation Details
The proposed framework consists of mask segmentation, diffusion-based face restoration, and head pose estimation. The implementation details and preprocessing procedures for each stage are described below.
For mask segmentation, ABANet was used with its standard preprocessing procedure. Each input image was resized to 256 × 256 pixels and converted into a tensor before being fed into ABANet. No face cropping or landmark-based alignment was performed. The predicted segmentation map was first normalized to the range of 0–255 and then converted into a binary mask using a threshold of 120. The resulting binary mask was resized to the original image resolution using bilinear interpolation. For masked images, morphological dilation with a 3 × 3 kernel for five iterations was applied to enlarge the region used for inpainting region.
For face restoration, Stable Diffusion Inpainting v1.5 (stable-diffusion-inpainting) [36] was used. The original image and the dilated binary mask were converted to RGB format and resized to 512 × 512 pixels, without additional cropping or alignment. The text prompt was “face of people”, and no negative prompt was used. The PNDMScheduler was employed with 50 denoising steps and a guidance scale of 7.5. The random seed was not fixed. Inference was performed using FP16 precision, with the safety checker disabled.
For head pose estimation, SixDRepNet was used as the landmark-independent estimator. Each input image to SixDRepNet was resized so that its shorter side was 256 pixels and then center-cropped to 224 × 224 pixels. The image was normalized using the standard ImageNet mean and standard deviation. No landmark-based alignment was performed. SixDRepNet outputs a rotation matrix, which was converted into Euler angles representing yaw, pitch, and roll and expressed in degrees for evaluation.
All experiments were conducted on an NVIDIA GeForce RTX 3090 GPU with 24 GB of memory. The software environment consisted of PyTorch 2.8.0+cu128, CUDA 12.8, and Diffusers 0.36.0.
3.2. Comparison with Head Pose Estimation Methods
3.2.1. Comparison with the Landmark-Based Method
We quantitatively compare the proposed method with the landmark-based head pose estimation method [33] using the synthesized masked-face dataset constructed from AFLW2000. The baseline first restores the occluded facial regions using a diffusion model and then estimates head pose by aligning detected facial landmarks with a predefined canonical face model using the Iterative Closest Point (ICP) algorithm [41,42]. In contrast, the proposed method estimates head pose directly from the restored facial images using a landmark-independent deep learning-based model. Therefore, this comparison evaluates the effectiveness of adopting landmark-independent head pose estimation after face restoration. The head pose estimation procedure following face restoration in the landmark-based method does not require model training. In contrast, the proposed method uses the publicly available pretrained SixDRepNet model, which was trained on the 300W-LP dataset [23]. For consistency with the experimental setup recommended for the landmark-based method, 25 restored images were generated for each masked input image for both methods. Both methods were evaluated using the same masked-face test dataset constructed from AFLW2000, evaluation metrics, and hardware environment.
Table 1 summarizes the estimation accuracy under three evaluation conditions: No Occlusion, Mask Occlusion, and Overall. No Occlusion corresponds to the original AFLW2000 images, without synthetic face mask occlusion. Mask Occlusion corresponds to the synthesized masked-face images, where the lower facial region is occluded by a face mask. Under this condition, the occluded facial regions are restored before head pose estimation. Overall reports the average performance across the No Occlusion and Mask Occlusion conditions.
Table 1.
Comparison of head pose estimation performance between the landmark-based baseline and the proposed method.
As shown in Table 1, the proposed method achieves substantially better overall performance than the landmark-based baseline, particularly for pitch and roll estimation. Under the Mask Occlusion condition, the proposed method achieves MAEs of 4.05°, 4.94°, and 2.51° for yaw, pitch, and roll, respectively. Although its yaw error is slightly higher than that of the landmark-based baseline (3.95°), the proposed method substantially reduces the pitch and roll errors, resulting in a lower Average MAE (3.83° vs. 8.09°). Overall, the proposed method reduces the Average MAE from 8.16° to 3.31°. These results demonstrate the advantage of using landmark-independent head pose estimation after face restoration.
A notable observation is that the landmark-based baseline exhibits relatively large pitch errors under both the No Occlusion (17.56°) and Mask Occlusion (16.69°) conditions. Although the pitch error is slightly lower under the Mask Occlusion condition, the difference is relatively small (0.87°) compared with the large absolute errors observed under both conditions. The consistently high pitch errors suggest that the main limitation is associated with the landmark-based estimation procedure itself rather than being primarily caused by mask occlusion. In this baseline, head pose is estimated by aligning detected facial landmarks with a single reference face using ICP. Therefore, the estimation may be sensitive to inter-subject variations in facial geometry and landmark positions, which may contribute to the large pitch errors and the small difference between the two experimental conditions.
3.2.2. Comparison with the Landmark- Independent Method
To evaluate the proposed framework against existing landmark-independent head pose estimation approaches, we compare it with three representative methods: HopeNet [20], FSA-Net [21], and WHENet [23]. HopeNet and FSA-Net were evaluated using both their publicly available pretrained models and models fine-tuned on the masked-face training data. WHENet was evaluated using the publicly available pretrained model because its training code was not available. The pretrained HopeNet and FSA-Net models were trained on the 300W-LP dataset, while the pretrained WHENet model was trained using 300W-LP together with the CMU Panoptic Dataset. Thus, although the original training conditions of these methods are not completely identical, the major compared models were trained using 300W-LP, which is also the training dataset used for the pretrained SixDRepNet model adopted in the proposed framework. Since the main objective of this study is to evaluate head pose estimation under face mask occlusion, HopeNet and FSA-Net were additionally fine-tuned using masked-face training data constructed from AFLW2000. The same mask synthesis procedure was used to construct the training and test data. This additional fine-tuning reduces the potential influence of differences in adaptation to mask occlusion and provides a more comprehensive comparison.
All compared methods were evaluated using the same masked-face test data, evaluation metrics, and hardware environment. MAE was calculated for yaw, pitch, and roll, and the Average MAE was calculated as the arithmetic mean of the three MAEs. For the proposed method, 25 restored images were generated for each masked input image, and the resulting yaw, pitch, and roll estimates were averaged to obtain the final head pose.
As shown in Table 2, the proposed method achieves the lowest Average MAE of 3.83° among the evaluated methods. Fine-tuning substantially improves the performance of both HopeNet and FSA-Net on the masked-face data; however, their Average MAEs remain 6.07° and 5.13°, respectively. In comparison, the proposed method achieves lower errors for yaw, pitch, and roll, resulting in the best overall performance. The proposed method also substantially outperforms the pretrained HopeNet, FSA-Net, and WHENet models across all three pose angles.
Table 2.
Comparison with landmark-independent head pose estimation methods under mask occlusion.
These results demonstrate that the proposed restore-then-estimate framework achieves better head pose estimation performance under face mask occlusion than the evaluated landmark-independent methods. Notably, the proposed method also outperforms HopeNet and FSA-Net after these models are fine-tuned on the masked-face data, indicating the effectiveness of the proposed framework beyond directly applying or fine-tuning existing landmark-independent estimators on occluded facial images. The specific contribution of diffusion-based face restoration is further evaluated through the controlled experiment presented in Section 3.3.
3.3. Effect of Diffusion-Based Face Restoration
To evaluate the contribution of diffusion-based face restoration to head pose estimation, we conduct a controlled experiment using the same landmark-independent head pose estimator, SixDRepNet, with and without face restoration. In the proposed method, the occluded facial regions are first restored using Stable Diffusion before head pose estimation, whereas the method without restoration directly estimates head pose from the masked facial images. This comparison isolates the effect of diffusion-based face restoration while keeping the head pose estimation model unchanged.
Table 3 summarizes the MAEs under the Mask Occlusion condition. The proposed method with diffusion-based face restoration reduces the estimation errors across all three pose angles. Specifically, the MAE decreases from 6.15° to 4.05° for yaw, from 6.67° to 4.94° for pitch, and from 3.46° to 2.51° for roll. Consequently, the Average MAE is reduced from 5.43° to 3.83°.
Table 3.
Effect of diffusion-based face restoration on head pose estimation performance under mask occlusion.
These results demonstrate that the performance improvement is not solely attributable to the landmark-independent head pose estimator. When the same SixDRepNet estimator is used, restoring the occluded facial regions before pose estimation reduces the Average MAE by 1.60°, corresponding to an improvement of approximately 29.5%. This indicates that diffusion-based face restoration mitigates the information loss caused by mask occlusion and thereby improves subsequent head pose estimation accuracy.
3.4. Qualitative Evaluation
Representative head pose estimation results on the synthesized masked-face dataset constructed from AFLW2000 are shown in Figure 6. The figure compares the proposed method with the landmark-based baseline and three representative landmark-independent methods: HopeNet, FSA-Net, and WHENet. From top to bottom, the rows show the ground truth, landmark-based baseline, fine-tuned HopeNet, fine-tuned FSA-Net, pretrained WHENet, and the proposed method, respectively.
Figure 6.
Representative head pose estimation results on the synthesized masked-face dataset constructed from AFLW2000. From top to bottom: ground-truth head pose, landmark-based baseline, fine-tuned HopeNet, fine-tuned FSA-Net, pretrained WHENet, and the proposed method.
As shown in Figure 6, the proposed method produces head pose estimates that are generally close to the ground-truth poses across different head orientations. In several cases, the proposed method provides more accurate pose estimates than the landmark-based baseline, while maintaining performance comparable to or better than the other landmark-independent methods. These qualitative observations are consistent with the quantitative results presented in Section 3.2.1 and Section 3.2.2, where the proposed method achieves the lowest Average MAE among the evaluated methods.
To further examine the applicability of the proposed framework to real-world face mask occlusion, we additionally conducted a qualitative evaluation using real masked-face images randomly selected from the MAFA test set. Unlike AFLW2000, MAFA does not provide continuous ground-truth yaw, pitch, and roll angles. Therefore, quantitative evaluation using MAE cannot be performed, and the MAFA experiment is used only for qualitative evaluation.
As shown in Figure 7, the proposed method provides visually reasonable head pose estimates across different real masked-face images. In several representative cases, particularly those shown in the sixth and seventh columns, the estimated head orientations produced by the proposed method appear more consistent with the observed facial orientations than those produced by the landmark-based baseline. In the third to fifth columns, the proposed method also shows qualitatively comparable or more reasonable head pose estimates than HopeNet, FSA-Net, and WHENet. Since ground-truth head pose angles are unavailable for these images, these results should be interpreted only as a qualitative assessment rather than as a quantitative accuracy comparison.
Figure 7.
Qualitative comparison of head pose estimation on real masked-face images from the MAFA dataset. From top to bottom: input image, landmark-based baseline, fine-tuned HopeNet, fine-tuned FSA-Net, pretrained WHENet, and the proposed method.
For both Figure 6 and Figure 7, if a face mask was detected, 25 restored images were generated for each input image for the landmark-based baseline and the proposed method. Head pose was estimated independently from each restored image, and the resulting yaw, pitch, and roll estimates were averaged to obtain the final head pose shown in the figures.
3.5. Sensitivity and Computational Analysis
3.5.1. Number of Restored Images and Computational Cost
To investigate the effect of the number of restored images on head pose estimation accuracy and computational cost, we varied the number of images generated by Stable Diffusion for each masked input image. For each setting, the MAE for yaw, pitch, and roll was calculated, together with the Average MAE and the runtime required for diffusion-based face restoration. The results are summarized in Table 4.
Table 4.
Effect of the number of restored images on head pose estimation accuracy and computational cost.
As shown in Table 4, increasing the number of restored images does not lead to a monotonic improvement in head pose estimation accuracy. The Average MAE remains nearly unchanged across the evaluated settings. For example, using a single restored image achieves an Average MAE of 3.82°, while the lowest Average MAE of 3.81° is obtained using 15 restored images. This difference is negligible. In contrast, the computational cost increases substantially as the number of restored images increases.
These results indicate that generating multiple restored images does not provide a meaningful improvement in head pose estimation accuracy, despite substantially increasing the computational cost. Therefore, using a small number of restored images is preferable in practical applications, particularly when computational resources are limited or real-time performance is required.
3.5.2. Mask Detection Threshold
To investigate the sensitivity of mask detection to the threshold T, three threshold values, T = 0.01, 0.04, and 0.10, were evaluated. The true positive rate (TPR) for masked images and the true negative rate (TNR) for non-masked images were used to evaluate the mask detection performance. The results are summarized in Table 5.
Table 5.
Sensitivity analysis of the mask detection threshold.
At T = 0.01, the TPR for masked images is high (99.67%), whereas the TNR for non-masked images is only 22.33%, indicating a high false-positive rate. Increasing the threshold to T = 0.10 improves the TNR to 71.90% but substantially reduces the TPR to 41.48%. At T = 0.04, the method maintains a high TPR of 98.61% while improving the TNR to 45.39% compared with T = 0.01. Therefore, T = 0.04 was selected as a reasonable trade-off between maintaining a high detection rate for masked faces and reducing false-positive detections for non-masked faces.
3.5.3. Stochastic Diffusion Restoration
Since diffusion-based restoration is stochastic, different random seeds may produce variations in the restored facial regions. To evaluate the influence of this stochasticity on head pose estimation, repeated experiments were conducted in which one restored image was generated for each input image in each run, with only the random seed varied across runs. Head pose was estimated using SixDRepNet for each restored image, and the mean and standard deviation of the MAE across different random seeds were calculated for yaw, pitch, and roll, as well as for the Average MAE.
Figure 8 shows representative restoration results generated using different random seeds. Although visual variations can be observed in the reconstructed facial regions, the overall facial structure and head orientation remain relatively consistent. The corresponding head pose estimation results are summarized in Table 6.
Figure 8.
Qualitative examples of diffusion-based face restoration using different random seeds. The first and second columns show the original and masked images, respectively, while the remaining columns show restoration results generated using different random seeds.
Table 6.
Sensitivity of head pose estimation to stochastic diffusion-based restoration.
The relatively small standard deviations across different random seeds indicate that, although Stable Diffusion generates visually different restoration results, the resulting head pose estimation performance remains relatively stable. These results indicate that the stochastic variation introduced by diffusion-based restoration has a limited influence on subsequent head pose estimation performance.
3.6. Discussions
The present study focuses on persistent facial occlusion caused by face masks. Although the proposed framework demonstrates improved head pose estimation under mask occlusion, real-world facial occlusion can also be caused by hands, hair, scarves, eyeglasses, and other objects. Since the current segmentation component is specifically designed to detect mask-induced occlusion, extending the framework to other types of facial occlusion would require adapting or replacing the occlusion detection and segmentation component, as well as evaluating the framework using appropriate datasets with reliable head pose annotations.
In addition, this study employs Stable Diffusion v1.5 as the face restoration model and focuses on the integration of diffusion-based face restoration with landmark-independent head pose estimation rather than on a comparison of different restoration models. Different restoration models may produce different restoration characteristics, which may affect subsequent head pose estimation performance. Therefore, comparing alternative face restoration models and extending the framework to more diverse types of facial occlusion remain important directions for future work.
4. Conclusions
In this study, we proposed a two-stage framework that integrates diffusion-based face restoration with landmark-independent head pose estimation to improve head pose estimation under facial occlusion. Experimental results demonstrated that the proposed method reduced the overall Average MAE from 8.16° to 3.31° compared with the landmark-based baseline. Under mask occlusion, the proposed method achieved an Average MAE of 3.83°, outperforming the evaluated landmark-independent methods, including HopeNet, FSA-Net, and WHENet. Furthermore, the controlled experiment using the same SixDRepNet estimator showed that diffusion-based face restoration reduced the Average MAE from 5.43° to 3.83°, corresponding to an improvement of approximately 29.5%. These results demonstrate that diffusion-based face restoration and landmark-independent head pose estimation both contribute to the improved performance of the proposed framework by mitigating the information loss caused by occlusion and eliminating dependence on facial landmark detection, respectively.
Although the proposed framework demonstrates improved accuracy under face mask occlusion, the present study focuses specifically on mask-induced occlusion, and the current segmentation component is designed accordingly. Future work will extend the framework to other types of facial occlusion, such as hands, hair, scarves, and eyeglasses, by adapting or replacing the occlusion detection and segmentation component. In addition, Stable Diffusion v1.5 was used as the face restoration model in this study. Future work will compare alternative face restoration models to investigate their influence on subsequent head pose estimation performance.
Author Contributions
Conceptualization, A.H. and Y.G.; methodology, A.H. and Y.G.; software, A.H.; validation, A.H. and Y.G.; formal analysis, A.H. and Y.G.; investigation, A.H., Y.G., B.R. and T.H.; data curation, A.H.; writing—original draft preparation, A.H. and Y.G.; writing—review and editing, A.H. and Y.G.; visualization, A.H.; supervision, Y.G.; project administration, Y.G. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The dataset used in this study is publicly available at http://www.cbsr.ia.ac.cn/users/xiangyuzhu/projects/3DDFA/main.htm (accessed on 10 May 2026).
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Wang, K.; Zhao, R.; Ji, Q. Human computer interaction with head pose, eye gaze and body gestures. In Proceedings of the 13th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2018), Xi’an, China, 15–19 May 2018; p. 789. [Google Scholar]
- Liu, H.; Nie, H.; Zhang, Z.; Li, Y.-F. Anisotropic angle distribution learning for head pose estimation and attention understanding in human-computer interaction. Neurocomputing 2021, 433, 310–322. [Google Scholar] [CrossRef] [Scilit]
- Ye, M.; Zhang, W.; Cao, P.; Liu, K. Driver fatigue detection based on residual channel attention network and head pose estimation. Appl. Sci. 2021, 11, 9195. [Google Scholar] [CrossRef] [Scilit]
- Perdana, M.I.; Anggraeni, W.; Sidharta, H.A.; Yuniarno, E.M.; Purnomo, M.H. Early warning pedestrian crossing intention from its head gesture using head pose estimation. In Proceedings of the International Seminar on Intelligent Technology and Its Applications (ISITIA), Surabaya, Indonesia, 21–22 July 2021; pp. 402–407. [Google Scholar]
- Grinshpoon, A.; Sadri, S.; Loeb, G.J.; Elvezio, C.; Feiner, S.K. Hands free interaction for augmented reality in vascular interventions. In Proceedings of the IEEE Conference on Virtual Reality and 3D User Interfaces (VR), Tubingen, Germany, 18–22 March 2018; pp. 751–752. [Google Scholar]
- Ritthipravat, P.; Chotikkakamthorn, K.; Lie, W.N.; Kusakunniran, W.; Tuakta, P.; Benjapornlert, P. Deep-learning-based head pose estimation from a single RGB image and its application to medical CROM measurement. Multimed. Tools Appl. 2024, 83, 77009–77028. [Google Scholar] [CrossRef] [Scilit]
- Gourier, N.; Hall, D.; Crowley, J.L. Estimating face orientation from robust detection of salient facial structures. In Proceedings of the FG Net Workshop on Visual Observation of Deictic Gestures, Cambridge, UK, 23–26 August 2004; pp. 17–25. [Google Scholar]
- Saragih, J.M.; Lucey, C.; Cohn, J.F. Face alignment through subspace constrained mean-shifts. In Proceedings of the IEEE 12th International Conference on Computer Vision (ICCV), Kyoto, Japan, 29 September–2 October 2009; pp. 1034–1041. [Google Scholar]
- Gao, X.-S.; Hou, X.-R.; Tang, J.; Cheng, H.-F. Complete solution classification for the perspective three-point problem. IEEE Trans. Pattern Anal. Mach. Intell. 2003, 25, 930–943. [Google Scholar] [CrossRef] [Scilit]
- Gee, A.; Cipolla, R. Determining the gaze of faces in images. Image Vis. Comput. 1994, 12, 639–647. [Google Scholar] [CrossRef] [Scilit]
- Lopez, R.; Huang, T.S. 3D head pose computation from 2D images: Templates versus features. In Proceedings of the International Conference on Image Processing (ICIP), Washington, DC, USA, 23–26 October 1995; pp. 599–602. [Google Scholar]
- Meyer, G.P.; Gupta, S.; Frosio, I.; Reddy, D.; Kautz, J. Robust model-based 3D head pose estimation. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Washington, DC, USA, 7–13 December 2015; pp. 3649–3657. [Google Scholar]
- Blanz, V.; Vetter, T. A morphable model for the synthesis of 3D faces. In Proceedings of the 26th Annual Conference on Computer Graphics and Interactive Techniques, Los Angeles, CA, USA, 8–13 August 1999; pp. 187–194. [Google Scholar]
- Gupta, A.; Thakkar, K.; Gandhi, V.; Narayanan, P.J. Nose, Eyes and Ears: Head Pose Estimation by Locating Facial Keypoints. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brighton, UK, 12–17 May 2019; pp. 1977–1981. [Google Scholar]
- Kazemi, V.; Sullivan, J. One millisecond face alignment with an ensemble of regression trees. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Columbus, OH, USA, 23–28 June 2014; pp. 1867–1874. [Google Scholar]
- Kartynnik, Y.; Ablavatski, A.; Grishchenko, I.; Grundmann, M. Real-time facial surface geometry from monocular video on mobile GPUs. arXiv 2019, arXiv:1907.06724. [Google Scholar]
- Díaz Barros, J.M.; Mirbach, B.; Garcia, F.; Varanasi, K.; Stricker, D. Real-time head pose estimation by tracking and detection of keypoints and facial landmarks. In Proceedings of the International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP), Funchal, Madeira, Portugal, 27–29 January 2018; pp. 326–349. [Google Scholar]
- Tan, F.; Zhai, M.; Zhai, C. Foreign object detection in urban rail transit based on deep differentiation segmentation neural network. Heliyon 2024, 10, e37072. [Google Scholar] [CrossRef] [Scilit]
- Xiong, X.; Cai, X.; Fan, Z.; Chen, F. Electromagnetic wave echo characteristic atlas and automatic recognition of internal distresses in asphalt pavement combined with 3D-GPR and deep learning. Nondestruct. Test. Eval. 2026. [Google Scholar] [CrossRef] [Scilit]
- Ruiz, N.; Chong, E.; Rehg, J.M. Fine-grained head pose estimation without keypoints. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Salt Lake City, UT, USA, 18–22 June 2018; pp. 2074–2083. [Google Scholar]
- Yang, T.-Y.; Chen, Y.-T.; Lin, Y.-Y.; Chuang, Y.-Y. FSA-Net: Learning fine-grained structure aggregation for head pose estimation from a single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 16–20 June 2019; pp. 1087–1096. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Zhou, Y.; Gregson, J. WHENet: Real-time fine-grained estimation for wide range head pose. arXiv 2020, arXiv:2005.10353. [Google Scholar]
- Wang, H.; Chen, Z.; Zhou, Y. Hybrid coarse-fine classification for head pose estimation. arXiv 2019, arXiv:1901.06778. [Google Scholar]
- Zhu, X.; Lei, Z.; Liu, X.; Shi, H.; Li, S.Z. Face alignment across large poses: A 3D solution. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 26 June–1 July 2016; pp. 146–155. [Google Scholar]
- Valle, R.; Buenaposada, J.M.; Baumela, L. Multi-task head pose estimation in-the-wild. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 43, 2874–2881. [Google Scholar] [CrossRef] [Scilit]
- Celestino, J.; Marques, M.; Nascimento, J.C.; Costeira, J.P. 2D image head pose estimation via latent space regression under occlusion settings. Pattern Recognit. 2023, 137, 109288. [Google Scholar] [CrossRef] [Scilit]
- Zhong, R.; He, L.; Wang, H.; Yuan, L.; Li, K.; Liu, Z. Attention-guided huber loss for head pose estimation based on improved capsule network. Entropy 2023, 25, 1024. [Google Scholar] [CrossRef] [Scilit]
- Goodfellow, I.J.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial nets. Adv. Neural Inf. Process. Syst. 2014, 27, 2672–2680. [Google Scholar]
- Ho, J.; Jain, A.; Abbeel, P. Denoising Diffusion Probabilistic Models. In Proceedings of the Advances in Neural Information Processing Systems (NeurIPS), 6–12 December 2020; pp. 6840–6851. [Google Scholar]
- Yu, J.; Lin, Z.; Yang, J.; Shen, X.; Lu, X.; Huang, T.S. Free-form image inpainting with gated convolution. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 4471–4480. [Google Scholar]
- Zhao, Y.; Chen, W.; Xing, J.; Li, X.; Bessinger, Z.; Liu, F.; Zuo, W.; Yang, R. Identity preserving face completion for large ocular region occlusion. arXiv 2018, arXiv:1807.08772. [Google Scholar]
- Guo, W.; Ha, L.V.T.; Davies, J.C.; Grinspun, E.; Kahrs, L.A. Facial landmark detection and head pose estimation of occluded faces based on stable diffusion image completion. IEEE Access 2025, 13, 167196–167212. [Google Scholar] [CrossRef] [Scilit]
- Rezvani, S.; Fateh, M.; Khosravi, H. ABANet: Attention boundary-aware network for image segmentation. Expert Syst. 2024, 41, e13625. [Google Scholar] [CrossRef] [Scilit]
- Rombach, R.; Blattmann, A.; Lorenz, D.; Esser, P.; Ommer, B. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 10684–10695. [Google Scholar]
- Hugging Face. Stable Diffusion v1-5. runwayml/stable-diffusion-v1-5. 2022. Available online: https://huggingface.co/stable-diffusion-v1-5 (accessed on 17 June 2026).
- Hempel, T.; Abdelrahman, A.A.; Al-Hamadi, A. 6D rotation representation for unconstrained head pose estimation. In Proceedings of the IEEE International Conference on Image Processing (ICIP), Bordeaux, France, 16–19 October 2022; pp. 2496–2500. [Google Scholar]
- Koestinger, M.; Wohlhart, P.; Roth, P.M.; Bischof, H. Annotated facial landmarks in the wild: A large-scale, real-world database for facial landmark localization. In Proceedings of the IEEE International Conference on Computer Vision Workshops (ICCVW), Barcelona, Spain, 6–13 November 2011; pp. 2144–2151. [Google Scholar]
- Anwar, A.; Raychowdhury, A. Masked face recognition for secure authentication. arXiv 2020, arXiv:2008.11104. [Google Scholar]
- Ge, S.; Li, J.; Ye, Q.; Luo, Z. Detecting masked faces in the wild with LLE-CNNs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 2682–2690. [Google Scholar]
- Besl, P.J.; McKay, N.D. A method for registration of 3D shapes. IEEE Trans. Pattern Anal. Mach. Intell. 1992, 14, 239–256. [Google Scholar] [CrossRef] [Scilit]
- Flannigan, C.; Bazik, M.; Dinius, J. ICP. GitHub Repository. Available online: https://github.com/ClayFlannigan/icp (accessed on 28 May 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.







