• Stars
    star
    760
  • Rank 59,770 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Awesome Generative Adversarial Networks with tensorflow

Awesome-GANs with Tensorflow

Tensorflow implementation of GANs (Generative Adversarial Networks)

Awesome License: MIT Language grade: Python

WIP : This repo is about to be refactored & supporting tf 2.x.

Maybe some codes wouldn't work on master branch, because i'm just working on the branch.

Environments

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' :).

Usage

Now on refactoring... All GAN training script can be run module-wisely like below. (WIP)

Install dependencies

You can also use conda, virtualenv environments.

$ python3 -m pip install -r requirements.txt

Train GANs

Before running the model, make sure that

  1. downloading the dataset like CelebA, MNIST, etc what you want
  2. In awesome_gans/config.py, there are several configurations, customize with your flavor!
  3. running the model like below
$ python3 -m awesome_gans.acgan

DataSets

Supporting datasets are ... (code is in /awesome_gans/datasets.py)

  • MNIST / Fashion MNIST
  • CIFAR10 / 100
  • CelebA/CelebA-HQ
  • Pix2Pix
  • DIV2K
  • (more DataSets will be added soon!)

Repo Tree

โ”‚
โ”œโ”€โ”€ awesome_gans (source codes & eplainations & results & models) 
โ”‚        โ”‚
โ”‚        โ”œโ”€โ”€ acgan
โ”‚        โ”‚    โ”œโ”€โ”€gen_img (generated images)
โ”‚        โ”‚    โ”‚     โ”œโ”€โ”€ train_xxx.png
โ”‚        โ”‚    โ”‚     โ””โ”€โ”€ train_xxx.png
โ”‚        โ”‚    โ”œโ”€โ”€ model  (pre-trained model file)
โ”‚        โ”‚    โ”‚     โ””โ”€โ”€ model.txt (google-drive link)
โ”‚        โ”‚    โ”œโ”€โ”€ __init__.py
โ”‚        โ”‚    โ”œโ”€โ”€ __main__.py
โ”‚        โ”‚    โ”œโ”€โ”€ model.py (gan model)
โ”‚        โ”‚    โ”œโ”€โ”€ train.py (gan trainer)
โ”‚        โ”‚    โ”œโ”€โ”€ gan_tb.png   (tensorboard loss plot)
โ”‚        โ”‚    โ””โ”€โ”€ readme.md    (results & explainations)
โ”‚        โ”œโ”€โ”€ config.py         (configurations)
โ”‚        โ”œโ”€โ”€ modules.py        (networks & operations)
โ”‚        โ”œโ”€โ”€ utils.py          (auxiliary utils)
โ”‚        โ”œโ”€โ”€ image_utils.py    (image processing)
โ”‚        โ””โ”€โ”€ datasets.py       (dataset loader)
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ Makefile   (for linting the codes)
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md  (Usage & GAN paper list-up)
โ””โ”€โ”€ requirements.txt

Papers & Codes

Here's the list-up for tons of GAN papers. all papers are sorted by alphabetic order.

Start

Here's the beginning of the GAN.

Name Summary Paper Code
GAN Generative Adversarial Networks [arXiv] [code]

Theory & Concept

Here for the theories & concepts of the GAN.

