Giter Club home page Giter Club logo

improved_wgan_training's Introduction

Improved Training of Wasserstein GANs

This is a project test Wasserstein GAN objectives on single image super-resolution. The code is built on a fork of the popular project under the same title.

We expand the original repo by another model gan_SR.py: GANs that generate 64x64-pixel images from 16x16-low-resolution inputs. The default dataset is the cropped aligned celebA dataset. Other dataset would require minor modifications.

Data preprocessing is required before training:

bash celebA_preprocess.sh

will download celebA dataset, crop and resize to 64x64. Note this might take a while.

To run, modify the path of data directory, summary directory (for tensorboard) and output directory in run_script.sh.

bash run_script.sh

Here is a sample output, using WGAN-GP objective and DCGAN architecture and 1 epoch of training. From left to right are low resolution input, bicubic interpolation, wgangp output and original image.

input | bicubic | WGAN-gp | original

Description of the original repository

Code for reproducing experiments in "Improved Training of Wasserstein GANs".

Prerequisites

  • Python, NumPy, TensorFlow, SciPy, Matplotlib
  • A recent NVIDIA GPU

Models

Configuration for all models is specified in a list of constants at the top of the file. Two models should work "out of the box":

  • python gan_toy.py: Toy datasets (8 Gaussians, 25 Gaussians, Swiss Roll).
  • python gan_mnist.py: MNIST

For the other models, edit the file to specify the path to the dataset in DATA_DIR before running. Each model's dataset is publicly available; the download URL is in the file.

  • python gan_64x64.py: 64x64 architectures (this code trains on ImageNet instead of LSUN bedrooms in the paper)
  • python gan_language.py: Character-level language model
  • python gan_cifar.py: CIFAR-10

improved_wgan_training's People

Contributors

yuguangtong avatar igul222 avatar

Watchers

James Cloos 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.