Abstract: We propose a novel deep learning method for shadow removal. Inspired by physical models of shadow formation, we use a linear illumination transformation to model the shadow effects in the image that allows the shadow image to be expressed as a combination of the shadow-free image, the shadow parameters, and a matte layer. We use two deep networks, namely SP-Net and M-Net, to predict the shadow parameters and the shadow matte respectively. This system allows us to remove the shadow effects from images. We then employ an inpainting network, I-Net, to further refine the results. We train and test our framework on the most challenging shadow removal dataset (ISTD). Our method improves the state-of-the-art in terms of root mean square error (RMSE) for the shadow area by 20%. Furthermore, this decomposition allows us to formulate a patch-based weakly-supervised shadow removal method. This model can be trained without any shadow-free images (that are cumbersome to acquire) and achieves competitive shadow removal results compared to state-of-the-art methods that are trained with fully paired shadow and shadow-free images. Last, we introduce SBU-Timelapse, a video shadow removal dataset for evaluating shadow removal methods.
Introduction
Shadow removal is a classic "ill-posed" problem in computer vision. To remove a shadow, a system must essentially "relight" the scene, guessing what the texture and color underneath the darkness look like. While deep learning has made massive strides here, purely data-driven "black box" models often struggle with blurry artifacts or physically impossible color shifts.
In this paper, Hieu Le and Dimitris Samaras propose a hybrid approach: a deep learning framework grounded in a simplified physical model of shadow formation. By decomposing the problem into predictable physical parameters, they achieve state-of-the-art results and even show how to train a model without perfectly paired "shadow/shadow-free" images.
Methods
The core of the paper is a Shadow Image Decomposition model. They represent a shadow-free image ($I_{sf}$) as a combination of the shadow image ($I_s$), a "relit" image ($I_{relit}$), and a matte layer ($\alpha$):
$$I_{sf} = I_s \cdot (1 - \alpha) + I_{relit} \cdot \alpha$$
To solve this, they use three specialized networks:
- SP-Net (Shadow Parameter Network): Predicts a scaling factor ($w$) and an offset ($b$) for each color channel. These parameters represent the linear transformation needed to "relight" the pixels in the umbra (the darkest part of the shadow).
- M-Net (Matte Network): Predicts the shadow matte ($\alpha$). This handles the penumbra—the soft, transitioning edges of the shadow where the linear model isn't a perfect fit.
- I-Net (Inpainting Network): A refinement step. Since the linear model might fail on saturated pixels or inconsistent lighting, I-Net predicts a residual layer to "clean up" any remaining artifacts.
Weakly-Supervised Training
One of the most innovative parts of the paper is the patch-based weakly-supervised method. Instead of needing full paired images, the authors crop small patches of shadows and non-shadows. They use an adversarial loss (a Discriminator network) to force the shadow-removal networks to produce patches that are indistinguishable from real shadow-free patches, all while constrained by the physical $w, b, \alpha$ model.
Datasets
- ISTD: The standard benchmark for shadow removal. The authors notably identified a color inconsistency issue in the original ISTD ground truth and provided a color-corrected version for more accurate evaluation.
- SBU-Timelapse (New): The authors introduced a new dataset of 50 time-lapse videos. By using time-lapse, they can extract a "pseudo-ground truth" by taking the maximum intensity of a pixel over time as the shadow moves across the frame.
Key Insights and Ideas
- Physics as a Regularizer: By forcing the network to output physical parameters ($w, b$) rather than just raw pixels, the search space is constrained. This prevents the network from "hallucinating" weird colors or textures.
- The Importance of the Matte: Binary shadow masks are insufficient for high-quality removal. The matte layer ($\alpha$) is essential for handling the gradual transition at shadow boundaries, preventing "ghosting" or sharp edges in the final result.
- Linearity is "Good Enough": While light interaction is non-linear in reality, the authors show that a per-channel linear model ($w \cdot I + b$) is surprisingly effective for relighting shadowed regions when combined with a deep matte estimator.
Key Results
- State-of-the-Art Performance: On the ISTD dataset, the full framework achieved a Mean Absolute Error (MAE) of 6.0 in shadowed areas, a 20% improvement over the previous best of 7.6.
- Strong Weak Supervision: Their weakly-supervised model (trained without paired images) achieved an MAE of 9.7, which actually outperforms several older fully-supervised methods.
- Robustness: Qualitative results show significantly fewer boundary artifacts and better color consistency compared to previous methods like DeshadowNet or ST-CGAN.
Limitations and Future Work
- Shadow Detection Dependency: The method relies on an external shadow detector. If the detector misses a shadow or provides a poor mask, the removal process inherits those errors.
- Complex Lighting: The linear model assumes a relatively uniform light source. In environments with multiple colored lights or complex inter-reflections, the $w, b$ parameters might not be sufficient.
- Future Directions: The authors suggest that more sophisticated, non-linear physical models could further improve results, and the framework could be adapted for "shadow editing" (moving or adding shadows realistically).
Summary updated