Coder Social home page Coder Social logo

pytorch-gan-collections's Introduction

Collections of GANs

Pytorch implementation of unsupervised GANs.

For more defails about calculating Inception Score and FID Score using pytorch can be found in Pytorch-Unified-Inception-FID-Score

Models

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

Requirements

  • python 3.6
  • Install python packages
    pip install -U pip setuptools
    pip install -r requirements.txt

Results

Model Dataset Inception Score FID Score
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 score 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/progress.gif

pytorch-gan-collections's People

Contributors

w86763777 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.