Keras implementations of Generative Adversarial Networks.
Перейти к файлу
eriklindernoren 0293a4e6ff Wasserstein GAN: 'discriminator' => 'critic' 2018-05-11 19:56:34 +02:00
aae Adversarial Autoencoder: Reduced dimensionality of latent code => significant improvement in visual quality of generated samples 2018-05-11 19:50:16 +02:00
acgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
assets Logo 2018-05-04 21:29:07 +02:00
bgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
bigan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
ccgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
cgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
cogan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
context_encoder Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
cyclegan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
dcgan Wasserstein GAN: 'discriminator' => 'critic' 2018-05-11 19:56:34 +02:00
discogan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
dualgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
gan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
infogan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
lsgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
pix2pix Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
pixelda Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
sgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
srgan Removed unnecessary compilation of generator before computation graph is built 2018-04-27 13:25:05 +02:00
wgan Wasserstein GAN: 'discriminator' => 'critic' 2018-05-11 19:56:34 +02:00
wgan_gp Wasserstein GAN: 'discriminator' => 'critic' 2018-05-11 19:56:34 +02:00
.gitignore Logo 2018-05-04 21:14:05 +02:00
LICENSE Initial commit 2017-07-11 18:24:54 +02:00
README.md Wasserstein GAN: 'discriminator' => 'critic' 2018-05-11 19:56:34 +02:00
requirements.txt Added pillow to requirements.txt 2018-04-17 08:09:36 +02:00

README.md

Keras-GAN

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

Table of Contents

Installation

$ git clone https://github.com/eriklindernoren/Keras-GAN
$ cd Keras-GAN/
$ sudo pip3 install -r requirements.txt

Implementations

AC-GAN

Implementation of Auxiliary Classifier Generative Adversarial Network.

Code

Paper: https://arxiv.org/abs/1610.09585

Example

$ cd acgan/
$ python3 acgan.py

Adversarial Autoencoder

Implementation of Adversarial Autoencoder.

Code

Paper: https://arxiv.org/abs/1511.05644

Example

$ cd aae/
$ python3 aae.py

BiGAN

Implementation of Bidirectional Generative Adversarial Network.

Code

Paper: https://arxiv.org/abs/1605.09782

Example

$ cd bigan/
$ python3 bigan.py

BGAN

Implementation of Boundary-Seeking Generative Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1702.08431

Example

$ cd bgan/
$ python3 bgan.py

CC-GAN

Implementation of Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1611.06430

Example

$ cd ccgan/
$ python3 ccgan.py

CGAN

Implementation of Conditional Generative Adversarial Nets.

Code

Paper:https://arxiv.org/abs/1411.1784

Example

$ cd cgan/
$ python3 cgan.py

Context Encoder

Implementation of Context Encoders: Feature Learning by Inpainting.

Code

Paper: https://arxiv.org/abs/1604.07379

Example

$ cd context_encoder/
$ python3 context_encoder.py

CoGAN

Implementation of Coupled generative adversarial networks.

Code

Paper: https://arxiv.org/abs/1606.07536

Example

$ cd cogan/
$ python3 cogan.py

CycleGAN

Implementation of Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1703.10593

Example

$ cd cyclegan/
$ bash download_dataset.sh apple2orange
$ python3 cyclegan.py

DCGAN

Implementation of Deep Convolutional Generative Adversarial Network.

Code

Paper: https://arxiv.org/abs/1511.06434

Example

$ cd dcgan/
$ python3 dcgan.py

DiscoGAN

Implementation of Learning to Discover Cross-Domain Relations with Generative Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1703.05192

Example

$ cd discogan/
$ bash download_dataset.sh edges2shoes
$ python3 discogan.py

DualGAN

Implementation of DualGAN: Unsupervised Dual Learning for Image-to-Image Translation.

Code

Paper: https://arxiv.org/abs/1704.02510

Example

$ cd dualgan/
$ python3 dualgan.py

GAN

Implementation of Generative Adversarial Network with a MLP generator and discriminator.

Code

Paper: https://arxiv.org/abs/1406.2661

Example

$ cd gan/
$ python3 gan.py

GAN on RGB face images Code

Example

$ cd gan/
<follow steps at the top of gan_rgb.py>
$ python3 gan_rgb.py

InfoGAN

Implementation of InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets.

Code

Paper: https://arxiv.org/abs/1606.03657

Example

$ cd infogan/
$ python3 infogan.py

LSGAN

Implementation of Least Squares Generative Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1611.04076

Example

$ cd lsgan/
$ python3 lsgan.py

Pix2Pix

Implementation of Unpaired Image-to-Image Translation with Conditional Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1611.07004

Example

$ cd pix2pix/
$ bash download_dataset.sh facades
$ python3 pix2pix.py

PixelDA

Implementation of Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks.

Code

Paper: https://arxiv.org/abs/1612.05424

MNIST to MNIST-M Classification

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%

SGAN

Implementation of Semi-Supervised Generative Adversarial Network.

Code

Paper: https://arxiv.org/abs/1606.01583

Example

$ cd sgan/
$ python3 sgan.py

SRGAN

Implementation of Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network.

Code

Paper: https://arxiv.org/abs/1609.04802

Example

$ cd srgan/
<follow steps at the top of srgan.py>
$ python3 srgan.py

WGAN

Implementation of Wasserstein GAN (with DCGAN generator and discriminator).

Code

Paper: https://arxiv.org/abs/1701.07875

Example

$ cd wgan/
$ python3 wgan.py

WGAN GP

Implementation of Improved Training of Wasserstein GANs.

Code

Paper: https://arxiv.org/abs/1704.00028

Example

$ cd wgan_gp/
$ python3 wgan_gp.py