DeshadowNet: A Multi-context Embedding Deep Network for Shadow Removal

Liangqiong Qu, Jiandong Tian, Shengfeng He, Yandong Tang, Rynson W. H. Lau

Abstract

DeshadowNet is the first end-to-end deep learning framework for shadow removal that eliminates the need for manual shadow masks or separate detection steps. By employing a multi-context architecture that fuses global scene structure, local appearance, and high-level semantics, it produces state-of-the-art shadow-free images. This work also introduces a massive new benchmark dataset, the Shadow Removal Dataset (SRD), significantly advancing the scale of available training data for the field.

Introduction

Shadow removal is a classic ill-posed problem in computer vision. To restore a shadowed region accurately, a system must determine the shadow's location, the underlying material's properties, and the interaction between light and scene geometry. Historically, researchers relied on two-step pipelines: first detecting the shadow (often requiring manual hints) and then applying mathematical models to neutralize darkened pixels. These methods frequently struggled with complex semantics—such as shadows on varied surfaces like tree trunks versus grass—and the soft, blurry edges known as penumbras.

Methodology

The authors propose DeshadowNet, a fully convolutional neural network designed to learn a direct mapping from a shadowed image to its shadow-free counterpart. Instead of hallucinating a new image, the network predicts a shadow matte ($S_m$). This matte serves as a pixel-wise scaling factor that, when multiplied by the original image, restores the scene.

Multi-context Architecture

The core innovation is a triple-branch architecture that captures different levels of scene information:

  • G-Net (Global Localization): Utilizing a pre-trained VGG16, this branch analyzes the global structure and lighting to understand the overall scene context.
  • A-Net (Appearance Modeling): This branch extracts features from shallower layers to focus on mid-level details like color and texture, which are essential for recovering surface fine-points.
  • S-Net (Semantic Modeling): By leveraging deeper layers, this branch identifies high-level semantics (e.g., "brick wall" vs. "vegetation"). Understanding the "what" of a scene is crucial for predicting how different materials attenuate light.

The model is trained using a multi-stage strategy, optimizing branches separately before joint fine-tuning, and employs multi-size training to ensure robustness across resolutions.

Datasets

A major contribution of this research is the introduction of the Shadow Removal Dataset (SRD). At the time of publication, SRD was the first large-scale dataset for the task, containing 3,088 pairs of shadow and shadow-free images—a significant leap over previous datasets like UIUC (76 pairs). Additionally, the authors utilized 60,000 synthetic shadow pairs rendered in Maya to provide a rich pre-training ground and prevent overfitting.

Results and Discussion

DeshadowNet significantly outperforms existing state-of-the-art methods both quantitatively and qualitatively. On the UIUC dataset, it achieved a Root Mean Square Error (RMSE) of 5.9, surpassing the previous best of 6.6. On the new SRD dataset, it reached an RMSE of 6.64, compared to 8.73 for earlier methods.

Qualitative comparison of DeshadowNet (h) against ground truth (c) and other methods (d-g), alongside the predicted shadow matte (b).

Visually, the model excels at handling complex scenarios, such as shadows cast across multiple surfaces or wide penumbras that typically confuse traditional detectors. By unifying detection and removal into a single end-to-end mapping, the network learns features specifically optimized for visual fidelity.

Conclusion and Future Work

DeshadowNet demonstrates that semantic understanding is essential for accurate shadow removal. While highly effective, the network's depth results in significant computational costs, with training taking several weeks on high-end hardware. Future work may involve optimizing the architecture for real-time performance in video applications or expanding the framework to address other illumination challenges like specular highlights or weather-related artifacts.

Summary updated

BibTeX
@inproceedings{qu2017deshadownet,
  author = {Liangqiong Qu and Jiandong Tian and Shengfeng He and Yandong Tang and Rynson W. H. Lau},
  title = {{DeshadowNet: A Multi-context Embedding Deep Network for Shadow Removal}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  doi = {10.1109/cvpr.2017.248},
}
Figure