GithubHelp home page GithubHelp logo

ryo-abiko / canet Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 2.0 1.38 MB

Repo of "Channel Attention GAN Trained with Enhanced Images for Single Image Shadow Removal"

Home Page: https://ieeexplore.ieee.org/document/9694637

Python 99.26% MATLAB 0.74%
deep-learning shadow-removal pytorch

canet's Introduction

Channel Attention GAN Trained with Enhanced Dataset for Single-Image Shadow Removal (CANet)

Our Paper is published in IEEE Access. You can check the paper here.

Overview

Datasets

  • 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.

Our results

Create environment with Anaconda

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

Train

  1. 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.
  2. 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)

Test

  1. Prepare the trained weights.
    Our pre-trained weights can be downloaded from Google Drive.
  2. Prepare the test images and put them in a single directory.
  3. 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>
  1. Directory output_CANet is automatically created and the output images are saved here.

Evaluation

  1. Put your results under results/<dataset name>/<method name>.
  2. Make sure that the test images are located under datasets/<dataset name>.
  3. Run the following command.
python evaldata.py \
    --method_name <method name> \
    --dataset_name ISTD \
    --resized 1

Directory structure

CANet
├── evaldata.py
├── getDatasetPath.py
├── README.md
├── datasets/
│   ├── ISTD/
│       ├── test/
│           ├── test_A/
│               ├── 101.png
│           ├── test_B/
│           ├── test_C/
│       ├── train/
├── results/
│   ├── ISTD/
│       ├── CANet/
│           ├── 101.png

Results

Comparison with the other methods. Please see our paper for the details. Overview

Citation

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

canet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

canet's Issues

doubts about the test restoration results in the paper

Hi! thanks for you paper, the paper was cool.

but I have some doubts about the test restoration result.
like in table3 and table4, The AEF[17] results in ISTD+ and ISTD shadow part were 8.77 and 10.05, respectively. But the original paper utilize the RMSE evaluation metric and color space same in LAB were 6.5 and 7.77, there is a relatively obvious difference between the two result,So it is used the evaluation metric in SID[14] that causes the relatively obvious difference in the results?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.