Coder Social home page Coder Social logo

pegans's Introduction

PEGANs

framework This is the official implementation of PE-GANs

Requirements

  • Python 3.9.0
  • Python packages
    # update `pip` for installing tensorboard.
    pip install -U pip setuptools
    pip install -r requirements.txt

Datasets

  • CIFAR-10

    Pytorch build-in CIFAR-10 will be downloaded automatically.

  • STL-10

    Pytorch build-in STL-10 will be downloaded automatically.

Preprocessing Datasets for FID

Pre-calculated statistics for FID can be downloaded here:

  • cifar10.train.npz - Training set of CIFAR10
  • cifar10.test.npz - Testing set of CIFAR10
  • stl10.unlabeled.48.npz - Unlabeled set of STL10 in resolution 48x48

Folder structure:

./stats
├── cifar10.test.npz
├── cifar10.train.npz
└── stl10.unlabeled.48.npz

NOTE

All the reported values (Inception Score and FID) in our paper are calculated by official implementation instead of our implementation.

Training

  • Configuration files

    • We use absl-py to parse, save and reload the command line arguments.

    • All the configuration files can be found in ./config.

    • The compatible configuration list is shown in the following table:

      Script Configurations
      trainPEGAN.py PEGAN_P5_CIFAR10_CNN.txt
      PEGAN_P5_STL10_CNN.txt
      PEGAN_P10_CIFAR10_CNN.txt
      PEGAN_P10_STL10_CNN .txt
      trainSNGAN.py SNGAN_CNN_CIFAR10.txt
      trainWGAN.py WGAN_CNN_CIFAR10.txt
      trainWGANGP.py WGAN_GP_CNN_CIFAR10.txt
  • Run the training script with the compatible configuration, e.g.,

    • trainPEGAN.py supports training gan on CIFAR10 and STL10, e.g.,
      python trainPEGAN.py \
          --flagfile ./config/PEGAN_P10_CIFAR10_CNN.txt
  • Generate images from checkpoints, e.g.,

    --eval: evaluate best checkpoint.

    --save PATH: save the generated images to PATH

    python train.py \
        --flagfile ./logs/PEGAN_P10_CIFAR10_CNN/flagfile.txt \
        --eval \
        --save path/to/generated/images
    

Acknowledgments

Pytorch framework from GNGAN.

pegans's People

Contributors

weinnatt 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.