SlideShare a Scribd company logo
Convolutional
Neural
Networks
Presented By: Ben Wycliff Mugalu
(Machine Learning Engineer)
An Introductory Lecture
Ben Wycliff Mugalu ben12wycliff@gmail.com
What is a CNN?
A convolutional neural network is a deep learning algorithm that takes in an
image, identifies the key features of the object in that image and assign
importance to distinguish it from other objects.
Input Image Output label
CNN
(Convolutional Neural Network)
Ben Wycliff Mugalu ben12wycliff@gmail.com
CNNs mimic the human visual perception and
cognition process
Humans classify (learn) objects by identifying their features.
Ben Wycliff Mugalu ben12wycliff@gmail.com
CNNs mimic the human visual perception and
cognition process
Ben Wycliff Mugalu ben12wycliff@gmail.com
Simple Facial Expression Classification
Sad
CNN
(Convolutional Neural
Network)
Happy
CNN
(Convolutional Neural
Network)
Ben Wycliff Mugalu ben12wycliff@gmail.com
How CNNs Learn
Max Pooling
STEP 2
Convolution and
ReLu activation
STEP 1
Flattening
STEP 3
Full Connection
STEP 4
Ben Wycliff Mugalu ben12wycliff@gmail.com
Images
Gray scale (Black and White) RGB (Colored Images)
3 channels
2D array
Pixel
0 ≤ pixel value ≤ 255
3D array
Ben Wycliff Mugalu ben12wycliff@gmail.com
7 X 7 sad face image representation
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Ben Wycliff Mugalu ben12wycliff@gmail.com
Convolution
Convolution is a mathematical way of combining two signals to form a
third signal.
g = f⊗h
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
0 0 0 0 0 0 0
0 0 1 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 1 1 1 0 0
0 1 0 0 0 1 0
0 0 0 0 0 0 0
Convolution
1 0 0
0 1 1
1 0 0
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
⊗ =
Image Kernel Feature Map
Ben Wycliff Mugalu ben12wycliff@gmail.com
ReLU layer
Convolutional Layer
F
e
a
t
u
r
e
m
a
p
s
Rectifier activation function
We use the rectifier activation function to
eliminate linearity since images in their
nature are not linear.
Ben Wycliff Mugalu ben12wycliff@gmail.com
Max Pooling
Max pooling reduces the size of the image by extracting the most
prominent features.
Reduces the computation power requirement (down samples pixels)
Improves the neural network ability to generalize on unseen data since it
filters out the most present features.
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
3
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
3 2
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
3 2 1
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
3 2 1
1
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
3 2 1
1 2
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
How Max Pooling Works
1 1 1 1 0
0 0 1 0 1
0 0 1 1 1
1 3 2 1 0
1 0 1 2 2
Feature Map
1 1 1
3 2 1
1 2 2
Pooled features
Max Pooling
Stride = 1
Kernel = 2✕2
Ben Wycliff Mugalu ben12wycliff@gmail.com
Flattening
Flattening is done to obtain a 1 dimensional vector to serve as an input to the
artificial neural network (fully connected layer).
Pooled
Feature
m
aps
ANN input layer
Max Pooling Layer
Ben Wycliff Mugalu ben12wycliff@gmail.com
Flattening
1 1 1
3 2 1
1 2 2
1
1
1
3
2
1
1
2
2
Flattening
Ben Wycliff Mugalu ben12wycliff@gmail.com
Fully Connected Layer
★ All inputs from one layer are
connected to every activation unit
★ Input layer receives flattened vector
★ Hidden layer performs non linear
transformations of the network inputs
★ The output layer translates the weights
into classes.
Ben Wycliff Mugalu ben12wycliff@gmail.com
Backwards Propagation
★ Several iterations (Epochs) are made while training the neural
network, an error rate is obtained for every iteration.
★ Backwards propagation is a method of fine-tuning the weights in the
neural network basing on the error rate obtained from the previous
epoch.
Ben Wycliff Mugalu ben12wycliff@gmail.com
Alternative to fully connected layer
★ Some methods use traditional classification algorithms such as
SVMs and Random Forest after feature extraction.
★ Tradition methods can yield better accuracy if the dataset is very
small.
★ With a sufficient dataset size, an end to end neural network will
certainly provide better performance and accuracy.
★ Transfer learning can also be employed to train a CNN with limited
data.
Ben Wycliff Mugalu ben12wycliff@gmail.com
Application of CNNs
★ Face recognition
★ Climate change monitoring
★ Disease diagnosis
★ Analysing documents
★ Object recognition and detection
★ Advertisements
Ben Wycliff Mugalu
Machine Learning Engineer
ben12wycliff@gmail.com
The End

