SlideShare a Scribd company logo
Convolutional Neural Networks (CNN)
November 5, 2019
Amit Praseed Classification November 5, 2019 1 / 31
What do Neural Networks Learn?
Every input to a neural network is a feature.
The neural network outputs whether the data point corresponding to
the input features belongs to class A or B.
In simple terms, a neural network builds a mapping from a non linear
combination of inputs (features) to the outputs (class labels).
In the case of image recognition, the input is an image itself. Usually
every pixel is a separate input to the neural network.
The MLP learns a non linear combination of pixel values to predict a
class label.
Amit Praseed Classification November 5, 2019 2 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 3 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 4 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 5 / 31
Neural Networks and Image Recognition
MLPs perform poorly in recognizing images.
MLPs cannot learn spatial correlations between images.
Prone to overfitting due to an abnormally large number of inputs and
weights.
There is no concept of ”features” because each feature is a pixel value.
How do we specify features in an image?
Amit Praseed Classification November 5, 2019 6 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 7 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 8 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 9 / 31
Neural Networks and Image Recognition
Amit Praseed Classification November 5, 2019 10 / 31
Neural Networks and Image Recognition
It would be marvelous if the network could learn ”features” by itself...
which is what CNN does.
Amit Praseed Classification November 5, 2019 11 / 31
Basic Idea behind CNN
Amit Praseed Classification November 5, 2019 12 / 31
Filters and Convolutions
An image is basically a matrix of pixel values.
So it makes sense to define all operations on images in terms of oper-
ations of a matrix as well.
All operations such as smoothing, sharpening, blurring, edge detection
etc can be defined in terms of operations on a matrix.
For this, an operation is denoted by a smaller matrix called a filter.
The filter is moved over the image from left to right and top to bottom,
and the corresponding elements of the image and the filter are multi-
plied and added. The resultant value is the pixel value of the modified
image.
This operation is called as convolution.
Amit Praseed Classification November 5, 2019 13 / 31
Smoothing using Convolution
Amit Praseed Classification November 5, 2019 14 / 31
Smoothing using Convolution
Amit Praseed Classification November 5, 2019 15 / 31
Edge Detection using Convolution
Amit Praseed Classification November 5, 2019 16 / 31
Edge Detection using Convolution
Amit Praseed Classification November 5, 2019 17 / 31
Edge Detection using Convolution
Amit Praseed Classification November 5, 2019 18 / 31
Learning Low Level Features in CNN
The first step in a CNN is to learn the low level features such as edges
from the input image.
This is done using a Convolutional Layer.
For this, a filter is moved over the entire image as in the case of
convolution.
Are the filter weights static?
NO.
The filter weights are randomly initialized and the weights are updated
using backpropagation till the weights stabilize.
This means we have no idea which feature (horizontal edge, vertical
edge, slanting lines...) a particular filter learns to recognize.
A number of filters are used in a CNN, and each filter learns to recognize
a particular feature.
Each filter is said to output a Feature Map.
Amit Praseed Classification November 5, 2019 19 / 31
Peculiarities of the Convolutional Layer
Local Receptive Fields
Not fully connected as an MLP
Shared Weights
Learn to recognize a feature irrespective of its absolute location
Fewer parameters, hence less prone to overfitting
ReLu activation function
Amit Praseed Classification November 5, 2019 20 / 31
Convolutional Layer
Amit Praseed Classification November 5, 2019 21 / 31
Convolutional Layer
Amit Praseed Classification November 5, 2019 22 / 31
Convolutional Layer
Amit Praseed Classification November 5, 2019 23 / 31
Pooling
The convolutional layers recognize the presence of features in the im-
age.
However, the output of these layers also contain positional information
i.e. where these features were found.
Usually positional information acts as a burden in classification. We
want relative positional information of features, not where the absolute
position of a feature is.
The Pooling Layer removes positional information from the output of
the Convolutional Layers.
Amit Praseed Classification November 5, 2019 24 / 31
Max Pooling
Amit Praseed Classification November 5, 2019 25 / 31
That’s It!!!
A CNN is essentially comprised of multiple convolutional and pooling
layers one after the other.
Each successive layer recognizes more sophisticated features using low
level features detected by the previous layers.
Amit Praseed Classification November 5, 2019 26 / 31
CNN Architecture
Amit Praseed Classification November 5, 2019 27 / 31
A Note on the Output Layer
While all the other layers are only partially connected, the output layer
is fully connected.
The number of nodes in the output layer is usually equally to the
number of classes in the classification problem. For example, if you
want to classify cats, dogs, wolves and foxes, the output layer will have
four nodes.
The nodes in the output layer have a special activation function, called
Softmax Activation Function.
aL
j =
exL
j
k exL
k
Amit Praseed Classification November 5, 2019 28 / 31
Softmax Activation
Softmax Activation forms a probability distribution, and gives the prob-
ability that the given input belongs to class j.
Along with a new log likelihood cost function given by
C = −ln aL
j
the network can counter learning slowdown as well.
Amit Praseed Classification November 5, 2019 29 / 31
A Note on Overfitting
Even though CNN uses much fewer weights than MLP, it can still suffer
from overfitting.
Techniques to counter overfitting, such as regularization, validation,
acquiring new data etc. can still be used here.
Another technique usually used to reduce the effects of overfitting is
the use of Ensemble Classifiers.
Similar to Random Forests, we can use a number of neural networks
(CNN or MLP), train them separately and employ a majority voting to
decide the class during testing.
However, MLP or CNN need a lot more time to train and hence main-
taining multiple models is infeasible.
Rather, there is a technique that tries to use only one physical model,
but train multiple virtual models in it.
Amit Praseed Classification November 5, 2019 30 / 31
Dropout
The idea behind dropout is to
randomly disable or drop 50%
of the neurons during different
stages of training.
This is done so that the neu-
ral network as a whole becomes
more robust.
Virtually, we are training mul-
tiple neural networks for the
same input, which can help in
reducing overfitting.
Amit Praseed Classification November 5, 2019 31 / 31
How does CNN overcome the difficulties in training Deep
Networks?
Learning Slowdown → Softmax Activation function in the output layer
+ Log Likelihood Cost
Vanishing Gradient → ReLu Activation Function in convolutional layers
Overfitting → Shared Weights and Biases, Regularization, Dropout
Amit Praseed Classification November 5, 2019 32 / 31

