This project is an implementation of the Generative Adversarial Network proposed in our CVPR 2017 paper - DeLiGAN : Generative Adversarial Networks for Diverse and Limited Data. Via this project, we make two contributions:
The code for DeLiGAN is provided in Tensorflow 0.10 for the MNIST and Toy dataset, and in Theano 0.8.2 + Lasagne 0.2 for the CIFAR-10 and Sketches dataset. This code was tested on a Ubuntu 14.04 workstation hosting a NVIDIA Titan X GPU.
This repository includes implementations for 4 different datasets.
The models for evaluating DeLiGAN on these datasets can be found in our repo. The details for how to download and lay out the datasets can be found in src/datasets/README.md
To run any of the models
First download the datasets and store them in the respective sub-folder of the datasets folder (src/datasets/)
To run the model on any of the datasets, go to the respective src folders and run the dg_'dataset'.py
file in the respective dataset folders with two arguments namely, --data_dir
and --results_dir
. For example, starting from the top-level folder,
cd src/sketches python dg_sketches.py --data_dir ../datasets/sketches/ --results_dir ../results/sketches
Note that the results_dir
needs to have 'train' as a sub-folder.
For example, to obtain the modified inception scores on CIFAR
src/modified_inception_scores/cifar10/
dg_cifar.py
and copy it to src/modified_inception_scores/cifar10/
transfer_cifar10_softmax_b1.py
to transfer learn the last layer.transfer_cifar10_softmax_b1.py
and re-run it to evaluate the inception scores.transfer_cifar10_softmax_b1.py
Parts of the code in this implementation have been borrowed from the Improved-GAN implementation by OpenAI (T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pages 2226–2234, 2016.)
@inproceedings{DeLiGAN17,
author = {Gurumurthy, Swaminathan and Sarvadevabhatla, Ravi Kiran and R. Venkatesh Babu},
title = {DeLiGAN : Generative Adversarial Networks for Diverse and Limited Data},
booktitle = {Proceedings of the 2017 Conference on Computer Vision and Pattern Recognition},
location = {Honolulu, Hawaii, USA}
}
Please send message to gauthamsindia95@gmail.com if you have any query regarding the code.