More Related Content

Similar to CNNs.pdf

Deep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptxDeep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptx
Dr. Radhey Shyam
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
neural networks.pdf
neural networks.pdfneural networks.pdf
neural networks.pdf
Ben Wycliff Mugalu
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
AminHa5
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
EngineeringTamilan
 
Deep-Learning-Convolutional Neural Networks and Sequence Modeling.ppt
Deep-Learning-Convolutional Neural Networks and Sequence Modeling.pptDeep-Learning-Convolutional Neural Networks and Sequence Modeling.ppt
Deep-Learning-Convolutional Neural Networks and Sequence Modeling.ppt
PraveenVundrajavarap
 
Deep-Learning presnetation by someone from the internet
Deep-Learning presnetation by someone from the internetDeep-Learning presnetation by someone from the internet
Deep-Learning presnetation by someone from the internet
clash12hero
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
rohithprabhas1
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
sruthiksanalkumar
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
sghorai
 
Deep-Learning
Deep-LearningDeep-Learning
Deep-Learning
Amnaalia
 
Deep learning-smaller neural network
Deep learning-smaller neural networkDeep learning-smaller neural network
Deep learning-smaller neural network
sonykhan3
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
kundurti
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
AshishKumarSingh176
 
Deep Learning Techniques like CNN and RNN
Deep Learning Techniques like CNN and RNNDeep Learning Techniques like CNN and RNN
Deep Learning Techniques like CNN and RNN
SumaiyaSk
 
Deep learning-2017-lecture5 cnn
Deep learning-2017-lecture5 cnnDeep learning-2017-lecture5 cnn
Deep learning-2017-lecture5 cnn
AnandShinde47
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
SaadMemon23
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
archn4
 
convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdf
SubhamKumar3239
 
Illustrative Introductory CNN
Illustrative Introductory CNNIllustrative Introductory CNN
Illustrative Introductory CNN
YasutoTamura1
 

Similar to CNNs.pdf (20)

Deep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptxDeep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptx
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
 
neural networks.pdf
neural networks.pdfneural networks.pdf
neural networks.pdf
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning-Convolutional Neural Networks and Sequence Modeling.ppt
Deep-Learning-Convolutional Neural Networks and Sequence Modeling.pptDeep-Learning-Convolutional Neural Networks and Sequence Modeling.ppt
Deep-Learning-Convolutional Neural Networks and Sequence Modeling.ppt
 
Deep-Learning presnetation by someone from the internet
Deep-Learning presnetation by someone from the internetDeep-Learning presnetation by someone from the internet
Deep-Learning presnetation by someone from the internet
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning
Deep-LearningDeep-Learning
Deep-Learning
 
Deep learning-smaller neural network
Deep learning-smaller neural networkDeep learning-smaller neural network
Deep learning-smaller neural network
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep Learning Techniques like CNN and RNN
Deep Learning Techniques like CNN and RNNDeep Learning Techniques like CNN and RNN
Deep Learning Techniques like CNN and RNN
 
Deep learning-2017-lecture5 cnn
Deep learning-2017-lecture5 cnnDeep learning-2017-lecture5 cnn
Deep learning-2017-lecture5 cnn
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
Deep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.pptDeep-Learning-2017-Lecture5CNN.ppt
Deep-Learning-2017-Lecture5CNN.ppt
 
convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdf
 
Illustrative Introductory CNN
Illustrative Introductory CNNIllustrative Introductory CNN
Illustrative Introductory CNN
 

Recently uploaded

Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 

Recently uploaded (20)

Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 

