COMPOSE: Comprehensive Portrait Shadow Editing

Andrew Hou, Zhixin Shu, Xuaner Zhang, He Zhang, Yannick Hold-Geoffroy, Jae Shin Yoon, Xiaoming Liu

Abstract

Portrait relighting is a fundamental task in computational photography, yet existing methods often struggle to provide fine-grained control over shadows without altering the overall scene atmosphere. We present COMPOSE, a novel four-stage pipeline that disentangles portrait lighting into ambient components and an editable Gaussian dominant light source. By treating shadows as a composable layer, COMPOSE enables precise adjustment of shadow position, intensity, and hardness while preserving the original environmental context.

Introduction

Traditional portrait relighting tools often adopt an "all-or-nothing" approach, replacing the entire lighting environment to achieve a desired effect. While effective for total scene transformation, this process frequently destroys the original "vibe" or authenticity of the photograph. Furthermore, current techniques face significant hurdles when dealing with hard shadows from directional sources, such as the sun. Standard representations like Spherical Harmonics (SH) are inherently low-frequency and produce blurry results, while low-resolution environment maps lack the precision required for fine-tuned editing.

The core challenge in shadow editing is disentanglement: moving a shadow or altering the light source size without inadvertently changing the ambient light or the subject's identity. COMPOSE addresses this by decomposing the lighting into a manageable proxy and utilizing a hybrid generative architecture to ensure both global structure and local sharpness.

The COMPOSE Pipeline

The researchers introduce a modular 4-stage pipeline designed to treat shadows as a composable and editable layer:

1. Lighting Estimation and Gaussian Proxy

Using a Variational Autoencoder (VAE), the system predicts an environment map from a single portrait. The innovation lies in fitting a 2D isotropic Gaussian to the brightest region of this map. This Gaussian represents the "dominant light" (e.g., the sun), defined by its position ($x, y$), size ($\sigma$), and intensity ($\gamma$). This proxy allows for intuitive control; for instance, reducing $\sigma$ "shrinks" the light source, naturally resulting in harder, sharper shadows.

2. Light Diffusion

To create a clean slate for editing, a hierarchical transformer removes existing hard shadows and specular highlights. This produces a "diffuse" base image ($I_D$), representing the subject under perfectly flat, ambient lighting.

The base diffuse image produced by the light diffusion stage, serving as a clean slate for shadow synthesis.

3. Shadow Synthesis

Shadow generation is handled by a two-step generative process. First, a U-Net generates a coarse shadowed image ($I_S$) based on the target Gaussian light parameters. Recognizing that U-Nets often produce "mushy" edges, a conditional Denoising Diffusion Probabilistic Model (DDPM) is then employed to refine the image. The DDPM leverages its generative priors to sharpen shadow boundaries and add high-frequency details.

4. Image Compositing

Finally, the diffuse image ($I_D$) and the synthesized shadowed image ($I_S$) are blended. By adjusting the weights of this blend, users can intuitively dial the shadow intensity up or down, seamlessly integrating the new shadows into the original environment.

An example of synthesized directional shadows applied to the portrait, demonstrating the model's ability to generate sharp, realistic lighting effects.

Datasets and Training

The model was trained primarily on the One-Light-At-A-Time (OLAT) dataset, which features 107 subjects captured in a light stage under 160 individual light directions. To bridge the gap to real-world scenarios, the team used HDR environments from Polyhaven and Laval Outdoor datasets to render OLAT images into realistic outdoor contexts. Evaluation was performed on 16 held-out subjects for quantitative ground-truth comparison and a variety of "in-the-wild" images to validate real-world utility.

Key Insights

  • The Gaussian Proxy: This clever abstraction simplifies complex lighting into editable parameters. It solves the problem of "shrinking" a light source in a standard environment map, which is computationally difficult.
  • Hybrid Architecture: By chaining a DDPM after a U-Net, COMPOSE combines the global structural consistency of U-Nets with the high-frequency detail generation of diffusion models.
  • Ambience Preservation: Because the dominant light is separated from the ambient component, users can rotate the "sun" 180 degrees without altering the color or tone of the background sky.

Results

COMPOSE demonstrates quantitative superiority over state-of-the-art baselines like Total Relighting. It achieved a Mean Absolute Error (MAE) of 0.0965, significantly improving upon the previous best of 0.1008. Qualitatively, the system enables "in-place" editing previously considered impossible, such as intensifying a soft-shadowed portrait into a high-contrast "noir" style or shifting shadow positions while maintaining background identity. Furthermore, when used for shadow removal, COMPOSE produces fewer artifacts than specialized shadow-removal methods.

Limitations and Future Work

While robust, COMPOSE is currently optimized for single-source outdoor settings. It may struggle in complex indoor environments with multiple competing light sources. Additionally, occasional color shifts can occur during compositing, and very fine details (like individual skin pores) may sometimes be lost during the diffusion process. Future research will focus on using stronger backbones and passing high-resolution image features directly to the DDPM to improve identity preservation.

Summary updated

BibTeX
@inproceedings{hou2024compose,
  author = {Andrew Hou and Zhixin Shu and Xuaner Zhang and He Zhang and Yannick Hold-Geoffroy and Jae Shin Yoon and Xiaoming Liu},
  title = {{COMPOSE: Comprehensive Portrait Shadow Editing}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73030-6\_20},
}
Figure