Leveraging Inpainting for Single-Image Shadow Removal

Xiaoguang Li, Qing Guo, R. Abdelfattah, Di Lin, Wei Feng +2 more
2/14/2026

No official code found. Best implementation: tsingqguo/inpaint4shadow (38 stars, last commit 2023-10-04). 1 more below.

Abstract

Fully-supervised shadow removal methods achieve the best restoration qualities on public datasets but still generate some shadow remnants. One of the reasons is the lack of large-scale shadow & shadow-free image pairs. Unsupervised methods can alleviate the issue but their restoration qualities are much lower than those of fully-supervised methods. In this work, we find that pretraining shadow removal networks on the image inpainting dataset can reduce the shadow remnants significantly: a naive encoder-decoder network gets competitive restoration quality w.r.t. the state-of-the-art methods via only 10% shadow & shadow-free image pairs. After analyzing networks with/without inpainting pretraining via the information stored in the weight (IIW), we find that inpainting pretraining improves restoration quality in non-shadow regions and enhances the generalization ability of networks significantly. Additionally, shadow removal fine-tuning enables networks to fill in the details of shadow regions. Inspired by these observations we formulate shadow removal as an adaptive fusion task that takes advantage of both shadow removal and image inpainting. Specifically, we develop an adaptive fusion network consisting of two encoders, an adaptive fusion block, and a decoder. The two encoders are responsible for extracting the features from the shadow image and the shadow-masked image respectively. The adaptive fusion block is responsible for combining these features in an adaptive manner. Finally, the decoder converts the adaptive fused features to the desired shadow-free result. The extensive experiments show that our method empowered with inpainting outperforms all state-of-the-art methods. We have realized codes and models in https://github.com/tsingqguo/inpaint4shadow

View on arXivView PDF

Code Implementations(2)

We propose the shadow-guided inpainting task to take advantage of the shadow removal and image inpainting.

381PythonNov 26, 20223 years ago

Leveraging Inpainting for Single-Image Shadow Removal

80PythonJul 23, 20233 years ago

Similar Papers

Cite this paper

@article{li2026leveraging,
  title  = {Leveraging Inpainting for Single-Image Shadow Removal},
  author = {Xiaoguang Li and Qing Guo and R. Abdelfattah and Di Lin and Wei Feng and I. Tsang and Song Wang},
  year   = {2026},
  eprint = {2302.05361},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2302.05361},
  journal = {ICCV 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.05361.svg)](https://codeofpaper.com/paper/2302.05361)

Discussion