CNNs.pdf

  • 1. Convolutional Neural Networks Presented By: Ben Wycliff Mugalu (Machine Learning Engineer) An Introductory Lecture
  • 2. Ben Wycliff Mugalu ben12wycliff@gmail.com What is a CNN? A convolutional neural network is a deep learning algorithm that takes in an image, identifies the key features of the object in that image and assign importance to distinguish it from other objects. Input Image Output label CNN (Convolutional Neural Network)
  • 3. Ben Wycliff Mugalu ben12wycliff@gmail.com CNNs mimic the human visual perception and cognition process Humans classify (learn) objects by identifying their features.
  • 4. Ben Wycliff Mugalu ben12wycliff@gmail.com CNNs mimic the human visual perception and cognition process
  • 5. Ben Wycliff Mugalu ben12wycliff@gmail.com Simple Facial Expression Classification Sad CNN (Convolutional Neural Network) Happy CNN (Convolutional Neural Network)
  • 6. Ben Wycliff Mugalu ben12wycliff@gmail.com How CNNs Learn Max Pooling STEP 2 Convolution and ReLu activation STEP 1 Flattening STEP 3 Full Connection STEP 4
  • 7. Ben Wycliff Mugalu ben12wycliff@gmail.com Images Gray scale (Black and White) RGB (Colored Images) 3 channels 2D array Pixel 0 ≤ pixel value ≤ 255 3D array
  • 8. Ben Wycliff Mugalu ben12wycliff@gmail.com 7 X 7 sad face image representation 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0
  • 9. Ben Wycliff Mugalu ben12wycliff@gmail.com Convolution Convolution is a mathematical way of combining two signals to form a third signal. g = f⊗h
  • 10. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 ⊗ = Image Kernel Feature Map
  • 11. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 ⊗ = Image Kernel Feature Map
  • 12. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 ⊗ = Image Kernel Feature Map
  • 13. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 ⊗ = Image Kernel Feature Map
  • 14. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 ⊗ = Image Kernel Feature Map
  • 15. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 ⊗ = Image Kernel Feature Map
  • 16. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 ⊗ = Image Kernel Feature Map
  • 17. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 ⊗ = Image Kernel Feature Map
  • 18. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 ⊗ = Image Kernel Feature Map
  • 19. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 ⊗ = Image Kernel Feature Map
  • 20. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 ⊗ = Image Kernel Feature Map
  • 21. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 ⊗ = Image Kernel Feature Map
  • 22. Ben Wycliff Mugalu ben12wycliff@gmail.com 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 Convolution 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 ⊗ = Image Kernel Feature Map
  • 23. Ben Wycliff Mugalu ben12wycliff@gmail.com ReLU layer Convolutional Layer F e a t u r e m a p s Rectifier activation function We use the rectifier activation function to eliminate linearity since images in their nature are not linear.
  • 24. Ben Wycliff Mugalu ben12wycliff@gmail.com Max Pooling Max pooling reduces the size of the image by extracting the most prominent features. Reduces the computation power requirement (down samples pixels) Improves the neural network ability to generalize on unseen data since it filters out the most present features.
  • 25. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 26. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 27. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 28. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 3 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 29. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 3 2 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 30. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 3 2 1 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 31. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 3 2 1 1 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 32. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 3 2 1 1 2 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 33. Ben Wycliff Mugalu ben12wycliff@gmail.com How Max Pooling Works 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1 3 2 1 0 1 0 1 2 2 Feature Map 1 1 1 3 2 1 1 2 2 Pooled features Max Pooling Stride = 1 Kernel = 2✕2
  • 34. Ben Wycliff Mugalu ben12wycliff@gmail.com Flattening Flattening is done to obtain a 1 dimensional vector to serve as an input to the artificial neural network (fully connected layer). Pooled Feature m aps ANN input layer Max Pooling Layer
  • 35. Ben Wycliff Mugalu ben12wycliff@gmail.com Flattening 1 1 1 3 2 1 1 2 2 1 1 1 3 2 1 1 2 2 Flattening
  • 36. Ben Wycliff Mugalu ben12wycliff@gmail.com Fully Connected Layer ★ All inputs from one layer are connected to every activation unit ★ Input layer receives flattened vector ★ Hidden layer performs non linear transformations of the network inputs ★ The output layer translates the weights into classes.
  • 37. Ben Wycliff Mugalu ben12wycliff@gmail.com Backwards Propagation ★ Several iterations (Epochs) are made while training the neural network, an error rate is obtained for every iteration. ★ Backwards propagation is a method of fine-tuning the weights in the neural network basing on the error rate obtained from the previous epoch.
  • 38. Ben Wycliff Mugalu ben12wycliff@gmail.com Alternative to fully connected layer ★ Some methods use traditional classification algorithms such as SVMs and Random Forest after feature extraction. ★ Tradition methods can yield better accuracy if the dataset is very small. ★ With a sufficient dataset size, an end to end neural network will certainly provide better performance and accuracy. ★ Transfer learning can also be employed to train a CNN with limited data.
  • 39. Ben Wycliff Mugalu ben12wycliff@gmail.com Application of CNNs ★ Face recognition ★ Climate change monitoring ★ Disease diagnosis ★ Analysing documents ★ Object recognition and detection ★ Advertisements
  • 40. Ben Wycliff Mugalu Machine Learning Engineer ben12wycliff@gmail.com The End