0% found this document useful (0 votes)
5 views14 pages

Unit IV

The document provides an overview of Generative Adversarial Networks (GANs), detailing their structure, training process, and various applications such as image synthesis, anomaly detection, and data augmentation. It explains the roles of the generator and discriminator in the GAN framework, as well as the training steps for both components. Additionally, it highlights the use of artificial neural networks in fields like social media, marketing, healthcare, and personal assistants.

Uploaded by

sac1234999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views14 pages

Unit IV

The document provides an overview of Generative Adversarial Networks (GANs), detailing their structure, training process, and various applications such as image synthesis, anomaly detection, and data augmentation. It explains the roles of the generator and discriminator in the GAN framework, as well as the training steps for both components. Additionally, it highlights the use of artificial neural networks in fields like social media, marketing, healthcare, and personal assistants.

Uploaded by

sac1234999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Unit IV

• Basics of generative adversial networks (GANs), GAN training,


Synthesizing and manipulating images with GANs., Applications of
neural networks

1
Basics of generative adversial
networks (GANs)
• GANs is an approach for generative modeling using deep learning methods
such as CNN (Convolutional Neural Network). Generative modeling is an
unsupervised learning approach that involves automatically discovering and
learning patterns in input data such that the model can be used to generate
new examples from the original dataset.
• GANs is a way of training a generative model by framing problem as a
supervised learning problem with two sub-models. There are two
components of GANs:
• Generator: It is trained to generate new dataset, for example in computer vision it
generates new images from existing real world images.
• Discriminator: It compares those images with some real world examples and classify
real and fake images.
2
3
GAN training
Step 1- Training of Discriminator
• Firstly some random noise signal is sent to a generator which creates some useless images
containing noise.
• Two inputs are given to Discriminator. First is the sample output images generated from
Generator and second being the real world dog image samples.
• There after, The Discriminator populates some values (probability) after comparing both the
images which can be seen in fig. 2. It calculates 0.8, 0.3 and 0.5 for generator output images
and 0.1, 0.9 and 0.2 for the real world images.
• Now, an error is calculated by comparing probabilities of generated images with 0 (Zero) and
comparing probabilities of real-word images with 1 (One). (Ex. 0-0.8, 0-0.3, 0-0.5 and 1-0.1, 1-
0.9, 1-0.2).
• After calculating individual errors, it will calculate cumulative error(loss) which is
backpropagated and the weights of the Discriminator are adjusted. This is how a Discriminator
is trained.
4
5
Step 2 – Training of Generator:
• As previously in step 1, the loss is back propagated to discriminator to adjust its
weights. Now we also need to back propagate an error to the Generator so that
it can adjust its weights as well and train itself to generate improved images.
• Now, the images generated from the Generator are used as input to the
generator itself instead of random noise.
• The newly generated images from the generator will now be an input to the
Discriminator which again calculates probabilities like 0.5, 0.1 and 0.2. (See fig.
2)
• Now, an error will be calculated by comparing probabilities of generated
images with 1(One).
• After calculating individual errors, it will calculate cumulative error(loss) which
is back propagated and the weights of Generator are adjusted. This is how
Generator is trained.
6
7
Use Cases of Generative Adversarial
Networks
• Image synthesis: Generating new, realistic images from a given data distribution, such as faces,
landscapes, or animals.
• Text-to-Image synthesis: Generating images from text descriptions, such as scene descriptions, object
descriptions, or attributes.
• Image-to-Image translation: Translating images from one domain to another, such as converting
grayscale images to color, changing the season of a scene, or transforming sketches into photorealistic
images.
• Anomaly detection: Identifying anomalies or outliers in data, such as detecting fraud in financial
transactions, detecting network intrusions, or identifying medical conditions in medical imaging.
• Data augmentation: Increasing the size and diversity of a dataset for training deep learning models,
such as in computer vision, speech recognition, or natural language processing.
• Video synthesis: Generating new, realistic video sequences from a given data distribution, such as
human action sequences, animal behaviors, or animated sequences.
• Music synthesis: Generating new, original music from a given data distribution, such as musical genres,
styles, or instrumentations.
8
• Security: Artificial intelligence has proved to be a boon to many
industries but it is also surrounded by the problem of Cyber threats.GANs
are proved to be a great help to handle adversarial attacks. The
adversarial attacks use a variety of techniques to fool deep learning
architectures. By creating fake examples and training the model to
identify them we counter these attacks.
• Generating Data using GANs: Data is the most important key for any deep
learning algorithm. In general, the more is the data, the better is the
performance of any deep learning algorithm. But in many cases such as
health diagnostics, the amount of data is restricted, in such cases, there
is a need to generate good quality data. For which GANs are being used.
9
• Privacy-Preserving: There are many cases when our data needs to be kept
confidential. This is especially useful in defense and military applications. We
have many data encryption schemes but each has its own limitations, in such
a case GANs can be useful. Recently, in 2016, Google opened a new research
path on using GAN competitive framework for encryption problems, where
two networks had to compete in creating the code and cracking it.
• Data Manipulation: We can use GANs for pseudo style transfer i.e. modifying
a part of the subject, without complete style transfer. For e.g. in many
applications, we want to add a smile to an image, or just work on the eyes
part of the image. This can also be extended to other domains such as Natural
Language Processing, speech processing, etc. For e.g. we can work on some
selected words of a paragraph without modifying the whole paragraph.
10
Applications of GAN
• Generating Images
• Super Resolution
• Image Modification
• Photo realistic images
• Face Ageing

