项目作者: AndrewZhuZJU

项目描述 :
Pytorch implementation of DCGAN, CDCGAN, LSGAN, WGAN and WGAN-GP for CelebA dataset.
高级语言: Python
项目地址: git://github.com/AndrewZhuZJU/Pytorch_GAN_CelebA.git
创建时间: 2019-03-19T14:01:51Z
项目社区:https://github.com/AndrewZhuZJU/Pytorch_GAN_CelebA

开源协议:

下载


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

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

3. Training

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

  1. $ 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