GistTree.Com
Entertainment at it's peak. The news is by your side.

Collection of GANs Written in Pytorch

0

Pytorch implementation of unsupervised GANs.

For additional defails about calculating Inception Rating and FID Rating utilizing pytorch will also be level to in Pytorch-Unified-Inception-FID-Rating

Units

  • DCGAN
  • WGAN
  • WGAN-GP
  • SN-GAN

Requirements

  • python 3.6
  • Set up python programs
    pip install -U pip setuptools
    pip install -r necessities.txt

Results

Mannequin Dataset Inception Rating FID Rating
DCGAN CIFAR10 6.111(0.088) 41.75
WGAN(CNN) CIFAR10 6.605(0.071) 30.73
WGAN-GP(CNN) CIFAR10 7.415(0.065) 21.89
WGAN-GP(ResNet) CIFAR10 7.829(0.076) 15.57
SNGAN(CNN) CIFAR10 7.521(0.111) 20.41
SNGAN(ResNet) CIFAR10 8.214(0.094) 14.41

Examples

  • DCGAN

    image image

  • WGAN(CNN)

    image image

  • WGAN-GP(CNN)

    image image

  • WGAN-GP(ResNet)

    image image

  • SNGAN(CNN)

    image image

  • SNGAN(ResNet)

    image image

Reproduce

Download cifar10_stats.npz for calculating FID ranking
and put it to ./stats/cifar10_stats.npz which is the default path

Training

  • DCGAN
     python gans/dcgan.py --flagfile ./config/DCGAN_CIFAR10.txt
    
  • WGAN(CNN)
     python gans/wgan.py --flagfile ./config/WGAN_CIFAR10_CNN.txt
    
  • WGAN-GP(CNN)
     python gans/wgangp.py --flagfile ./config/WGANGP_CIFAR10_CNN.txt
    
  • WGAN-GP(ResNet)
     python gans/wgangp.py --flagfile ./config/WGANGP_CIFAR10_RES.txt
    
  • SNGAN(CNN)
     python gans/sngan.py --flagfile ./config/SNGAN_CIFAR10_CNN.txt
    
  • SNGAN(ResNet)
     python gans/sngan.py --flagfile ./config/SNGAN_CIFAR10_RES.txt
    

Generate GIF

python tools/sample2gif.py --logdir path/to/logdir

e.g.

python tools/sample2gif.py --logdir ./logs/DCGAN_CIFAR10

output GIF is ./logs/DCGAN_CIFAR10/growth.gif

Read More

Leave A Reply

Your email address will not be published.