11
Applications of Artificial Neural
Networks
• Social Media: Artificial Neural Networks are used heavily in Social Media. For example, let’s take
the ‘People you may know’ feature on Facebook that suggests people that you might know in
real life so that you can send them friend requests. Well, this magical effect is achieved by using
Artificial Neural Networks that analyze your profile, your interests, your current friends, and also
their friends and various other factors to calculate the people you might potentially know.
Another common application of Machine Learning in social media is facial recognition . This is
done by finding around 100 reference points on the person’s face and then matching them with
those already available in the database using convolutional neural networks.
• Marketing and Sales: When you log onto E-commerce sites like Amazon and Flipkart, they will
recommend your products to buy based on your previous browsing history. Similarly, suppose
you love Pasta, then Zomato, Swiggy, etc. will show you restaurant recommendations based on
your tastes and previous order history. This is true across all new-age marketing segments like
Book sites, Movie services, Hospitality sites, etc. and it is done by implementing personalized
marketing . This uses Artificial Neural Networks to identify the customer likes, dislikes, previous
shopping history, etc., and then tailor the marketing campaigns accordingly.

12
• Healthcare : Artificial Neural Networks are used in Oncology to train algorithms that can
identify cancerous tissue at the microscopic level at the same accuracy as trained
physicians. Various rare diseases may manifest in physical characteristics and can be
identified in their premature stages by using Facial Analysis on the patient photos. So
the full-scale implementation of Artificial Neural Networks in the healthcare
environment can only enhance the diagnostic abilities of medical experts and ultimately
lead to the overall improvement in the quality of medical care all over the world.
• Personal Assistants: I am sure you all have heard of Siri, Alexa, Cortana, etc., and also
heard them based on the phones you have!!! These are personal assistants and an
example of speech recognition that uses Natural Language Processing to interact with
the users and formulate a response accordingly. Natural Language Processing uses
artificial neural networks that are made to handle many tasks of these personal
assistants such as managing the language syntax, semantics, correct speech, the
conversation that is going on, etc.
13
Assignment 4 (Due in the Next
Class)
• How would you apply GANs to generate realistic images of faces? Describe
the steps involved, including data preprocessing and model architecture.
• If you were tasked with using a GAN to generate synthetic product images
for an e-commerce platform, what steps would you take to ensure the
generated images are of high quality and realistic?
• Given a GAN model that is producing blurry images, analyze the possible
causes of this issue. What modifications or techniques could you apply to
improve image quality?
• Compare the advantages and disadvantages of using GANs for image
synthesis compared to traditional image generation methods (e.g., rule-
based or template-based generation).
14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy