Member-only story
Generating Human Face using GAN | TensorFlow
4 min readFeb 17, 2019
In this project, I am going to show how to generate human faces using Generative Adversarial Network (GAN), which probably do not exist in real life.
Deep Convolution GAN (DC-GAN)
I will be using the Deep Convolution Generative Adversarial Network (DC-GAN) for this task. I am using CelebA dataset for training the network. This dataset contains 2,00,000 images of well-known people. I assume that you have a theoretical understanding of GANs. I will be using TensorFlow framework in this tutorial. Let’s begin.
This is how our pipeline will look like
- Normalize the images.
- Create Generator and Discriminator network.
- Train the network and generate new faces.
Following are the few images from our dataset.
Normalizing the images
- As a first step, we import libraries that we will make use of.
- We load all the images using PIL. While loading the images we crop all images around the face and resize them to (64, 64, 3)