Coder Social home page Coder Social logo

dcgan's Introduction

Keras implementation of Deep Convolutional Generative Adversarial Networks (DCGAN)

This is an implementation of DCGAN (Link to the paper: http://arxiv.org/abs/1511.06434) with Keras on top of TensorFlow. Two adversarial networks are trained on real images for generating artificial images that seems real.

Requirements

Install using pip install -r requirements.txt

You will also need to ensure the proper CUDA libraries and NVIDIA drivers are installed.

Usage

The dcgan.py script enables training of the DCGAN model with MNIST dataset and subsequently generate artificial images from the trained model.

Training:

python dcgan.py --mode train --batch_size <batch_size> --num_epoch <num_epoch>

Example:

python dcgan.py --mode train --batch_size 128 --num_epoch 100

Generate images:

python dcgan.py --mode generate --batch_size <batch_size>

Note: the batch_size value for generating images must equal to the batch_size value used during the training step.

Similarly, the optional --pretty flag will generate the top 5% artificial image determined by the discriminator.

python dcgan.py --mode generate --batch_size <batch_size> --pretty

Example:

python dcgan.py --mode generate --batch_size 128

or

python dcgan.py --mode generate --batch_size 128 --pretty

Result

Training progress:

Animation shows generated images during the training process of DCGAN over 100 epochs.

dcgan's People

Contributors

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