Awesome Generative Adversarial Networks with tensorflow
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github/ISSUE_TEMPLATE update: issue template May 4, 2018
3DGAN edit name Dec 23, 2017
ACGAN change: elapsed time format Jun 29, 2018
AdaGAN update: To-Do Jun 28, 2018
AnoGAN fix: several errors from LGTM Sep 28, 2018
BEGAN add: BEGAN results Jun 29, 2018
BGAN update: To-Do Jul 7, 2018
CCGAN update: temporal issues from LGTM Sep 26, 2018
CGAN add: pre-trained model loader Jun 28, 2018
CoGAN add: CoGAN model link Jul 7, 2018
CycleGAN update: remodeling codes... Jun 22, 2018
DCGAN change: elapsed time format Jun 29, 2018
DRAGAN add: pre-trained model loader Jun 28, 2018
DeblurGAN add: vgg19 Jun 30, 2018
DiscoGAN fix: several errors from LGTM Sep 28, 2018
DualGAN update: remodeling codes... - v1 Jun 23, 2018
EBGAN add: elapsed time form Jun 29, 2018
FGAN update: time Jul 13, 2018
GAN fix: several errors from LGTM Sep 28, 2018
InfoGAN update: codes... Jun 29, 2018
LAPGAN change: elapsed time format Jun 29, 2018
LSGAN change: elapsed time format Jun 29, 2018
MAGAN change: elapsed time format Jun 29, 2018
MRGAN add: MRGAN results Jul 11, 2018
PGGAN update: just highlight Jun 22, 2018
SAGAN add: model link for 128x128 Jul 6, 2018
SEGAN fix: several errors from LGTM Sep 28, 2018
SGAN update: MNIST DataSet loader path May 8, 2018
SRGAN remove: cnt_scaling at MSE loss Jul 7, 2018
SalGAN change/edit/delete file names & add initial files Dec 21, 2017
SeqGAN change/edit/delete file names & add initial files Dec 21, 2017
StarGAN update: temporal issues from LGTM Sep 26, 2018
TempoGAN update: temporal issues from LGTM Sep 26, 2018
UGAN fix: typo error Jul 7, 2018
WGAN add: WGAN-GP results Jul 7, 2018
.gitignore add: ignore .github May 4, 2018
CONTRIBUTING.md add: contributing.md May 4, 2018
LICENSE Create LICENSE Oct 24, 2017
README.md update: LGTM alerts Sep 28, 2018
_config.yml Set theme jekyll-theme-slate Mar 12, 2018
datasets.py fix: alerts from LGTM Oct 6, 2018
image_utils.py add: inverse transform at img_save Jun 26, 2018
requirements.txt update: tensorflow-gpu to latest TF version Jun 21, 2018
tfutil.py update: comment stuff Jul 7, 2018

README.md

Awesome-GANs with Tensorflow

Tensorflow implementation of GANs(Generative Adversarial Networks)

License: MIT Awesome Total alerts Language grade: Python

Environments

Preferred Environment

  • OS : Windows 10 / Linux Ubuntu x86-64 ~
  • CPU : any (quad core ~)
  • GPU : GTX 1060 6GB ~
  • RAM : 16GB ~
  • Library : TF 1.x with CUDA 9.0~ + cuDNN 7.0~
  • Python 3.x

Because of the image and model size, (especially BEGAN, SRGAN, StarGAN, ... using high resolution images as input), if you want to train them comfortably, you need a GPU which has more than 8GB.

But, of course, the most of the implementations use MNIST or CiFar-10, 100 DataSets. Meaning that we can handle it with EVEN lower spec GPU than 'The Preferred' :).

Prerequisites

  • python 3.x
  • tensorflow 1.x
  • numpy
  • scipy (some features are about to deprecated, it'll be replaced to OpenCV SOON!)
  • scikit-image
  • opencv-python
  • pillow
  • h5py
  • tqdm
  • Internet :)

Usage

Dependency Install

$ sudo python3 -m pip install -r requirements.txt

Training GAN

