Home

Awesome

G2R-ShadowNet

From Shadow Generation to Shadow Removal.

Dependencies

This code uses the following libraries

Training code and data

Generate the training data using the original ISTD dataset and the code gettraindata.m

or download the training data from: GoogleDrive: ISTD | BaiduNetdisk: ISTD (Access code: 1111)

Your ~/PAISTD8/ folder should look like this

PAISTD8
├── train/
    ├── train_A/
    │   └── 90-1.png
    │   └── ...
    ├── train_B/
    │   └── ...
    └── ...

Testing masks produced by BDRAR

GoogleDrive: ISTD

BaiduNetdisk: ISTD (Access code: 1111)

Train and test on the adjusted ISTD dataset

Train

  1. Set the path of the dataset in train.py
  2. Run train.py

Test

  1. Set the paths of the dataset and saved models (netG_1.pth) and (netG_2.pth) in test.py
  2. Run test.py

Evaluate

  1. Set the paths of the shadow removal results and the dataset in evaluate.m
  2. Run evaluate.m

The Best Models on ISTD

GoogleDrive: ISTD

BaiduNetdisk: ISTD (Access code: 1111)

Results of G2R-ShadowNet on ISTD

GoogleDrive: ISTD

BaiduNetdisk: ISTD (Access code: 1111)

Results of G2R-ShadowNet-Sup. on ISTD

GoogleDrive: ISTD

BaiduNetdisk: ISTD (Access code: 1111)

ISTD Results (size: 480x640)

MethodShadow RegionNon-shadow RegionAll
Le & Samaras (ECCV20)11.33.74.8
G2R-ShadowNet (Ours)9.63.84.7

Results in shadow and non-shadow regions are computed on each image first and then compute the average of all images in terms of RMSE.

Acknowledgments

Code is implemented based on Mask-ShadowGAN and LG-ShadowNet.

All codes will be released to public soon.

@inproceedings{liu2021from,
  title={From Shadow Generation to Shadow Removal},
  author={Liu, Zhihao and Yin, Hui and Wu, Xinyi and Wu, Zhenyao and Mi, Yang and Wang, Song},
  booktitle={CVPR},
  year={2021}
}