More Related Content

Similar to Convolutional Neural Networks

IMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHES
IMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHESIMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHES
IMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHES
Vikash Kumar
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
amitpraseed
 
Movie Sentiment Analysis using Deep Learning RNN
Movie Sentiment Analysis using Deep Learning RNNMovie Sentiment Analysis using Deep Learning RNN
Movie Sentiment Analysis using Deep Learning RNN
ijtsrd
 
Machine learning session 6
Machine learning   session 6Machine learning   session 6
Machine learning session 6
Luis Borbon
 
IRJET- Machine Learning based Object Identification System using Python
IRJET- Machine Learning based Object Identification System using PythonIRJET- Machine Learning based Object Identification System using Python
IRJET- Machine Learning based Object Identification System using Python
IRJET Journal
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
Kasun Chinthaka Piyarathna
 
Machine learning in science and industry — day 4
Machine learning in science and industry — day 4Machine learning in science and industry — day 4
Machine learning in science and industry — day 4
arogozhnikov
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
Pierre de Lacaze
 
IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...
IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...
IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...
IRJET Journal
 
Dynamic routing between capsules - A brief presentation
Dynamic routing between capsules - A brief presentationDynamic routing between capsules - A brief presentation
Dynamic routing between capsules - A brief presentation
Romain Sabathé
 
IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...
IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...
IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...
IRJET Journal
 
Graph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media AnalyticsGraph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media Analytics
NYC Predictive Analytics
 
Review-image-segmentation-by-deep-learning
Review-image-segmentation-by-deep-learningReview-image-segmentation-by-deep-learning
Review-image-segmentation-by-deep-learning
Trong-An Bui
 
cnn ppt.pptx
cnn ppt.pptxcnn ppt.pptx
cnn ppt.pptx
rohithprabhas1
 
D05222528
D05222528D05222528
D05222528
IOSR-JEN
 
Dssg talk CNN intro
Dssg talk CNN introDssg talk CNN intro
Dssg talk CNN intro
Vincent Tatan
 
deep CNN vs conventional ML
deep CNN vs conventional MLdeep CNN vs conventional ML
deep CNN vs conventional ML
Chao Han chaohan@vt.edu
 
[Revised] Intro to CNN
[Revised] Intro to CNN[Revised] Intro to CNN
[Revised] Intro to CNN
Vincent Tatan
 
IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...
IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...
IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...
IRJET Journal
 

Similar to Convolutional Neural Networks (20)

IMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHES
IMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHESIMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHES
IMAGE CLASSIFICATION USING DIFFERENT CLASSICAL APPROACHES
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
 
Movie Sentiment Analysis using Deep Learning RNN
Movie Sentiment Analysis using Deep Learning RNNMovie Sentiment Analysis using Deep Learning RNN
Movie Sentiment Analysis using Deep Learning RNN
 
Machine learning session 6
Machine learning   session 6Machine learning   session 6
Machine learning session 6
 
IRJET- Machine Learning based Object Identification System using Python
IRJET- Machine Learning based Object Identification System using PythonIRJET- Machine Learning based Object Identification System using Python
IRJET- Machine Learning based Object Identification System using Python
 
