Giter Site home page Giter Site logo

znxlwm / pytorch-mnist-celeba-cgan-cdcgan Goto Github PK

View Code? Open in Web Editor NEW
482.0 11.0 127.0 46.78 MB

Pytorch implementation of conditional Generative Adversarial Networks (cGAN) and conditional Deep Convolutional Generative Adversarial Networks (cDCGAN) for MNIST dataset

Python 100.00%
pytorch cgan cdcgan generative-adversarial-network conditional-gan conditional-dcgan mnist celeba gender

pytorch-mnist-celeba-cgan-cdcgan's Introduction

pytorch-MNIST-CelebA-cGAN-cDCGAN

Pytorch implementation of conditional Generative Adversarial Networks (cGAN) [1] and conditional Generative Adversarial Networks (cDCGAN) for MNIST [2] and CelebA [3] datasets.

Implementation details

  • cGAN

GAN

  • cDCGAN

Loss

Resutls

MNIST

  • Generate using fixed noise (fixed_z_)
cGAN cDCGAN
  • MNIST vs Generated images
MNIST cGAN after 50 epochs cDCGAN after 20 epochs
  • Learning Time
    • MNIST cGAN - Avg. per epoch: 9.13 sec; Total 50 epochs: 937.06 sec
    • MNIST cDCGAN - Avg. per epoch: 47.16 sec; Total 20 epochs: 1024.26 sec

CelebA

  • Generate using fixed noise (fixed_z_; odd line - female (y: 0) & even line - male (y: 1); each two lines have the same style (1-2) & (3-4).)
cDCGAN cDCGAN crop
  • CelebA vs Generated images
CelebA cDCGAN after 20 epochs cDCGAN crop after 30 epochs
  • CelebA cDCGAN morphing (noise interpolation)
cDCGAN cDCGAN crop
  • Learning Time
    • CelebA cDCGAN - Avg. per epoch: 826.69 sec; total 20 epochs ptime: 16564.10 sec

Development Environment

  • Ubuntu 14.04 LTS
  • NVIDIA GTX 1080 ti
  • cuda 8.0
  • Python 2.7.6
  • pytorch 0.1.12
  • torchvision 0.1.8
  • matplotlib 1.3.1
  • imageio 2.2.0

Reference

[1] Mirza, Mehdi, and Simon Osindero. "Conditional generative adversarial nets." arXiv preprint arXiv:1411.1784 (2014).

(Full paper: https://arxiv.org/pdf/1411.1784.pdf)

[2] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998.

[3] Liu, Ziwei, et al. "Deep learning face attributes in the wild." Proceedings of the IEEE International Conference on Computer Vision. 2015.

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.