GithubHelp home page GithubHelp logo

chao-tan / tc-gan Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 3.0 27 KB

Unsupervised Shadow Removal using Target Consistency Generative Adversarial Network

License: MIT License

Python 100.00%
generative-adversarial-network shadow-removal unsupervised-learning deep-learning

tc-gan's Introduction

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

tc-gan's People

Contributors

chao-tan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tc-gan's Issues

About Testing

Couldn't understand about creating classifier.pkl in the testing. please tell more about net.py file. Thank you in advance.

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.