Face Relighting with Geometrically Consistent Shadows

Andrew Hou, Michel Sarkis, Ning Bi, Yiying Tong, Xiaoming Liu · DOI

Introduction

Relighting a face under harsh, directional light is a classic computer vision challenge. The primary difficulty lies in accurately rendering "cast shadows"—such as the shadow a nose throws across a cheek. Most existing face relighting tools perform well under soft, diffuse lighting but fail when light sources are directional, like a bright desk lamp or direct sunlight.

Existing methods often either ignore hard shadows entirely, leading to "flat" results, or rely on neural networks to "guess" shadow placement. This "guessing" approach frequently results in geometric inconsistency, where shadows do not align with the actual 3D contours of the face, breaking the illusion of reality. This paper introduces a differentiable ray-tracing algorithm that leverages estimated 3D geometry to synthesize physically accurate shadows.

Methods

The proposed model is built upon intrinsic image decomposition, which separates an image into Albedo (skin reflectance), Geometry (depth and surface normals), and Lighting.

Differentiable Shadow Mask Estimation

The core innovation is the shadow mask estimation module, which follows a three-step process:

  1. 2.5D Ray Tracing: Instead of predicting a shadow map directly, the model performs a simplified ray-tracing operation. For every point on the face, it casts a "shadow ray" toward the light source.
  2. Occlusion Check: The system samples points along the ray and checks for intersections with the estimated 3D geometry (the depth map). If the ray hits a feature like the nose on its way to the light, that point is marked as being in shadow.
  3. Differentiable Implementation: To allow for end-to-end training via backpropagation, the authors use a Sigmoid-based function to convert the discrete "hit or miss" of ray tracing into a continuous value based on the distance between the ray and the geometry.
The proposed end-to-end pipeline for face relighting, showing the transition from input to geometry-based shadow mask to final relit image.

The architecture utilizes an hourglass-style encoder-decoder for depth and albedo estimation, while a Multilayer Perceptron (MLP) handles lighting parameters.

Key Insights

A significant finding of this research is that shadows act as a geometric constraint. By explicitly modeling hard shadows, the network is forced to predict more accurate 3D geometry. Because the shadow must be consistent with the facial shape, the model learns to refine surface normals—particularly around the nose bridge—to ensure the shadows "fit" correctly. This physics-informed approach moves away from "hallucinating" shadows toward a system grounded in the laws of ray-surface intersection.

Results

The proposed method achieved state-of-the-art results on the Multi-PIE dataset, outperforming previous models in Mean Squared Error (MSE) and LPIPS. Notably, the model significantly improved geometry estimation, reducing the average angular error in surface normals from $14.28^\circ$ (in models without shadow modeling) to $11.06^\circ$.

Relit face demonstrating a geometrically consistent nose shadow that aligns with the subject's unique features.

Visual results on FFHQ show that as the light source rotates, shadows move realistically across the face, maintaining sharp boundaries that match the underlying 3D structure.

Conclusion

While the model represents a significant step forward, some limitations remain. The current reliance on external models for albedo supervision can lead to color inaccuracies. Additionally, the training data is biased toward diffuse lighting, and the model does not yet handle complex occlusions from hair or backgrounds. Future work will focus on expanding dataset diversity and improving the handling of non-facial regions.

Summary updated

BibTeX
@misc{hou2022face,
  author = {Andrew Hou and Michel Sarkis and Ning Bi and Yiying Tong and Xiaoming Liu},
  title = {{Face Relighting with Geometrically Consistent Shadows}},
  year = {2022},
  eprint = {2203.16681},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.16681},
}
Figure