DL.pdf
DL.pdfDL.pdf
DL.pdf
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
 
Machine learning in science and industry — day 4
Machine learning in science and industry — day 4Machine learning in science and industry — day 4
Machine learning in science and industry — day 4
 
Deep Learning
Deep LearningDeep Learning
Deep Learning
 
IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...
IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...
IRJET- Segmentation of Nucleus and Cytoplasm from Unit Papanicolaou Smear Ima...
 
Dynamic routing between capsules - A brief presentation
Dynamic routing between capsules - A brief presentationDynamic routing between capsules - A brief presentation
Dynamic routing between capsules - A brief presentation
 
IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...
IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...
IRJET-Multiclass Classification Method Based On Deep Learning For Leaf Identi...
 
Graph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media AnalyticsGraph Based Machine Learning with Applications to Media Analytics
Graph Based Machine Learning with Applications to Media Analytics
 
Review-image-segmentation-by-deep-learning
Review-image-segmentation-by-deep-learningReview-image-segmentation-by-deep-learning
Review-image-segmentation-by-deep-learning
 
cnn ppt.pptx
cnn ppt.pptxcnn ppt.pptx
cnn ppt.pptx
 
D05222528
D05222528D05222528
D05222528
 
Dssg talk CNN intro
Dssg talk CNN introDssg talk CNN intro
Dssg talk CNN intro
 
deep CNN vs conventional ML
deep CNN vs conventional MLdeep CNN vs conventional ML
deep CNN vs conventional ML
 
[Revised] Intro to CNN
[Revised] Intro to CNN[Revised] Intro to CNN
[Revised] Intro to CNN
 
IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...
IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...
IRJET- Deep Convolutional Neural Network for Natural Image Matting using Init...
 

More from amitpraseed

Decision Trees
Decision TreesDecision Trees
Decision Trees
amitpraseed
 
Support Vector Machines (SVM)
Support Vector Machines (SVM)Support Vector Machines (SVM)
Support Vector Machines (SVM)
amitpraseed
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component Analysis
amitpraseed
 
Perceptron Learning
Perceptron LearningPerceptron Learning
Perceptron Learning
amitpraseed
 
Introduction to Classification
Introduction to ClassificationIntroduction to Classification
Introduction to Classification
amitpraseed
 
Bayesianclassifiers
BayesianclassifiersBayesianclassifiers
Bayesianclassifiers
amitpraseed
 

More from amitpraseed (6)

Decision Trees
Decision TreesDecision Trees
Decision Trees
 
Support Vector Machines (SVM)
Support Vector Machines (SVM)Support Vector Machines (SVM)
Support Vector Machines (SVM)
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component Analysis
 
Perceptron Learning
Perceptron LearningPerceptron Learning
Perceptron Learning
 
Introduction to Classification
Introduction to ClassificationIntroduction to Classification
Introduction to Classification
 
Bayesianclassifiers
BayesianclassifiersBayesianclassifiers
Bayesianclassifiers
 

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 

