Our Paper is published in IEEE Access. You can check the paper here.
- ISTD : ST-CGAN
- SRD : Deshadow-Net
- ISTD+, SRD+
Datasets are not available but you can create the dataset by applying the MATLAB code provided by the authors.
- ISTD,ISTD+,SRD,SRD+ [Google Drive]
- Trained weights [Google Drive]
conda create -n CANet python=3.8 -y
conda activate CANet
conda init
conda install -c pytorch torchvision=0.10.0 -y
conda install -c conda-forge scikit-image -y
- Prepare the training dataset. You need to prepare the edge mask by yourself. Run makemask.m with MATLAB on the mask images to obtain the edge mask dataset.
- Execute the following command.
(This is an example.)
python CANet_train.py \
--train_name train1 \
--shadow_dir_path datasets/ISTD/train/train_A \
--gt_dir_path datasets/ISTD/train/train_C \
--mask_dir_path datasets/ISTD/train/train_B \
--mask_edge_dir_path datasets/ISTD/train/train_B_edge \
--pretrained_d detect_ISTD.pth(optional) \
--pretrained_r remove_ISTD.pth(optional)
- Prepare the trained weights.
Our pre-trained weights can be downloaded from Google Drive. - Prepare the test images and put them in a single directory.
- Execute the following command.
python CANet_test.py \
--detection_pth_path <path of .pth> \
--removal_pth_path <path of .pth> \
--input_img_path <path of directory>
- Directory
output_CANet
is automatically created and the output images are saved here.
- Put your results under
results/<dataset name>/<method name>
. - Make sure that the test images are located under
datasets/<dataset name>
. - Run the following command.
python evaldata.py \
--method_name <method name> \
--dataset_name ISTD \
--resized 1
CANet
├── evaldata.py
├── getDatasetPath.py
├── README.md
├── datasets/
│ ├── ISTD/
│ ├── test/
│ ├── test_A/
│ ├── 101.png
│ ├── test_B/
│ ├── test_C/
│ ├── train/
├── results/
│ ├── ISTD/
│ ├── CANet/
│ ├── 101.png
Comparison with the other methods. Please see our paper for the details.
@ARTICLE{ryo2022,
author={Ryo Abiko and Masaaki Ikehara},
journal={IEEE Access},
title={Channel Attention GAN Trained With Enhanced Dataset for Single-Image Shadow Removal},
year={2022},
volume={10},
number={},
pages={12322-12333},
doi={10.1109/ACCESS.2022.3147063}}