No Shadow Left Behind: Removing Objects and Their Shadows Using Approximate Lighting and Geometry

Edward Zhang, Ricardo Martin-Brualla, Janne Kontkanen, Brian L. Curless

Introduction

Modern image editing tools have made object removal seem effortless through advanced inpainting techniques. However, a persistent challenge remains: the "ghost shadow." While the object itself disappears, the complex shadow it cast on the environment often remains, breaking the realism of the edited scene. This is particularly problematic in applications like Augmented Reality (AR) interior design, where virtual furniture must replace existing items seamlessly.

Overview of the object removal and replacement pipeline, showing the input image, the proxy guidance, and the final results.

The Challenge of Shadow Removal

Shadows are not merely dark patches; they are intricate interactions between light sources and surface geometry. They can be soft, overlapping, or cast across textured surfaces like wood grain or carpets. Existing methods often struggle because they lack physical context or require labor-intensive manual masking of every shadow region. Furthermore, training data is scarce, as capturing identical real-world scenes with and without specific shadows is practically impossible.

Methodology: The Scene Proxy

The core innovation of this work is the use of a "scene proxy"—a rough 3D model of the environment and an approximate HDR environment map. By providing the neural network with these geometric and lighting "hints," the system can better understand the physical origin of shadows.

The pipeline utilizes approximate lighting (environment maps) and geometry (rough 3D meshes) alongside an object mask to guide the removal process.

The pipeline operates in four distinct stages:

  1. Intrinsic Decomposition: The input image is split into a texture map and a lighting map, guided by the proxy.
  2. Shadow Segmentation: A sub-network identifies the specific pixels in the lighting map corresponding to the target object's shadow.
  3. Shadow Removal: The network "un-shadows" the lighting map in the log-domain, preserving the underlying texture. By forcing the shadow removal to happen only on the lighting channel, the authors prevent the "hallucination" artifacts common in standard image-to-image translation.
  4. Inpainting & Compositing: An off-the-shelf inpainter fills the object's original footprint, and the cleaned lighting is recombined with the texture.

Data and Training

To overcome the lack of real-world ground truth, the authors generated a massive synthetic dataset of 60,000 scenes using PBRT. This dataset utilized 50,000 3D models from ShapeNet and 400 HDR maps from HDRI Haven. By curating 8,000 high-resolution textures, the model learned to distinguish between dark material properties and actual cast shadows.

Results and Evaluation

The proposed method demonstrates significant improvements over standard inpainting and image-to-image translation baselines. Quantitatively, the "Shadow RMSE" on synthetic data was reduced by approximately 75% compared to baseline methods. Qualitatively, the system excels at removing soft shadows from complex textures without leaving "ghost" artifacts or blurring surface details. Despite being trained on synthetic data, the model generalizes effectively to real-world captures from depth sensors and 360-degree cameras.

Conclusion and Future Work

By decoupling texture and lighting through a physical proxy, this approach provides a robust solution for clean object removal. While current limitations include assumptions about single receiver surfaces and uniform distant lighting, the work paves the way for more physically-aware image editing tools. Future research will look into handling localized light sources and more complex light transport effects like color bleeding.

Summary updated

BibTeX
@inproceedings{zhang2021no,
  author = {Edward Zhang and Ricardo Martin-Brualla and Janne Kontkanen and Brian L. Curless},
  title = {{No Shadow Left Behind: Removing Objects and Their Shadows Using Approximate Lighting and Geometry}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01613},
}
Figure