TL;DR
This paper introduces a novel face relighting method that generates physically accurate, hard shadows under directional lighting by integrating a differentiable ray-tracing algorithm directly into the model's training. By leveraging the estimated 3D face geometry to compute shadow masks, the approach achieves state-of-the-art relighting quality and, surprisingly, improves the accuracy of the underlying face geometry estimation itself.
What Problem Does This Paper Address?
Single-image face relighting is crucial for applications like photo editing, AR/VR, and face recognition. While existing methods excel at handling soft, diffuse lighting (often using low-order Spherical Harmonics), they fall short when dealing with strong directional light sources (like the sun), which produce sharp, "hard" shadows—most noticeably from the nose.
Current models that attempt to generate hard shadows typically rely on deep networks to regress shadow maps implicitly. Because they don't directly tie shadow generation to the actual 3D structure of the face, the resulting shadows are often geometrically inconsistent, appearing warped or physically impossible.
Methods
The authors propose an intrinsic decomposition framework that splits an input image into albedo, depth (geometry), and lighting components using an hourglass network architecture.
The core innovation is a differentiable shadow mask estimation module based on ray-tracing principles. For every 3D point on the face depth map ($D_p$) and a target lighting direction ($\omega_t$), the algorithm samples points along a shadow ray cast toward the light source. To maintain differentiability for end-to-end training, they compute the minimum distance ($d_{min}$) between these sampled points and the face surface, passing it through a Sigmoid-based visibility function to produce a continuous shadow mask ($M_{shadow}$).
This mask modifies the standard rendering equation, ensuring that regions in shadow only receive ambient light, while unoccluded regions receive both ambient and directional light.
Datasets
- Training: CelebA-HQ (30,000 in-the-wild face images).
- Evaluation: Multi-PIE (controlled images of subjects under 18 unique directional lights, providing a ground truth for quantitative relighting evaluation) and FFHQ (for testing generalization on in-the-wild images).
Key Insights and Ideas
- Geometry-Driven Shadows: Instead of letting a neural network "guess" what a shadow looks like, explicitly modeling the physics of ray tracing guarantees that shadows naturally conform to facial features like the nose bridge.
- The Shadow Feedback Loop: Incorporating hard shadow physics into the loss function acts as a powerful regularizer for geometry estimation. Because the network is penalized if a shadow looks wrong, it forces the depth-estimation branch to produce highly accurate 3D facial structures, particularly around challenging regions like the nose and face boundaries.
Key Results
- Quantitative Superiority: On the Multi-PIE dataset, the proposed method outperformed all baseline models (including SfSNet, DPR, and Hou et al.) across all major metrics: LPIPS (0.1622 vs. Hou's 0.2013), MSE (0.0150 vs. Hou's 0.0303), and DSSIM (0.0990 vs. Hou's 0.1186).
- Better Geometry: The model achieved the lowest average angular error in surface normal estimation (11.06° compared to 12.45° for DFNRMVS and 14.27° for SfSNet), proving that shadow modeling enhances shape perception.
- Qualitative Realism: Visually, the synthesized hard shadows exhibit sharp, realistic boundaries that accurately track across the face as the target light rotates.
Limitations and Future Work
The model currently relies on supervision from SfSNet to estimate pseudo-ground-truth albedo and lighting during training, which introduces inherited errors and limits lighting transfer performance. Additionally, CelebA-HQ primarily consists of images with diffuse lighting; training on a dataset captured under diverse, explicit directional lights would significantly boost performance. Future work could explore using photometric stereo datasets to obtain cleaner ground-truth albedo and lighting.
Summary updated