Unsupervised Cifar-10 (IS 8.66) | Supervised Cifar-10 (IS 9.06) |
- 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.
- This will consume a loot of memory. Because dataset is packed into numpy files for sequential reads.
- Download imagenet ILSVRC2012. Train and val. Put train to ../ILSVRC2012/train, and val to ../ILSVRC2012/val/val (val/val is important)
- Preprocess imagenet train:
bash preprocess.sh ../ILSVRC2012/train ../imagenet-resized
- Preprocess imagenet val:
bash preprocess.sh ../ILSVRC2012/val ../imagenet-resized-val
- Now you can remove ILSVRC2012
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}
}