Skip to content

Official PyTorch implementation of the paper: “Style-Guided Shadow Removal” (ECCV2022).

Notifications You must be signed in to change notification settings

jinwan1994/SG-ShadowNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SG-ShadowNet

PyTorch implementation of “Style-Guided Shadow Removal”, ECCV2022 .

Intruduction:

Abstract

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.

1. Requirement

Simpy run (Note that the different "scikit-image" versions will affect test results.):

conda install --yes --file requirements.txt

2. Datasets

ISTD+

SRD (please email the authors).

Video Shadow Removal (version 1)

3. Evaluate the Pre-trained Models

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.

4. Train Models

Run the following scripts to train models.

python train.py

Acknowledgements

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}
}

About

Official PyTorch implementation of the paper: “Style-Guided Shadow Removal” (ECCV2022).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages