Face generation

As we mentioned in the previous chapter, the Generator and Discriminator consist of a Deconvolutional Network (DNN: https://www.quora.com/How-does-a-deconvolutional-neural-network-work) and Convolutional Neural Network (CNN: http://cs231n.github.io/convolutional-networks/):

  • CNN is a a type of neural network that encodes hundreds of pixels of an image into a vector of small dimensions (z), which is a summary of the image
  • DNN is a network that learns some filters to recover the original image from z

Also, the discriminator will output one or zero to indicate whether the input image is from the actual dataset or generated by the generator. On the other side, the generator will try to replicate images similar to the original dataset based on the latent space z, which might follow a Gaussian distribution. So, the goal of the discriminator is to correctly discriminate between the real images, and the goal of the generator is to learn the distribution of the original dataset and hence fool the discriminator so that it makes a wrong decision.

In this section, we'll try to teach the generator to learn human face image distribution so that it can generate realistic faces.

Generating human-like faces is crucial for most graphics companies, who are always looking for new faces for their applications, and it gives us a clue of how artificial intelligence is really close to achieving realism in generating artificial faces.

In this example, we'll be using the CelebA dataset. The CelebFaces Attributes Dataset (CelebA)  is a large-scale face attributes dataset with about 200K celebrity images, each with 40 attribute annotations. There are lots of pose variations covered by the dataset, as well as background clutter, so CelebA is very diverse and well annotated. it includes:

  • 10,177 identities
  • 202,599 face images
  • Five landmark locations and 40 binary attribute annotations per image

We can use this dataset for many computer vision applications other than face generation, such as face recognition and localization, or face attribute detection.

This figure shows how the generator error, or learning human face distribution, gets close to realism during the training process:

Figure 1: GANs for generating new faces from a celebrity images dataset
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset