https://github.com/morvanzhou/mnistgans
Some implementations of GAN.
https://github.com/morvanzhou/mnistgans
Last synced: 2 months ago
JSON representation
Some implementations of GAN.
- Host: GitHub
- URL: https://github.com/morvanzhou/mnistgans
- Owner: MorvanZhou
- License: mit
- Created: 2020-10-16T03:45:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-26T08:27:23.000Z (over 1 year ago)
- Last Synced: 2025-04-09T18:18:57.151Z (2 months ago)
- Language: Python
- Homepage: https://mofanpy.com
- Size: 201 KB
- Stars: 217
- Watchers: 4
- Forks: 58
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GANs implementation using MNIST data
This repo is a collection of the implementations of many GANs.
In order to make the codes easy to read and follow,
I minimize the code and run on the same MNIST dataset.What does the MNIST data look like?

Toy implementations are organized as following:
**1. Base Method**
- [GAN](#GAN)
- [Deep Convolutional GAN (DCGAN)](#DCGAN)**2. Loss or Structure Modifications**
- [Least Squares GAN (LSGAN)](#LSGAN)
- [Wasserstein GAN (WGAN)](#WGAN)
- [Gradient Penalty (WGAN gp)](#WGANpg)
- [Wasserstein Divergence (WGAN_div)](#WGANdiv)
- [Self-Attention GAN (SAGAN)](#SAGAN)
- [Progressive-Growing GAN (PGGAN)](#PGGAN)
**3. Can be Conditional**- [Conditional GAN (CGAN)](#CGAN)
- [Auxiliary Classifier GAN (ACGAN)](#ACGAN)
- [InfoGAN](#InfoGAN)
- [StyleGAN](#StyleGAN)**4. Image to Image Transformation**
- [Context-Conditional GAN (CCGAN)](#CCGAN)
- [Pix2Pix](#Pix2Pix)
- [CycleGAN](#CycleGAN)
- [Super-Resolution GAN (SRGAN)](#SRGAN)
- WIP
# Installation
```shell script
$ git clone https://github.com/MorvanZhou/mnistGANs
$ cd mnistGANs/
$ pip3 install -r requirements.txt
```
## GAN
[Generative Adversarial Nets](https://papers.nips.cc/paper/5423-generative-adversarial-nets.pdf)[code](gan.py) - [gif result](https://mofanpy.com/static/results/gan/gan/generating.gif)

## DCGAN
[Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks](https://arxiv.org/pdf/1511.06434.pdf)[code](dcgan.py) - [gif result](https://mofanpy.com/static/results/gan/dcgan/generating.gif)

## LSGAN
[Least Squares Generative Adversarial Networks](https://arxiv.org/pdf/1611.04076.pdf)[code](lsgan.py) - [gif result](https://mofanpy.com/static/results/gan/lsgan/generating.gif)

## WGAN
[Wasserstein GAN](https://arxiv.org/pdf/1701.07875.pdf)[code](wgan.py) - [gif result](https://mofanpy.com/static/results/gan/wgan/generating.gif)

## WGANpg
[Improved Training of Wasserstein GANs](https://arxiv.org/pdf/1704.00028.pdf)[code](wgan_gp.py) - [gif result](https://mofanpy.com/static/results/gan/wgangp/generating.gif)

## WGANdiv
[Wasserstein Divergence for GANs](https://arxiv.org/pdf/1712.01026.pdf)[code](wgan_div.py) - [gif result](https://mofanpy.com/static/results/gan/wgandiv/generating.gif)

## SAGAN
[Self-Attention Generative Adversarial Networks](https://arxiv.org/pdf/1805.08318.pdf)[code](sagan.py) - [gif result](https://mofanpy.com/static/results/gan/sagan/generating.gif)

## PGGAN
[PROGRESSIVE GROWING OF GANS FOR IMPROVED QUALITY, STABILITY, AND VARIATION](https://arxiv.org/pdf/1710.10196.pdf)[code](pggan.py) - [gif result](https://mofanpy.com/static/results/gan/pggan/generating.gif)

## CGAN
[Conditional Generative Adversarial Nets](https://arxiv.org/pdf/1411.1784.pdf)[code](cgan.py) - [gif result](https://mofanpy.com/static/results/gan/cgan/generating.gif)

## ACGAN
[Conditional Image Synthesis with Auxiliary Classifier GANs](https://arxiv.org/pdf/1610.09585.pdf)[code](acgan.py) - [gif result](https://mofanpy.com/static/results/gan/acgan/generating.gif)

## InfoGAN
[InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets](https://arxiv.org/pdf/1606.03657.pdf)[code](infogan.py) - [gif result](https://mofanpy.com/static/results/gan/infogan/generating.gif)

## StyleGAN
[A Style-Based Generator Architecture for Generative Adversarial Networks](https://arxiv.org/pdf/1812.04948.pdf)[code](stylegan.py) - [gif result](https://mofanpy.com/static/results/gan/stylegan/generating.gif)

## CCGAN
[Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks](https://arxiv.org/pdf/1611.06430.pdf)[code](ccgan.py) - [gif result](https://mofanpy.com/static/results/gan/ccgan/generating.gif)

## Pix2Pix
[Image-to-Image Translation with Conditional Adversarial Networks](https://arxiv.org/pdf/1611.07004.pdf)[code](pix2pix.py) - [gif result](https://mofanpy.com/static/results/gan/pix2pix/generating.gif)

## CycleGAN
[Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks](https://arxiv.org/pdf/1703.10593)[code](cyclegan.py) - [gif result](https://mofanpy.com/static/results/gan/cyclegan/generating.gif)

## SRGAN
[Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network](https://openaccess.thecvf.com/content_cvpr_2017/papers/Ledig_Photo-Realistic_Single_Image_CVPR_2017_paper.pdf)[code](srgan.py) - [gif result](https://mofanpy.com/static/results/gan/srgan/generating.gif)
