Skip to content

Unsupervised Shadow Removal using Target Consistency Generative Adversarial Network

License

Notifications You must be signed in to change notification settings

chao-tan/TC-GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unsupervised Shadow Removal using Target-Consistency Generative Adversarial Network

by Chao Tan, Xin Feng

This repository contains the source code and pretrained model for our TC-GAN, provided by Chao Tan.
The paper is avaliable for download here. Click here for more details.


Dataset

The USR dataset can be download from MaskShadowGAN.
The ISTD dataset can be download from ST-CGAN.

Prerequisites

  • Python 3.7
  • PyTorch >= 1.2.0
  • opencv 0.4
  • PyQt 4
  • numpy
  • visdom

Traing & Testing

  1. Please download and unzip USR dataset and place it in /datasets/data folder. Then modify the dataset to the structure of TRAIN_A,TRAIN_B,TEST_A and TEST_B.

  2. Training

    • Run python -m visdom.server" to activate visdom server.
    • Run python run.py to start training from scratch.
    • You can easily monitor training process at any time by visiting http://localhost:8097 in your browser.
  3. Testing

    • After the training is over, you can test the performance of the model on the test dataset. First, you need to modify the configs/tcgan_usr256.yaml file and change the status option from train to test.
    • You need to pretrain a classification network offline for testing. The structure of the classification network can be obtained in net.py script. After obtaining the model, please name the pretrained classifier classifier.pkl and place it in the root directory.
    • Run python run.py for testing, and the test result will be saved in checkpoints/tcgan_usr256/testing.

Testing with Pretrained Model

  • You can download the pretrained model (TianYiCloud or BaiduCloud, extraction code: h3zg) of TC-GAN under USR dataset. And put the tcgan_usr256 and classifier.pkl under the checkpoints\ folder and root directory respectively.
  • You need to modify the configs/tcgan_usr256.yaml file and change the status option from train to test.
  • Run python run.py for testing, and the test result will be saved in checkpoints/tcgan_usr256/testing.

Citation

Update soon...

About

Unsupervised Shadow Removal using Target Consistency Generative Adversarial Network

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages