Conditional generative adversarial networks for convolutional face generation
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 170 commits ahead, 16 commits behind goodfeli:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
conditional
data/lfwcrop_color
lfw
models
sampler
tests
tfd_pretrain
.gitignore
LICENSE
README.md
__init__.py
datasets.py
deconv.py
distributions.py
ll.py
paper.pdf
parzen_ll.py
show_gen_weights.py
show_samples.py
train_extensions.py
util.py

README.md

Conditional Generative Adversarial Networks

Demonstration of deterministic control of image samples. We tweak conditional information to first make the sampled faces age, then again to make them smile.

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.

Guide to the code / usage instructions

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

Visualizations

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

Requirements

  • Numpy
  • Theano
  • Pylearn2