gitmyhub

DCGAN-tensorflow

JavaScript ★ 7.2k updated 5y ago

A tensorflow implementation of "Deep Convolutional Generative Adversarial Networks"

A Python TensorFlow implementation of DCGAN, a machine learning model that generates realistic images like celebrity faces by training two neural networks to compete against each other.

PythonTensorFlowsetup: hardcomplexity 4/5

This repository contains a Python implementation of Deep Convolutional Generative Adversarial Networks, or DCGAN, a type of machine learning model that can generate realistic-looking images from scratch. The code uses TensorFlow, a framework for building and running machine learning models.

The core idea behind a GAN (Generative Adversarial Network) is that two neural networks train against each other. One network, called the Generator, tries to create fake images that look real. The other, called the Discriminator, tries to tell the difference between real and fake images. Over time, the Generator improves at producing convincing images as it learns what the Discriminator flags as suspicious. The "deep convolutional" part refers to a specific network structure that works well for image data.

This implementation was trained and tested on two main datasets: CelebA, a large dataset of celebrity face photos, and MNIST, a dataset of handwritten digit images. The README shows the output at different training stages: faces that become progressively more realistic after each pass through the data. You can also supply your own image folder and train the model on custom images.

Setup requires Python, an older version of TensorFlow (0.12.1), and a few image-processing libraries. Training runs from the command line, and the README includes the exact commands for each dataset.

The repository is based on a 2015 research paper that introduced the DCGAN architecture and references a related project that uses the same technique to fill in missing regions of photographs. The author also maintains several related generative model implementations linked at the bottom of the README.

Where it fits