(Before running train.py, MAKE SURE run after downloading DataSet & changing DataSet's directory in xxx_train.py)
just after it, RUN train.py
$ python3 xxx_train.py

DataSets

Now supporting(?) DataSets are... (code is in /datasets.py)

  • MNIST / Fashion MNIST
  • CiFar-10 / 100
  • CelebA/CelebA-HQ
  • pix2pix DataSets
  • DIV2K DataSets
  • ImageNet DataSets
  • UrbanSound8K
  • 3DShapeNet DataSet
  • (more DataSets will be added soon!)

Repo Tree

│
├── xxGAN
│    ├──gan_img (generated images)
│    │     ├── train_xxx.png
│    │     └── train_xxx.png
│    ├── model  (model)
│    │     └── model.txt (google-drive link for pre-trained model)
│    ├── gan_model.py (gan model)
│    ├── gan_train.py (gan trainer)
│    ├── gan_tb.png   (Tensor-Board result)
│    └── readme.md    (results & explains)
├── tfutil.py         (useful TF util)
├── image_utils.py    (image processing)
└── datasets.py       (DataSet loader)

Pre-Trained Models

Here's a google drive link. You can download pre-trained models from here !

Papers & Codes

Name Summary Paper Code
3D GAN 3D Generative Adversarial Networks [MIT]
ACGAN Auxiliary Classifier Generative Adversarial Networks [arXiv] [code]
AdaGAN Boosting Generative Models [arXiv]
AnoGAN Unsupervised Anomaly Detection with Generative Adversarial Networks [arXiv] [code]
BeatGAN Generating Drum Loops via GANs [arXiv]
BEGAN Boundary Equilibrium Generative Adversarial Networks [arXiv] [code]
BGAN Boundary-Seeking Generative Adversarial Networks [arXiv] [code]
CGAN Conditional Generative Adversarial Networks [arXiv] [code]
CipherGAN Unsupervised Cipher Cracking Using Discrete GANs [github]
CoGAN Coupled Generative Adversarial Networks [arXiv] [code]
CycleGAN Unpaired img2img translation using Cycle-consistent Adversarial Networks [arXiv] [code]
DAGAN Instance-level Image Translation by Deep Attention Generative Adversarial Networks [arXiv]
DCGAN Deep Convolutional Generative Adversarial Networks [arXiv] [code]
DeblurGAN Blind Motion Deblurring Using Conditional Adversarial Networks [arXiv]
DiscoGAN Discover Cross-Domain Generative Adversarial Networks [arXiv]
DRAGAN On Convergence and Stability of Generative Adversarial Networks [arXiv] [code]
DualGAN Unsupervised Dual Learning for Image-to-Image Translation [arXiv]
eCommerceGAN A Generative Adversarial Network for E-commerce [arXiv]
EBGAN Energy-based Generative Adversarial Networks [arXiv] [code]
f-GAN Training Generative Neural Samplers using Variational Divergence Minimization [arXiv] [code]
GAN Generative Adversarial Networks [arXiv] [code]
GP-GAN Towards Realistic High-Resolution Image Blending [arXiv]
Softmax GAN Generative Adversarial Networks with Softmax [arXiv] [code]
GAP Generative Adversarial Parallelization [arXiv]
GEGAN Generalization and Equilibrium in Generative Adversarial Networks [arXiv]
InfoGAN Interpretable Representation Learning by Information Maximizing Generative Adversarial Networks [arXiv] [code]
LAPGAN Laplacian Pyramid Generative Adversarial Networks [arXiv] [code]
LSGAN Loss-Sensitive Generative Adversarial Networks [arXiv] [code]
MAGAN Margin Adaptation for Generative Adversarial Networks [arXiv] [code]
MRGAN Mode Regularized Generative Adversarial Networks [arXiv] [code]
PGGAN Progressive Growing of GANs for Improved Quality, Stability, and Variation [arXiv]
SAGAN Self-Attention Generative Adversarial Networks [arXiv] [code]
SalGAN Visual Saliency Prediction Generative Adversarial Networks [arXiv]
SEGAN Speech Enhancement Generative Adversarial Network [arXiv]
SeqGAN Sequence Generative Adversarial Networks with Policy Gradient [arXiv]
SGAN Stacked Generative Adversarial Networks [arXiv] [code]
SGAN++ Realistic Image Synthesis with Stacked Generative Adversarial Networks [arXiv] [code]
SRGAN Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network [arXiv] [code]
StableGAN Stabilizing Adversarial Nets With Prediction Methods [arXiv]
StarGAN Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation [arXiv] [code]
TAC-GAN Text Conditioned Auxiliary Classifier Generative Adversarial Network [arXiv]
TempoGAN A Temporally Coherent, Volumetric GAN for Super-resolution Fluid Flow [arXiv]
TextureGAN Controlling Deep Image Synthesis with Texture Patches [arXiv]
TripleGAN Triple Generative Adversarial Networks [arXiv]
TwinGAN Cross-Domain Translation fo Human Portraits [github]
UGAN Unrolled Generative Adversarial Networks [arXiv]
WaveGAN Synthesizing Audio with Generative Adversarial Networks [arXiv]
WGAN Wasserstein Generative Adversarial Networks [arXiv] [code]
ImprovedWGAN Improved Training of Wasserstein Generative Adversarial Networks [arXiv] [code]
XGAN Unsupervised Image-to-Image Translation for Many-to-Many Mappings [arXiv]

To-Do

  1. Implement DeblurGAN
  2. Implement 3DGAN - later when DataSet is ready.
  3. Implement BeatGAN - later when DataSet is ready.
  4. Implement TempoGAN - later when DataSet is ready.
  5. Fix PGGAN, SGAN, SGAN++

ETC

Any suggestions and PRs and issues are WELCONE :)

Author

HyeongChan Kim / @kozistr