Name Summary Paper Code Official Code
ACGAN Auxiliary Classifier Generative Adversarial Networks [arXiv] [code]
AdaGAN Boosting Generative Models [arXiv] [code]
bCR Improved Consistency Regularization for GANs [arXiv] [code]
BEGAN Boundary Equilibrium Generative Adversarial Networks [arXiv] [code]
BGAN Boundary-Seeking Generative Adversarial Networks [arXiv] [code]
BigGAN Large Scale GAN Training for High Fidelity Natural Image Synthesis [arXiv] [code]
CGAN Conditional Generative Adversarial Networks [arXiv] [code]
CoGAN Coupled Generative Adversarial Networks [arXiv] [code]
ConSinGAN Improved Techniques for Training Single-Image GANs [WACV21] [code] [official]
DCGAN Deep Convolutional Generative Adversarial Networks [arXiv] [code]
DRAGAN On Convergence and Stability of Generative Adversarial Networks [arXiv] [code]
EBGAN Energy-based Generative Adversarial Networks [arXiv] [code]
EqGAN-SA Improving GAN Equilibrium by Raising Spatial Awareness [arXiv] [code] [official]
f-GAN Training Generative Neural Samplers using Variational Divergence Minimization [arXiv] [code]
GP-GAN Towards Realistic High-Resolution Image Blending [arXiv] [code]
Softmax GAN Generative Adversarial Networks with Softmax [arXiv] [code]
GAP Generative Adversarial Parallelization [arXiv] [code]
GEGAN Generalization and Equilibrium in Generative Adversarial Networks [arXiv] [code]
G-GAN Geometric GAN [arXiv] [code]
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]
MSGGAN Multi-Scale Gradients for Generative Adversarial Networks [arXiv] [code]
PGGAN Progressive Growing of GANs for Improved Quality, Stability, and Variation [arXiv] [code] [official]
RaGAN The relativistic discriminator: a key element missing from standard GAN [arXiv] [code]
SeAtGAN Self-Attention Generative Adversarial Networks [arXiv] [code]
SphereGAN Sphere Generative Adversarial Network Based on Geometric Moment Matching [CVPR2019] [code]
SGAN Stacked Generative Adversarial Networks [arXiv] [code]
SGAN++ Realistic Image Synthesis with Stacked Generative Adversarial Networks [arXiv] [code]
SinGAN Learning a Generative Model from a Single Natural Image [arXiv] [code] [official]
StableGAN Stabilizing Adversarial Nets With Prediction Methods [arXiv] [code]
StyleCLIP Text-Driven Manipulation of StyleGAN Imagery [arXiv] [code] [official]
StyleGAN A Style-Based Generator Architecture for Generative Adversarial Networks [arXiv] [code] [official]
StyleGAN2 Analyzing and Improving the Image Quality of StyleGAN [arXiv] [code] [official]
StyleGAN2 ADA StyleGAN2 with adaptive discriminator augmentation [arXiv] [code] [official]
StyleGAN3 Alias-Free Generative Adversarial Networks [arXiv] [code] [official]
StyleGAN-XL Scaling StyleGAN to Large Diverse Datasets [arXiv] [code] [official]
TripleGAN Triple Generative Adversarial Networks [arXiv] [code]
UGAN Unrolled Generative Adversarial Networks [arXiv] [code]
U-Net GAN A U-Net Based Discriminator for Generative Adversarial Networks [CVPR20] [code] [official]
WGAN Wasserstein Generative Adversarial Networks [arXiv] [code]
WGAN-GP Improved Training of Wasserstein Generative Adversarial Networks [arXiv] [code]

Applied Vision

Here for the GAN applications on Vision domain, like image-to-image translation, image in-painting, single image super resolution , etc.

Name Summary Paper Code Official Code
3D GAN 3D Generative Adversarial Networks [MIT] [code]
AnycostGAN Anycost GANs for Interactive Image Synthesis and Editing [arXiv] [code] [official]
CycleGAN Unpaired img2img translation using Cycle-consistent Adversarial Networks [arXiv] [code]
DAGAN Instance-level Image Translation by Deep Attention Generative Adversarial Networks [arXiv] [code]
DeblurGAN Blind Motion Deblurring Using Conditional Adversarial Networks [arXiv] [code]
DualGAN Unsupervised Dual Learning for Image-to-Image Translation [arXiv] [code]
DRIT/++ Diverse Image-to-Image Translation via Disentangled Representations [arXiv] [code] [official]
EdgeConnect Generative Image Inpainting with Adversarial Edge Learning [arXiv] [code] [official]
ESRGAN Enhanced Super-Resolution Generative Adversarial Networks [arXiv] [code]
FastGAN Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis [arXiv] [code] [official]
FUNIT Few-Shot Unsupervised Image-to-Image Translation [arXiv] [code] [official]
CA & GA Generative Image Inpainting w/ Contextual Attention & Gated Convolution [CVPR2018], [ICCV2019] [code] [official]
HiFaceGAN Face Renovation via Collaborative Suppression and Replenishment [arXiv] [code]
MUNIT Multimodal Unsupervised Image-to-Image Translation [arXiv] [code] [official]
NICE-GAN Reusing Discriminators for Encoding [arXiv] [code] [official]
PSGAN Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer [arXiv] [code] [official]
SpAtGAN Generative Adversarial Network with Spatial Attention for Face Attribute Editing [ECCV2018] [code]
SalGAN Visual Saliency Prediction Generative Adversarial Networks [arXiv] [code]
SRFlow Super-Resolution using Normalizing Flow [arXiv] [code] [official]
SRGAN Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network [arXiv] [code]
SRResCGAN Deep Generative Adversarial Residual Convolutional Networks for Real-World Super-Resolution [arXiv] [code] [official]
StarGAN Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation [arXiv] [code] [official]
StarGAN V2 Diverse Image Synthesis for Multiple Domains [arXiv] [code] [official]
StyleGAN-V A Continuous Video Generator with the Price, Image Quality and Perks of StyleGAN2 [arXiv] [code] [official]
TecoGAN Learning Temporal Coherence via Self-Supervision for GAN-based Video Generation [arXiv] [code] [official]
TextureGAN Controlling Deep Image Synthesis with Texture Patches [arXiv] [code]
TUNIT Rethinking the Truly Unsupervised Image-to-Image Translation [arXiv] [code] [official]
TwinGAN Cross-Domain Translation fo Human Portraits [github] [code]
UNIT Unsupervised Image-to-Image Translation Networks [arXiv] [code] [official]
XGAN Unsupervised Image-to-Image Translation for Many-to-Many Mappings [arXiv] [code]
Zero-DCE Zero-Reference Deep Curve Estimation for Low-Light Image Enhancement [CVPR20] [code] [official]

