Computer Vision: GANs (a non-mathematical intuitive introduction)

GANs are used to generate realistic images. A typical GAN model is made of two neural networks which compete (in a way) and hence the term ‘adversarial’. One is them is called Generator, and the other is Discriminator.

Rahul S
9 min readNov 29, 2022

--

GENERATIVE MODELS

A discriminative model learns features from the input data and uses the information about them to determine boundaries in observed data and use those (statistical boundaries) to make predictions like the kind of regression or classification. But a generative model uses the features learned from the training data to create more data out of the random noise supplied to it.

Credits: Janani Ravi

It does not require labels and hence is unsupervised.

The model is generative because the sample it creates is absolutely unique. The sample does not exist in the training data, but is very similar to it. Also, a generative model is probabilistic. The sample it creates is unique, but it is different for every input. In other words, a generative model incorporates a kind of randomness- which leads to new entities with different inputs.

A discriminative model, on the other hand, is deterministic. For the same input, its output is always the same.

Generative models are used for up-sampling an imbalanced dataset, missing value imputation, and anonymizing sensitive data- which is preferred over traditional masking because it reduces data leakage.

GENERATIVE ADVERSARIAL NETWORKS

GANs are used to generate realistic images. A typical GAN model is made of two neural networks which compete (in a way) and hence the term ‘adversarial’. One is called Generator, and the other is Discriminator. They are involved in a zero-sum game. When one network does better, the does worse. They cannot improve together. If one gets better, the other has to do worse. And both seek to be more accurate with each epoch.

--

--

Computer Vision: CNNs for Images. Why?

2 min read

Aug 17

Computer Vision with Neural Networks — an Overview

3 min read

Dec 9, 2022

Please explain “Non-Max Suppression” for us.

3 min read

Dec 5, 2022

Can you tell us something about ‘Global Average Pooling’?

3 min read

Nov 29, 2022

An Intuition of Neural Style Transfer

3 min read

Aug 11

Understanding Jaccard’s Index and Dice Coefficient in Object Detection and Image Segmentation

6 min read

Nov 22, 2022

Computer Vision: U-Net

5 min read

Nov 25, 2022

Computer Vision: Semantic Segmentation- An Intuition

8 min read

Nov 23, 2022

Computer Vision: Upsampling2D & Conv2DTranspose layers in TensorFlow

3 min read

Nov 23, 2022

Computer Vision: Convolutional Neural Networks (CNNs)

8 min read

Nov 21, 2022

Rahul S

I learn as I write | LLM, NLP, Statistics, ML