Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new...
Transcript of Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new...
![Page 1: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/1.jpg)
1© 2015 The MathWorks, Inc.
Developing Deep
Learning Algorithms
using MATLAB
David Willingham
![Page 2: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/2.jpg)
2
New MATLAB framework makes deep learning
easy and accessible
![Page 3: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/3.jpg)
3
Object Recognition using Deep Learning
Training
(using GPU)Millions of images from 1000 different categories
Prediction Real-time object recognition using a webcam connected to a
laptop
ACCESS
LEARN
INTEGRATE
![Page 4: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/4.jpg)
5
Cat
Dog
Bird
Car
Learned Features
…
CarDogCatBird
What is Deep Learning ?
Deep learning is a type of machine learning that learns tasks
directly from data
![Page 5: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/5.jpg)
6
Cat
Dog
Bird
Car
Learned Features
…
CarDogCatBird
TaskData
What is Deep Learning ?
![Page 6: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/6.jpg)
7
Why is Deep Learning So Popular Now?
Source: ILSVRC Top-5 Error on ImageNet
Human
Accuracy
![Page 7: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/7.jpg)
8
Deep Learning Enablers
Massive sets of labeled data
Acceleration with GPUs
Availability of state of the art models from experts
![Page 8: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/8.jpg)
9
MATLAB makes Deep Learning Easy and Accessible
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from experts
![Page 9: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/9.jpg)
10
Agenda
Image classification using pre-trained network
Transfer learning to classify new objects
Locate & classify objects in images and video
![Page 10: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/10.jpg)
11
Agenda
Image classification using pre-trained network
Transfer learning to classify new objects
Locate & classify objects in images and video
![Page 11: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/11.jpg)
12
Image Classification Using Pre-trained Network (Video)
![Page 12: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/12.jpg)
13
Convolutional Neural Networks
![Page 13: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/13.jpg)
15
Visualize Deep Learning Features
![Page 14: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/14.jpg)
16
Agenda
Image classification using pre-trained network
Locate & classify objects in images and video
Transfer learning to classify new objects
![Page 15: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/15.jpg)
17
Why Train a New Model ?
o Models from research do not work on your data
o Pre-trained model not available for your data type
o Improve results by creating a model specific to your problem
![Page 16: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/16.jpg)
18
Two Approaches for Deep Learning
2. Fine-tune a pre-trained model (transfer learning)
1. Train a Deep Neural Network from Scratch
![Page 17: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/17.jpg)
19
Why Perform Transfer Learning
Requires less data and training time
Reference models (like AlexNet, VGG-16, VGG-19) are great feature
extractors
Leverage best network types from top researchers
![Page 18: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/18.jpg)
20
Example: Classify Vehicles With Transfer Learning
New Data
Po
oli
ng
Co
nvo
luti
on
Ac
tiva
tio
n
…
Po
oli
ng
Co
nvo
luti
on
Ac
tiva
tio
n
Po
oli
ng
Co
nvo
luti
on
Ac
tiva
tio
n
Po
oli
ng
Co
nvo
luti
on
Ac
tiva
tio
n
Fu
lly
Co
nn
ec
ted
Layers
1000 Category
Classifier
5 Category
Classifier
AlexNet
AlexNet
car
suv
pickup
van
truck
![Page 19: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/19.jpg)
21
Transfer Learning to Classify New Objects
![Page 20: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/20.jpg)
22
New MATLAB framework makes deep learning
easy and accessible
![Page 21: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/21.jpg)
23
MATLAB makes Deep Learning Easy and Accessible
imageDS = imageDatastore(dir)
Easily manage large sets of images
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from experts
![Page 22: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/22.jpg)
24
MATLAB makes Deep Learning Easy and Accessible
Acceleration with Multiple GPUs
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from experts
Training modes supported:
Auto Select
GPU
Multi GPU (local)
Multi GPU (cluster)
![Page 23: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/23.jpg)
25
MATLAB makes Deep Learning Easy and Accessible
Feature Visualization
Training Accuracy Plot
Network ActivationsDeep Dream
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from experts
![Page 24: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/24.jpg)
26
MATLAB makes Deep Learning Easy and Accessible
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from expertsCurated Set of Pretrained Models
Access Models with 1-line of MATLAB CodeNet1 = alexnet
Net2 = vgg16
Net3 = vgg19
![Page 25: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/25.jpg)
27
Regression Support for Deep Learning
Classification vs. Regression
Classification – outputs categories/labels
Regression – outputs numbers
Supported by new regression layer:routputlayer = regressionLayer('Name','routput')
Example predict facial key-points:
![Page 26: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/26.jpg)
28
Agenda
Image classification using pre-trained network
Transfer learning to classify new objects
Locate & classify objects in images and video
![Page 27: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/27.jpg)
29
Is Object Recognition/Classification Enough ?
Car Label for entire image
Car ? SUV? Truck?
![Page 28: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/28.jpg)
30
Object Detection – Locate and Classify Object
TRUCK
SUV
CAR
![Page 29: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/29.jpg)
31
Goal: Create Object Detector to Locate Vehicles
Step 1: Label / Crop data
Step 2: Train detector
Step 3: Use detector
![Page 30: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/30.jpg)
32
Video: Object Detection using Faster R-CNN
![Page 31: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/31.jpg)
33
Label Images with MATLAB
![Page 32: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/32.jpg)
34
Labeling Videos with MATLAB
![Page 33: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/33.jpg)
35
New MATLAB framework makes deep learning
easy and accessible
![Page 34: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/34.jpg)
36
MATLAB makes Deep Learning Easy and Accessible
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from experts
Image Labeler
Video Labeler
![Page 35: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/35.jpg)
39
Object Detection Frameworks in MATLAB
Machine Learning
1. Cascade Object Detector
2. Aggregate Channel Features (ACF)
Deep Learning
1. R-CNN
2. Fast R-CNN
3. Faster R-CNN
Same labels , train any detector.
![Page 36: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/36.jpg)
40
MATLAB makes Deep Learning Easy and Accessible
Learn about new MATLAB capabilities to
Handle and label large sets of images
Accelerate deep learning with GPUs
Visualize and debug deep neural networks
Access and use models from experts
![Page 37: Developing Deep using MATLAB · 26 MATLAB makes Deep Learning Easy and Accessible Learn about new MATLAB capabilities to Handle and label large sets of images Accelerate deep learning](https://reader030.fdocuments.net/reader030/viewer/2022040909/5e8139b8f15dd126c6660980/html5/thumbnails/37.jpg)
41
Thank You