Applied Audio

Here for the GAN applications on Audio domain, like wave generation, wave to wave translation, etc.

Name Summary Paper Code Official Code
AAS Adversarial Audio Synthesis [arXiv] [code]
BeatGAN Generating Drum Loops via GANs [arXiv] [code]
GANSynth Adversarial Neural Audio Synthesis [arXiv] [code]
MuseGAN Multi-track Sequential GANs for Symbolic Music Generation and Accompaniment [arXiv] [code]
SEGAN Speech Enhancement Generative Adversarial Network [arXiv] [code]
StarGAN-VC Non-parallel many-to-many voice conversion with star generative adversarial networks [arXiv] [code]
TempoGAN A Temporally Coherent, Volumetric GAN for Super-resolution Fluid Flow [arXiv] [code]
Parallel WaveGAN A fast waveform generation model based on GAN with multi-resolution spectrogram [arXiv] [code]
WaveGAN Synthesizing Audio with Generative Adversarial Networks [arXiv] [code]

Applied Others

Here for the GAN applications on other domains, like nlp, tabular, etc.

Name Summary Paper Code Official Code
AnoGAN Unsupervised Anomaly Detection with Generative Adversarial Networks [arXiv] [code]
CipherGAN Unsupervised Cipher Cracking Using Discrete GANs [github] [code]
DiscoGAN Discover Cross-Domain Generative Adversarial Networks [arXiv] [code]
eCommerceGAN A Generative Adversarial Network for E-commerce [arXiv] [code]
PassGAN A Deep Learning Approach for Password Guessing [arXiv] [code]
SeqGAN Sequence Generative Adversarial Networks with Policy Gradient [arXiv] [code]
TAC-GAN Text Conditioned Auxiliary Classifier Generative Adversarial Network [arXiv] [code]

Useful Resources

Here for the useful resources when you try to train and stable a gan model.

Name Summary Link
GAN Hacks a bunch of tips & tricks to train GAN stable github

Note

Any suggestions and PRs and issues are WELCOME :)

Author

HyeongChan Kim / @kozistr

More Repositories

1

pytorch_optimizer

optimizer & lr scheduler & loss function collections in PyTorch
Python
195
star
2

Awesome-Segmentations

Lots of semantic image segmentation implementations in Tensorflow/Keras
Python
67
star
3

rcan-tensorflow

Image Super-Resolution Using Very Deep Residual Channel Attention Networks Implementation in Tensorflow
Python
51
star
4

AdaBound-tensorflow

An optimizer that trains as fast as Adam and as good as SGD in Tensorflow
Python
45
star
5

ESRGAN-tensorflow

Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution
Python
34
star
6

triton-grpc-proxy-rs

Proxy server for triton gRPC server that inferences embedding model in Rust
Rust
15
star
7

improved-edge-connect

EdgeConnect: Structure Guided Image Inpainting using Edge Prediction, ICCV 2019 w/ some my ways :)
Python
13
star
8

Awesome-Super-Resolution

lots of single image super resolution model implementations in tensorflow
Python
9
star
9

gan-metrics

Lots of evaluation metrics for the generative adversarial networks in pytorch
Python
7
star
10

semantic-search-rs

semantic vector search demo with gRPC server in Rust
Rust
7
star
11

ML-Study

machine learning studies
Jupyter Notebook
7
star
12

face-hair-segmentation-keras

face & hair semantic image segmentation in keras
Python
6
star
13

NatSR-pytorch

Natural and Realistic Single Image Super-Resolution with Explicit Natural Manifold Discrimination (CVPR, 2019) in pytorch
Python
6
star
14

movie-rate-prediction

Movie Rate Prediction with Tensorflow
Python
5
star
15

RAdam-tensorflow

On The Variance Of The Adaptive Learning Rate And Beyond in tensorflow
Python
4
star
16

catboost-server-rs

CatBoost server in Rust + gRPC
Rust
4
star
17

kozistr.github.io

my github blog
SCSS
4
star
18

improved-ContentDisentanglement

PyTorch implementation of "Emerging Disentanglement in Auto-Encoder Based Unsupervised Image Content Transfer" - tuned version
Python
4
star
19

whitehat-league-1

write ups
3
star
20

gan_demo

GAN image generator with django (backend)
Python
3
star
21

Data-Structure

Data Structure & Some Algorithm implementations in c
C
2
star
22

kozistr

my simple profile
2
star
23

naver-ai-hackathon-2018

NAVER A.I Hackathon 2018
Python
2
star
24

image-captioning-tensorflow

Image Captioning with tensorflow
Python
2
star
25

naver-nlp-challenge-2018

NAVER NLP Challenge 2018
Python
1
star
26

style-transfer

style-transfer with tensorflow
Python
1
star
27

tacotron-tensorflow

A TensorFlow implementation of Google's Tacotron speech synthesis
Python
1
star
28

Ranger-tensorflow

RAdam + LookAhead optimizer in tensorflow
1
star