Intro to GAN's

AkulMehra

Agenda

  • Introduction to GAN
  • Architecture of GAN
  • Introduction to CNN
  • Applications of GAN's
Hello world of Machine learning

Classifying Handwritten digits using image processing and machine learning

MNIST Dataset

5                         0                        4                         1

But with GAN's we can generate new images

Generative Adversarial Networks

Generative Adversarial Networks (GAN's) are a class of neural networks which allow a network to generate data with the same internal structure as other data.

A GAN has two parts in it:

  • the generator that generates images
  • the discriminator that classifies real and fake images

Generative Adversarial Networks

  • The generator trying to maximize the probability of making the discriminator mistakes its inputs as real.
  • And the discriminator guiding the generator to produce more realistic images.
  • In the perfect equilibrium, the generator would capture the general training data distribution. As a result, the discriminator would be always unsure of whether its inputs are real or not.

Structure of a GAN

The generator that generates images and the discriminator that classifies real and fake images.

Convolutional Neural Network(CNN)

Convolutional Neural Networks are made up of neurons that have learnable weights and biases. Each neuron receives some inputs, performs a dot product and optionally follows it with a non-linearity.

How we goanna use CNN in GAN's?

  • Generator :- It uses De-CNN

  • Discriminator:- It uses CNN

CNN Basic Architecture

How CNN works

1st Step: Filtering/convolution

Step 2nd : Pooling

Step 3rd : Normalization/ReLU’s

Step 4th : Fully Connected Layer

Highest probability is the selected value.

Applications of GAN's

  • Text to Image generation
  • Style Transfer
  • Increasing Image Resolution
  • Image inpainting
  • Video generation
  • Face Swap
  • Image to Image Translation

Text to Image generation (Link)

Style Transfer

Style Transfer

Increasing Image Resolution (Link)

Image Inpainting (Link)

Face Swap

DiscoGAN's

And why they rock !!

DiscoGAN stands for

Learning to Discover Cross-Domain Relations with Generative Adversarial Networks (Link)

Image to Image Translation

(a) Translation of gender in Facescrub dataset and CelebA dataset

 (b) Blond to black and black to blond hair color conversion in CelebA dataset.

(c) Wearing eyeglasses conversion in CelebA dataset

DiscoGAN

After iteration: 11,000

Handbags -> Shoes -> Handbags

After iteration: 22000

Image -> Segmentation -> Image

Resources

  • Generative Adversarial Nets by Ian Goodfellow: Link
  • DeepLearning4J intro to GAN's: Link
  • Research Paper on DiscoGAN: Link
  • Official Implementation of DiscoGAN: Link
  • Another Implementation: Link
  • GAN's on MNIST dataset: Link

Thank You

AkulMehra

akul08

akul08

introduction to gans

By Akul Mehra

introduction to gans

  • 457