The code in this repository implements the conditional generative adversarial network (cGAN), described in my paper from late 2015:
Conditional generative adversarial networks for convolutional face generation. Jon Gauthier. March 2015.
This code is a fork of the original GAN repository. The original GAN model is described in the paper:
Generative Adversarial Networks. Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio. ArXiv 2014.
This code is built on the Pylearn2 framework for machine learning.
The abstract model structures are implemented as Python classes (see e.g.
the ConditionalAdversaryPair
class, and concrete model
instantiations / training configurations are described in YAML files
(see e.g. a file for training with LFW data).
You can perform your own training runs using these YAML files. The paths in
the YAML files reference my own local data; you'll need to download the LFW
dataset and change these paths yourself. The "file-list" and embedding files
referenced in the YAML files are available for LFW
in the data/lfwcrop_color
folder. Once you have the paths in the YAML
file, you can start training a model with the simple invocation of Pylearn2's
train.py
binary, e.g.
train.py models/lfwcrop_convolutional_conditional.yaml
The sampler
folder contains various GAN sampling scripts that helps visualize
trained models. Some highlights are listed below (see the head of the linked
source files for descriptions).
- Numpy
- Theano
- Pylearn2