Keras implementation of the conditional GAN.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 5b0692d Nov 30, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets First commit Nov 30, 2016
test First commit Nov 30, 2016
train First commit Nov 30, 2016
README.md Update README.md Nov 30, 2016
conditional_gan.py Update conditional_gan.py Nov 30, 2016

README.md

KERAS CONDITIONAL GAN

Implementation of conditional DCGAN https://arxiv.org/abs/1411.1784 with keras.

Implements the improvements and architecture of https://arxiv.org/pdf/1611.07004v1.pdf.

Code borrows from the Keras DCGAN https://github.com/jacobgil/keras-dcgan and the tensorflow conditional GAN https://github.com/ppwwyyxx/tensorpack/blob/master/examples/GAN/Image2Image.py.


This assumes theano ordering.


Usage

Training:

KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile,device=cuda0,floatX=float32 ./conditional_gan.py --data train

KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile,device=cuda0,floatX=float32 ./conditional_gan.py --data train

Image generation:

KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile,device=cuda0,floatX=float32 ./conditional_gan.py --data test

KERAS_BACKEND=theano THEANO_FLAGS=optimizer=fast_compile,device=cuda0,floatX=float32 ./conditional_gan.py --data test


Result

generated images (conditioned on RGB) :

generated_image.png

train process :

training_process1.gif training_process2.gif training_process3.gif