lukedeo / keras-acgan

Auxiliary Classifier Generative Adversarial Networks in Keras
213 stars 69 forks source link
computer-vision deep-learning generative-adversarial-network gpu keras tensorflow

keras-acgan

This is a simple implementation of AC-GAN on the MNIST dataset, as introduced by Odena, et al., in Keras.

This represents a relatively happy medium between network complexity, ease of understanding, and performance. The samples generated (consult acgan-analysis.ipynb for examples) are clear, consistent, and illustrate the power of the auxiliary classifier.

To run this, you should have Keras and either Theano or TensorFlow (preferably TensorFlow) installed. Also, it is strongly advised that you use a GPU with CuDNN, as convolutions are rather slow on CPUs. If you do not have access to a dedicated GPU, I recommend looking at the Spot Instances on AWS.

You can simply run python mnist_acgan.py, and it will create:

After this is done, you can click through acgan-analysis.ipynb to generate more images and understand the system performance.