Lecture 6 - Use Cases of CNN and Implementation
Lecture 6 - Use Cases of CNN and Implementation
Topics
Anatomy of a Input
neural network
1. Layers:
combined into a Hidden layers
model (containing
neurons/nodes)
2. Input Data and
corresponding
targets / labels
3. Optimizer:
determines how Predicted Actual
learning Output Output
proceeds
Official (Closed) - Non Sensitive
An Example (refer to
NN_Computation.xlsx
Input Layer 1 forLayer
details)
2 Output
Credit loan
ReLU Sigmoid/logistic
Age Loan approve = 1
Loan reject = 0
Prediction True Target
Y’ Y
Salary
0.5329 1.0
Loss Score
Education = Y- Y’
=0.4671
Forward Propagation
Official (Closed) - Non Sensitive
Input Data
Compile
Training
Evaluate
Official (Closed) - Non Sensitive
1. Introduction to CNN
https://www.youtube.com/watch?v=Gu0MkmynWkw
Official (Closed) - Non Sensitive
1. Introduction to CNN
The MNIST classification problem using CNN
Convolution
operation
Max-pooling
operation
Official (Closed) - Non Sensitive
Filter
weight
0 1 2
2 2 0
0 1 2
Source:
https://towardsdatascience.com/intuitively-understanding-convolutions-for-deep-learning-1f6f42faee1
Official (Closed) - Non Sensitive
Output (5, 5, 1)
Source:
https://towardsdatascience.com/intuitively-understanding-convolutions-for-deep-learning-1f6f42faee1
Official (Closed) - Non Sensitive
Output (2, 2, 1)
Source:
https://towardsdatascience.com/intuitively-understanding-convolutions-for-deep-learning-1f6f42faee1
Official (Closed) - Non Sensitive
(-2)+(-1)+(0)+0=-3
Input width =5
Padding = 1
Strides = 2
Source:
https://computersciencewiki.org/index.php/Max-pooling_/_Pooling
Official (Closed) - Non Sensitive
3.Adding dropout
pre-trained CNN
Our own classifier vs VGG16 classifer
Our own:
Cat & Dog classifier
(2 classes)
VGG model:
FC classifier
1000 classes
Official (Closed) - Non Sensitive
pre-trained CNN
Objective: use VGG16 model and train our own FC
classifier
Conv block 1 Conv block 2 Conv block 3 Conv block 4 Conv block 5
(frozen) (frozen) (frozen) (frozen) (frozen)
Going beyond
Sequential model
Xception CNN
Official (Closed) - Non Sensitive
Medical Diagnostics
1. Tumor detection, anomaly
detection
Official (Closed) - Non Sensitive
Autonomous Driving
https://arxiv.org/pdf/1910.07738
Official (Closed) - Non Sensitive
Autonomous Driving
Official (Closed) - Non Sensitive
Autonomous Driving
Official (Closed) - Non Sensitive
Video Analysis
1. Action recognition, video segmentation
Video analytics module - fight and weapon detection. Attendance Management System Using Face Recognition
https://www.youtube.com/watch?v=_zpHzxAQQ2o https://www.youtube.com/watch?v=EHgjYXWtaIs
3. Gradio
https://www.gradio.app/guides/quickstart
Official (Closed) - Non Sensitive
What is Gradio?
Open-source Python package that builds demo or
web application
Share what you built
Official (Closed) - Non Sensitive
Gradio
Gradio includes pre-built components that can be used as inputs
or outputs in your Interface with a single line of code.
Components include preprocessing steps that convert user data
submitted through browser to something that be can used by a
Python function, and postprocessing steps to convert values
returned by a Python function into something that can be
displayed in a browser.
Official (Closed) - Non Sensitive
Gradio
Official (Closed) - Non Sensitive
Wrapping up
We had a recap of what was
covered
Real life use cases
Building your own UI using
Gradio
Official (Closed) - Non Sensitive