Convolutional Neural Networks

  • 1. Convolutional Neural Networks (CNN) November 5, 2019 Amit Praseed Classification November 5, 2019 1 / 31
  • 2. What do Neural Networks Learn? Every input to a neural network is a feature. The neural network outputs whether the data point corresponding to the input features belongs to class A or B. In simple terms, a neural network builds a mapping from a non linear combination of inputs (features) to the outputs (class labels). In the case of image recognition, the input is an image itself. Usually every pixel is a separate input to the neural network. The MLP learns a non linear combination of pixel values to predict a class label. Amit Praseed Classification November 5, 2019 2 / 31
  • 3. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 3 / 31
  • 4. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 4 / 31
  • 5. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 5 / 31
  • 6. Neural Networks and Image Recognition MLPs perform poorly in recognizing images. MLPs cannot learn spatial correlations between images. Prone to overfitting due to an abnormally large number of inputs and weights. There is no concept of ”features” because each feature is a pixel value. How do we specify features in an image? Amit Praseed Classification November 5, 2019 6 / 31
  • 7. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 7 / 31
  • 8. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 8 / 31
  • 9. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 9 / 31
  • 10. Neural Networks and Image Recognition Amit Praseed Classification November 5, 2019 10 / 31
  • 11. Neural Networks and Image Recognition It would be marvelous if the network could learn ”features” by itself... which is what CNN does. Amit Praseed Classification November 5, 2019 11 / 31
  • 12. Basic Idea behind CNN Amit Praseed Classification November 5, 2019 12 / 31
  • 13. Filters and Convolutions An image is basically a matrix of pixel values. So it makes sense to define all operations on images in terms of oper- ations of a matrix as well. All operations such as smoothing, sharpening, blurring, edge detection etc can be defined in terms of operations on a matrix. For this, an operation is denoted by a smaller matrix called a filter. The filter is moved over the image from left to right and top to bottom, and the corresponding elements of the image and the filter are multi- plied and added. The resultant value is the pixel value of the modified image. This operation is called as convolution. Amit Praseed Classification November 5, 2019 13 / 31
  • 14. Smoothing using Convolution Amit Praseed Classification November 5, 2019 14 / 31
  • 15. Smoothing using Convolution Amit Praseed Classification November 5, 2019 15 / 31
  • 16. Edge Detection using Convolution Amit Praseed Classification November 5, 2019 16 / 31
  • 17. Edge Detection using Convolution Amit Praseed Classification November 5, 2019 17 / 31
  • 18. Edge Detection using Convolution Amit Praseed Classification November 5, 2019 18 / 31
  • 19. Learning Low Level Features in CNN The first step in a CNN is to learn the low level features such as edges from the input image. This is done using a Convolutional Layer. For this, a filter is moved over the entire image as in the case of convolution. Are the filter weights static? NO. The filter weights are randomly initialized and the weights are updated using backpropagation till the weights stabilize. This means we have no idea which feature (horizontal edge, vertical edge, slanting lines...) a particular filter learns to recognize. A number of filters are used in a CNN, and each filter learns to recognize a particular feature. Each filter is said to output a Feature Map. Amit Praseed Classification November 5, 2019 19 / 31
  • 20. Peculiarities of the Convolutional Layer Local Receptive Fields Not fully connected as an MLP Shared Weights Learn to recognize a feature irrespective of its absolute location Fewer parameters, hence less prone to overfitting ReLu activation function Amit Praseed Classification November 5, 2019 20 / 31
  • 21. Convolutional Layer Amit Praseed Classification November 5, 2019 21 / 31
  • 22. Convolutional Layer Amit Praseed Classification November 5, 2019 22 / 31
  • 23. Convolutional Layer Amit Praseed Classification November 5, 2019 23 / 31
  • 24. Pooling The convolutional layers recognize the presence of features in the im- age. However, the output of these layers also contain positional information i.e. where these features were found. Usually positional information acts as a burden in classification. We want relative positional information of features, not where the absolute position of a feature is. The Pooling Layer removes positional information from the output of the Convolutional Layers. Amit Praseed Classification November 5, 2019 24 / 31
  • 25. Max Pooling Amit Praseed Classification November 5, 2019 25 / 31
  • 26. That’s It!!! A CNN is essentially comprised of multiple convolutional and pooling layers one after the other. Each successive layer recognizes more sophisticated features using low level features detected by the previous layers. Amit Praseed Classification November 5, 2019 26 / 31
  • 27. CNN Architecture Amit Praseed Classification November 5, 2019 27 / 31
  • 28. A Note on the Output Layer While all the other layers are only partially connected, the output layer is fully connected. The number of nodes in the output layer is usually equally to the number of classes in the classification problem. For example, if you want to classify cats, dogs, wolves and foxes, the output layer will have four nodes. The nodes in the output layer have a special activation function, called Softmax Activation Function. aL j = exL j k exL k Amit Praseed Classification November 5, 2019 28 / 31
  • 29. Softmax Activation Softmax Activation forms a probability distribution, and gives the prob- ability that the given input belongs to class j. Along with a new log likelihood cost function given by C = −ln aL j the network can counter learning slowdown as well. Amit Praseed Classification November 5, 2019 29 / 31
  • 30. A Note on Overfitting Even though CNN uses much fewer weights than MLP, it can still suffer from overfitting. Techniques to counter overfitting, such as regularization, validation, acquiring new data etc. can still be used here. Another technique usually used to reduce the effects of overfitting is the use of Ensemble Classifiers. Similar to Random Forests, we can use a number of neural networks (CNN or MLP), train them separately and employ a majority voting to decide the class during testing. However, MLP or CNN need a lot more time to train and hence main- taining multiple models is infeasible. Rather, there is a technique that tries to use only one physical model, but train multiple virtual models in it. Amit Praseed Classification November 5, 2019 30 / 31
  • 31. Dropout The idea behind dropout is to randomly disable or drop 50% of the neurons during different stages of training. This is done so that the neu- ral network as a whole becomes more robust. Virtually, we are training mul- tiple neural networks for the same input, which can help in reducing overfitting. Amit Praseed Classification November 5, 2019 31 / 31
  • 32. How does CNN overcome the difficulties in training Deep Networks? Learning Slowdown → Softmax Activation function in the output layer + Log Likelihood Cost Vanishing Gradient → ReLu Activation Function in convolutional layers Overfitting → Shared Weights and Biases, Regularization, Dropout Amit Praseed Classification November 5, 2019 32 / 31