From Shadow Generation to Shadow Removal.
This code uses the following libraries
- python 3.7+
- pytorch 1.1+ & tochvision
- scikit-image
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)
GoogleDrive: ISTD
BaiduNetdisk: ISTD (Access code: 1111)
Train
- Set the path of the dataset in
train.py
- Run
train.py
Test
- Set the paths of the dataset and saved models
(netG_1.pth)
and(netG_2.pth)
intest.py
- Run
test.py
- Set the paths of the shadow removal results and the dataset in
evaluate.m
- Run
evaluate.m
GoogleDrive: ISTD
BaiduNetdisk: ISTD (Access code: 1111)
GoogleDrive: ISTD
BaiduNetdisk: ISTD (Access code: 1111)
GoogleDrive: ISTD
BaiduNetdisk: ISTD (Access code: 1111)
Method | Shadow Region | Non-shadow Region | All |
---|---|---|---|
Le & Samaras (ECCV20) | 11.3 | 3.7 | 4.8 |
G2R-ShadowNet (Ours) | 9.6 | 3.8 | 4.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.
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}
}
有问题可以联系我 +86 18410949118 刘志浩