Giter Club home page Giter Club logo

pytorch_gan_celeba's Introduction

Pytorch_GAN_CelebA

Pytorch implementation of DCGAN, CDCGAN, LSGAN, WGAN and WGAN-GP for CelebA dataset.

Usage

1. Download the CelebA dataset, and aligned version is used in this repo.

2. Clone the repo

$ git clone https://github.com/AndrewZhuZJU/Pytorch_GAN_CelebA.git
$ cd Pytorch_GAN_CelebA

3. Training

To train any GAN please use main_**.py. For example,

$ python main_DCGAN.py

Not that all the setting parameters for the modesl are in args.py, please change properly.

Results

Animation of generated images with fixed noise (or condition labels) during training progress

DCGAN LSGAN CGAN(Up:Male, Bottom:Female)
WGAN WGAN-GP

Generated images in Epoch 40

DCGAN LSGAN CGAN(Up:Male, Bottom:Female)
WGAN WGAN-GP

Evaluation

  • Inception score calculated in Epoch 40 (30K generated images)
DCGAN LSGAN WGAN WGAN-GP
2.10 $\pm$ 0.04 2.08 $\pm$ 0.02 2.20 $\pm$ 0.02 1.97 $\pm$ 0.02
  • Inception score calculated in Epoch 20 (30K generated images)
DCGAN LSGAN WGAN WGAN-GP
2.07 $\pm$ 0.03 1.95 $\pm$ 0.03 2.05 $\pm$ 0.02 2.00 $\pm$ 0.02

Loss Plot

Take DCGAN for example:

Generator Loss
Discriminator Loss

Development Environment

  • Ubuntu 16.04 LTS
  • NVIDIA GTX 1080 Ti
  • CUDA 9.0
  • pytorch 0.4
  • python 2.7
  • Others Dependencies: numpy, imageio, torchvision, tensorboard, etc.

References

1.Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks

2.Conditional Generative Adversarial Nets

3.Wasserstein GAN

4.Improved Training of Wasserstein GANs

5.Least Squares Generative Adversarial Networks

pytorch_gan_celeba's People

Contributors

andrewzhuzju avatar binzhubz 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.