Giter Site home page Giter Site logo

gongxinyuu / sngan.pytorch Goto Github PK

View Code? Open in Web Editor NEW
45.0 2.0 10.0 32 KB

An unofficial Pytorch implementation of SNGAN, achieving IS of 8.21 and FID of 14.21 on CIFAR-10.

License: MIT License

Python 98.94% Shell 1.06%
sngan pytorch inception-score fid-score fid spectral-normalization

sngan.pytorch's Introduction

SNGAN.pytorch

An unofficial Pytorch implementation of Spectral Normalization for Generative Adversarial Networks. For official Chainer implementation please refer to https://github.com/pfnet-research/sngan_projection

Our implementation achieves Inception score of 8.21 and FID score of 14.21 on unconditional CIFAR-10 image generation task. In comparison, the original paper claims 8.22 and 21.7 respectively.

Set-up

install libraries:

pip install -r requirements.txt

prepare fid statistic file

mkdir fid_stat

Download the pre-calculated statistics for CIFAR10, fid_stats_cifar10_train.npz, to ./fid_stat.

train

sh exps/sngan_cifar10.sh

test

mkdir pre_trained

Download the pre-trained SNGAN model sngan_cifar10.pth to ./pre_trained. Run the following script:

sh exps/eval.sh

Acknowledgement

  1. Inception Score code from OpenAI's Improved GAN (official).
  2. FID code and statistics file from https://github.com/bioinf-jku/TTUR (official).
  3. The code of Spectral Norm GAN is inspired by https://github.com/pfnet-research/sngan_projection (official).

sngan.pytorch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sngan.pytorch's Issues

I get FID 21 as claimed in paper and not FID 14 as stated in repository.

Our implementation achieves Inception score of 8.21 and FID score of 14.21 on unconditional CIFAR-10 image generation task. In comparison, the original paper claims 8.22 and 21.7 respectively.

I think I can explain the difference. Some people compute FID with training samples while others use validation samples. I used validation samples and got FID the same as the paper (~21), so I'd guess you used training samples which would explain the slightly lower score.

Question 1 Did you compute FID with training or validation samples?

How to set the learning rate adjustment method?

Hello, our research group is using sngan code recently. When training cifar10, what is the parameter LR_ Is decay set to true by default? Thank you for your reply.
parser.add_argument( '--lr_decay', action='store_true', help='learning rate decay or not')

pre-calculated statistics for STL10

Hi,

Do u have any idea how to download the pre-calculated statistics for STL10?like 'stl10_train_unlabeled_fid_stats_48.npz' in 79 line in train.py?

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.