PyTorch implementation of “Style-Guided Shadow Removal”, ECCV2022 .
Shadow removal is an important topic in image restoration, and it can benefit many computer vision tasks. State-of-the-art shadowremoval methods typically employ deep learning by minimizing a pixellevel difference between the de-shadowed region and their corresponding (pseudo) shadow-free version. After shadow removal, the shadow and non-shadow regions may exhibit inconsistent appearance, leading to a visually disharmonious image. To address this problem, we propose a style-guided shadow removal network (SG-ShadowNet) for better imagestyle consistency after shadow removal. In SG-ShadowNet, we first learn the style representation of the non-shadow region via a simple region style estimator. Then we propose a novel effective normalization strategy with the region-level style to adjust the coarsely re-covered shadow region to be more harmonized with the rest of the image. Extensive experiments show that our proposed SG-ShadowNet outperforms all the existing competitive models and achieves a new state-of-the-art performance on ISTD+, SRD, and Video Shadow Removal benchmark datasets.
Simpy run (Note that the different "scikit-image" versions will affect test results.):
conda install --yes --file requirements.txt
SRD (please email the authors).
Video Shadow Removal (version 1)
We provide our shadow-removal results from GoogleDrive generated on the ISTD+, SRD, and Video Shadow Removal benchmark dataset.
You can also evaluate the pretrained models. Place images and testing mask (ISTD and SRD) in ./input
directory and run the below script.
Before executing the script, please download the pretrained model from GoogleDrive, place the models to ./pretrained
.
python test.py
Note that, ISTD+ and Video Shadow Removal have to be evaluate using the model trained on the ISTD+ dataset while SRD via the model with SRD dataset.
Run the following scripts to train models.
python train.py
Thanks Zhihao Liu for his useful discussion of this work.
Thanks to previous open-sourced repo: G2R-ShadowNet
@inproceedings{wan2022style,
title={Style-Guided Shadow Removal},
author={Wan, Jin and Yin, Hui and Wu, Zhenyao and Wu, Xinyi and Liu, Yanting and Wang, Song},
booktitle={ECCV},
year={2022}
}