deep learning : new tools for algorithm design and validation€¦ · transfer learning object...

27
1 © 2016 The MathWorks, Inc. Deep Learning New tools for algorithm design and validation MathWorks Automotive Conference 2017 Arvind Jayaraman

Upload: others

Post on 08-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

1© 2016 The MathWorks, Inc.

Deep Learning

New tools for algorithm design and validation

MathWorks Automotive Conference 2017

Arvind Jayaraman

Page 2: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

2

New MATLAB framework makes deep learning easy

and accessible

Page 3: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

3

What is Deep Learning ?

Deep learning is a type of machine learning that performs end-to-end learning by

learning tasks directly from images, text, and sound.

Deep Learning

DATA TASK

Page 4: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

4

Why is Deep Learning So Popular Now?

Source: ILSVRC Top-5 Error on ImageNet

Human

Accuracy

Page 5: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

5

Deep Learning Enablers

Massive sets of labeled data

Acceleration with GPU’s

Availability of state of the art models from experts

Page 6: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

6

Walkthrough 3 demos

Classification with pre-trained model

Transfer Learning Object Detection

Page 7: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

7

Two Approaches for Deep Learning

2. Fine-tune a pre-trained model (transfer learning)

1. Train a Deep Neural Network from Scratch

Page 8: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

8

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 9: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

9

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 10: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

10

Convolutional Neural Networks

Page 11: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

11

Demo 1

Classification with pre-trained model

Transfer Learning Object Detection

Page 12: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

12

Example: Classify Vehicles With Transfer Learning

New Data

Po

oli

ng

Co

nvo

luti

on

Acti

vati

on

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

La

ye

rs

1000 Category

Classifier

5 Category

Classifier

Vgg16

Vgg16

car

suv

pickup

van

truck

Page 13: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

13

Demo 2

Classification with a trained model

Transfer Learning Object Detection

Page 14: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

14

Is Object Recognition/Classification Enough ?

Car Label for entire image

Car ? SUV? Truck?

Page 15: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

15

Object Detection – Locate and Classify Object

TRUCK

SUV

CAR

Page 16: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

16

Goal: Create Object Detector to Locate Vehicles

Step 1: Label / Crop data

Step 2: Train detector

Step 3: Use detector

Page 17: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

17

Labeling Videos and Images with MATLAB

>> groundTruthLabeler

Page 18: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

18

Demo 3

Classification with pre-trained model

Transfer Learning Object Detection

Page 19: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

19

Regression Networks

Classification

predicts category

Object Detection

predicts box locations and box categories

Regression

predicts numbers

Page 20: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

20

Regression Network for Lane Detection

Image Input

Ego Vehicle Lane Boundaries

𝑎𝑥2 + 𝑏𝑥 + 𝑐

Network outputs [a, b, c]

Deep Conv Net

Page 21: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

21

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

▪ Gain insight with visualizations

▪ Access and use models from experts

Page 22: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

22

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 23: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

23

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 24: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

24

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 25: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

25

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 26: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

26

New MATLAB framework makes deep learning easy

and accessible

and

You can start using deep learning in your projects

Page 27: Deep Learning : new tools for algorithm design and validation€¦ · Transfer Learning Object Detection. 7 Two Approaches for Deep Learning 2. Fine-tune a pre-trained model (transfer

27

A good place to start learning