Giter Club home page Giter Club logo

wc-gan's Introduction

Whitening and Coloring transform for GANs

Check out our paper

Unsupervised Cifar-10 (IS 8.66) Supervised Cifar-10 (IS 9.06)

Requirments

  • python2
  • numpy
  • scipy
  • skimage
  • pandas
  • tensorflow == 1.5.0 (I have not testted with other versions)
  • keras == 2.0.8 (I have tried latter versions, but they throw a bug. Not sure from where it came from)
  • tqdm

For the commands reproducing experiments from the paper check scripts folder.

All scripts has the following name: (name of the dataset) + (architecture type (resnet or dcgan)) + (discriminator normalization (sn or wgan_gp)) + (conditional of unconditional) + (if conditional use soft assigment (sa)).

For example:

CUDA_VISIBLE_DEVICES=0 scripts/cifar10_resnet_sn_uncond.sh

will train GAN for cifar10 dataset, with resnet architecture, spectral normalized discriminator in unconditional case.

All dataset except for imagenet downloaded and trained at the same time.

Imagenet

  1. This will consume a loot of memory. Because dataset is packed into numpy files for sequential reads.
  2. Download imagenet ILSVRC2012. Train and val. Put train to ../ILSVRC2012/train, and val to ../ILSVRC2012/val/val (val/val is important)
  3. Preprocess imagenet train:

bash preprocess.sh ../ILSVRC2012/train ../imagenet-resized

  1. Preprocess imagenet val:

bash preprocess.sh ../ILSVRC2012/val ../imagenet-resized-val

  1. Now you can remove ILSVRC2012
  2. CUDA_VISIBLE_DEVICES=0 scripts/imagenet_resnet_sn_cond_sa.sh This will first pack imagenet into numpy files, and then start traning.

Citation:

@inproceedings{
	siarohin2018whitening,
	title={Whitening and Coloring transform for {GAN}s},
	author={Aliaksandr Siarohin and Enver Sangineto and Nicu Sebe},
	booktitle={ICLR},
	year={2019},
	url={https://openreview.net/forum?id=S1x2Fj0qKQ}
}

wc-gan's People

Contributors

aliaksandrsiarohin avatar bhneo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.