TL;DR
This paper introduces a generative approach to portrait shadow removal by reframing the problem from local pixel propagation to global image reconstruction using a diffusion model. By leveraging a sequential "compositional repurposing" training pipeline (background harmonization followed by shadow removal) and a guided upsampling network, the model successfully removes harsh self- and external shadows while preserving fine, high-frequency facial details like pores and wrinkles.
What Problem Does This Paper Address?
Removing unwanted shadows from portrait photos is a notoriously difficult, ill-posed problem. When a shadow falls across a face, determining the true skin color underneath is a one-to-many mapping problem—multiple skin tones could plausibly fit the shadowed region.
Traditional approaches typically rely on local propagation methods (like U-Nets predicting residual appearance changes). However, these methods frequently get trapped in local minima, leaving behind harsh, unnatural shadow boundaries or flattening the face's natural lighting. Furthermore, existing methods often struggle to maintain consistency between the edited foreground portrait and the original background illumination, especially under complex or colored lighting conditions.
Methods
Instead of trying to "fix" shadowed pixels locally, the authors treat shadow removal as a global generation task. They use a latent diffusion model (initialized from InstructPix2Pix) to rebuild a clean, shadow-free portrait from scratch, conditioned on the original shadowed image.
The core methodology consists of three main pillars:
- Compositional Repurposing Framework: To ensure the model respects global lighting distributions, it is trained sequentially rather than jointly. First, it is fine-tuned on a light-aware background harmonization task to learn how foreground subjects blend with diverse background lighting. Second, it is fine-tuned on a generative portrait shadow removal task using shadow-paired data. A lower learning rate is used in the second step to prevent the model from forgetting the global lighting priors learned in the first step.
- Global and Local Controls: The diffusion denoiser utilizes local conditioning (concatenating the VAE-encoded latent features of the input image) to maintain spatial structure, alongside global conditioning (using DINOv2 image embeddings of a downsampled lighting map) to guide overall illumination.
- Guided Refinement Module: Because latent diffusion models inherently smooth out high-frequency details during the denoising process, the authors introduce a post-processing step. A lightweight ResidualNet acts as a guided upsampling network, combining the low-frequency lighting distribution of the generated shadow-free image with the high-frequency details (pores, wrinkles, hair) extracted from the original input image.
Datasets
To train this multi-stage framework, the authors constructed a large-scale, high-fidelity dataset combining three distinct sources:
- Lightstage Data: OLAT (One-Light-at-A-Time) captures of 150 unique subjects. This data was used to render portraits under diverse environment maps for the harmonization task, and under diffused environment maps to create perfect, shadow-free ground truths.
- Synthetic Humans: Several hundred 3D human models rendered using point-light ray tracing with random intermediate objects to simulate complex external occlusions and hard shadows.
- Augmented Real-World Data: 25,000 real-world portrait images. The authors used an intermediate version of their model to generate pseudo-ground truth shadow-free images, then synthetically re-introduced shadows using estimated monocular depth and surface normals to enhance real-world robustness.
Key Insights and Ideas
- Generation Over Propagation: Shifting the paradigm from local pixel modification to global generation allows the network to bypass the sharp gradients of hard shadow boundaries that typically stall traditional convolutional networks.
- The Power of Sequential Training: Jointly training a model on harmonization and shadow removal leads to suboptimal performance because the network becomes biased toward the harmonization task. Training them sequentially establishes a robust global lighting prior first, which acts as a foundation for cleaner shadow removal.
- Frequency Separation for Identity Preservation: Shadows are fundamentally low-frequency lighting phenomena. By treating the diffusion model's output as a low-frequency lighting guide, the high-frequency textures of the original image can be safely reintroduced without bringing the unwanted shadows back with them.
Key Results
The proposed method was evaluated against several strong baselines (including UNet, GridNet, HRNet, and state-of-the-art models like Deep Portrait Delighting and Controllable Light Diffusion):
- Quantitative Metrics: The model achieved the highest Structural Similarity Index (SSIM: 0.883) and the lowest Perceptual Similarity (LPIPS: 0.093) on validation data, significantly outperforming the baselines.
- Identity Preservation: Using AdaFace cosine similarity to evaluate facial identity retention, the method scored 0.790, proving that the guided refinement module successfully preserves the subject's distinct features.
- User Study: In a perception study with 27 participants evaluating real-world results, the proposed method was preferred 82% of the time for shadow removal effectiveness and 75% of the time for identity preservation and background harmonization.
Limitations and Future Work
Despite its strong performance, the authors note a few key limitations:
- Color and Texture Confusion: The model occasionally struggles to perfectly preserve the original skin tone or can become confused by colored skin textures, such as heavy cosmetics.
- Extreme Occlusions: If a shadow is so severe that the underlying pixel values are close to zero (complete loss of information), the guided refinement module cannot recover the original high-frequency details.
- Context Dependency: If a portrait is cropped so tightly that the face covers the entire image, the model loses background context cues and must infer lighting solely from the foreground, which can degrade performance.
Summary updated