You are on page 1of 12

BLDEA’s V. P. Dr. P. G.

Halakatti
College of Engineering and Technology,
Vijayapur.

Dept of Computer Science and Engineering

AIML Assignment on:

GENERATIVE ADVERSARIAL

NETWORKS
Presented by: Aishwarya .G. Biradar
Akanksha .A. Rudragoudar
INTRODUCTION

Generative Adversarial Networks, or GANs for short, are an approach to


generative modeling using deep learning methods. Generative modeling
is an unsupervised learning task in machine learning that involves
automatically discovering and learning the regularities or patterns in
input data
The technique have enabled to create realistic-looking but
entirely computer generated photos of people’s faces. They have
also allowed the creation of controversial “deepfake” videos.

GANs can be used to imitate any data distribution (image, text,


sound, etc.).
Why did we choose this Algorithm

1. The first and the best thing about GANs is their nature of learning they tend to follow
powerful unsupervised learning that is why GANs don’t need labeled data and it
makes GANs very powerful and easy to understand as the boring work of labeling
and annotating the data is not required.

2. Reason for GANs being so popular is the power of adversarial training which tends
to produce much sharper and discrete outputs rather than blurry averages has led to
several applications of GANs such as super-resolution GANs.

3. This framework not only has the possibility of generating very high-quality synthetic
data but also it can be used to enhance pixels in photos, generate images from the
input
Add text, conversion of images
a title from
Add a one
titledomain to another, Add
change the appearance
a title
of the face image, and many more
Click here to add text Click here to add text Click here to add text
ALGORITHM
 GANs are made up of two neural networks, a discriminator and a generator.

 They use adversarial training to produce artificial data that is identical to actual data. The
Generator attempts to fool the Discriminator, which is tasked with accurately
distinguishing between produced and genuine data

Generative Adversarial Networks (GANs) can be broken down into three parts:

1. Generative: which describes how data is generated in terms of a probabilistic model.

2. Adversarial: The word adversarial refers to setting one thing up against another. This
means that, in the context of GANs, the generative result is compared with the actual images
in the data set. A mechanism known as a discriminator is used to apply a model that attempts
to distinguish between real and fake images.
3.Networks:Use deep neural networks as artificial intelligence (AI) algorithms for
training purposes.
Architecture of GAN

A Generative Adversarial Network (GAN) is composed of two primary parts, which are
the Generator and the Discriminator.

 Generator Model :

• A key element responsible for creating fresh, accurate data in a Generative Adversarial
Network (GAN) is the generator model

• The generator takes random noise as input and converts it into complex data samples,
such text or images. It is commonly depicted as a deep neural network.

• The generator’s ability to generate high-quality, varied samples that can fool the
discriminator is what makes it successful.
Generator Loss(JG )

 For generated samples, the generator minimizes the log likelihood that the
discriminator is right. Due to this loss, the generator is incentivized to generate samples
that the discriminator is likely to classify as real (logD(G(z i )) close to 1).

 Where, JG measure how well the generator is fooling the discriminator.log D(G(zi )
represents log probability of the discriminator being correct for generated samples.

 The generator aims to minimize this loss, encouraging the production of samples that
the discriminator classifies as real (log D(G(zi )) close to 1).
 Discriminator Model :

• An artificial neural network called a discriminator model is used in Generative


Adversarial Networks (GANs) to differentiate between generated and actual input.

• By evaluating input samples and allocating probability of authenticity, the


discriminator functions as a binary classifier.

• Over time, the discriminator learns to differentiate between genuine data from the
dataset and artificial samples created by the generator.

• Maximizing the discriminator’s capacity to accurately identify generated samples as


fraudulent and real samples as authentic is the aim of the adversarial training
procedure.
Discriminator Loss(JD )

 The discriminator reduces the negative log likelihood of correctly classifying both produced
and real samples. This loss incentivizes the discriminator to accurately categorize generated
samples as fake (log(1−D(G(zi)​)) close to 1) and real samples (log D(xi ) close to 1 ).

 JD assesses the discriminator’s ability to discern between produced and actual samples.The
log likelihood that the discriminator will accurately categorize real data is represented by
logD(xi ​).The log chance that the discriminator would correctly categorize generated
samples as fake is represented by log⁡(1-D(G(zi))).The discriminator aims to reduce this loss
by accurately identifying artificial and real samples.
MinMax Loss :

• In a Generative Adversarial Network (GAN), the minimax loss formula is provided by:

• Where, G is generator network and is D is the discriminator network . Actual data samples obtained from
the true data distribution Pdata(x) are represented by x.

• Random noise sampled from a previous distribution pz (z) (usually a normal or uniform distribution) is
represented by z.

• D(x) represents the discriminator’s likelihood of correctly identifying actual data as real.

• D(G(z)) is the likelihood that the discriminator will identify generated data coming from the generator as
authentic.
How does a GAN work? WORKING
MODEL
A Generative Adversarial Network (GAN) is
a framework made up of two neural networks
that have undergone simultaneous adversarial
training a discriminator and a generator.

The discriminator separates generated data from


real data, while the generator produces synthetic
data that attempts to imitate real data. Training
makes the generator more adept at producing realistic samples in
an effort to trick the discriminator, which strengthens the
generator’s discriminating abilities.

GANs are an effective tool for producing realistic, high-quality


outputs in a variety of fields, including text and image
generation.
APPLICATIONS

The model has learned a transformation to convert an


image of a zebra to a horse, a summer time image to the
winter counterpart and vice-versa.

Example, given “this flower has a lot of small


round pink petals” as input, it will generate an
image of a flower having round pink petals.

Super Resolution GAN (SRGAN) which


Can generate the super resolution images
From low resolution images with finer details
and better quality
Thank you

You might also like