Keras implementations of Generative Adversarial Networks.
This repository has gone stale as I unfortunately do not have the time to maintain it anymore. If you would like to continue the development of it as a collaborator send me an email at [email protected]
Collection of Keras implementations of Generative Adversarial Networks (GANs) suggested in research papers. These models are in some cases simplified versions of the ones ultimately described in the papers, but I have chosen to focus on getting the core ideas covered instead of getting every layer configuration right. Contributions and suggestions of GAN varieties to implement are very welcomed.
See also: PyTorch-GAN
$ git clone https://github.com/eriklindernoren/Keras-GAN $ cd Keras-GAN/ $ sudo pip3 install -r requirements.txt
Implementation of Auxiliary Classifier Generative Adversarial Network.
$ cd acgan/ $ python3 acgan.py
Implementation of Adversarial Autoencoder.
$ cd aae/ $ python3 aae.py
Implementation of Bidirectional Generative Adversarial Network.
$ cd bigan/ $ python3 bigan.py
Implementation of Boundary-Seeking Generative Adversarial Networks.
$ cd bgan/ $ python3 bgan.py
Implementation of Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks.
$ cd ccgan/ $ python3 ccgan.py
Implementation of Conditional Generative Adversarial Nets.
$ cd cgan/ $ python3 cgan.py
Implementation of Context Encoders: Feature Learning by Inpainting.
$ cd context_encoder/ $ python3 context_encoder.py
Implementation of Coupled generative adversarial networks.
$ cd cogan/ $ python3 cogan.py
Implementation of Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks.
$ cd cyclegan/ $ bash download_dataset.sh apple2orange $ python3 cyclegan.py
Implementation of Deep Convolutional Generative Adversarial Network.
$ cd dcgan/ $ python3 dcgan.py
Implementation of Learning to Discover Cross-Domain Relations with Generative Adversarial Networks.
$ cd discogan/ $ bash download_dataset.sh edges2shoes $ python3 discogan.py
Implementation of DualGAN: Unsupervised Dual Learning for Image-to-Image Translation.
$ cd dualgan/ $ python3 dualgan.py
Implementation of Generative Adversarial Network with a MLP generator and discriminator.
$ cd gan/ $ python3 gan.py
Implementation of InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets.
$ cd infogan/ $ python3 infogan.py
Implementation of Least Squares Generative Adversarial Networks.
$ cd lsgan/ $ python3 lsgan.py
Implementation of Image-to-Image Translation with Conditional Adversarial Networks.
$ cd pix2pix/ $ bash download_dataset.sh facades $ python3 pix2pix.py
Implementation of Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks.
Trains a classifier on MNIST images that are translated to resemble MNIST-M (by performing unsupervised image-to-image domain adaptation). This model is compared to the naive solution of training a classifier on MNIST and evaluating it on MNIST-M. The naive model manages a 55% classification accuracy on MNIST-M while the one trained during domain adaptation gets a 95% classification accuracy.
$ cd pixelda/ $ python3 pixelda.py
| Method | Accuracy | | ------------ |:---------:| | Naive | 55% | | PixelDA | 95% |
Implementation of Semi-Supervised Generative Adversarial Network.
$ cd sgan/ $ python3 sgan.py
Implementation of Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network.
$ cd srgan/ $ python3 srgan.py
Implementation of Wasserstein GAN (with DCGAN generator and discriminator).
$ cd wgan/ $ python3 wgan.py
Implementation of Improved Training of Wasserstein GANs.
$ cd wgan_gp/ $ python3 wgan_gp.py