Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and...

46
1 © 2015 The MathWorks, Inc. Simplifying Image Processing and Computer Vision Application Development Elza John

Transcript of Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and...

Page 1: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

1© 2015 The MathWorks, Inc.

Simplifying Image Processing

and Computer Vision Application Development

Elza John

Page 2: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

2

Agenda

Deep learning for Computer Vision

Image processing on 3D data sets

Page 3: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

3

Deep Learning for Computer Vision

Page 4: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

4

New MATLAB framework makes deep learning easy

and accessible

Page 5: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

5

Deep Learning is a Subset of Machine Learning

Machine Learning

Deep Learning

Page 6: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

6

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 7: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

7

Why is Deep Learning So Popular Now?

Page 8: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

8

Deep Learning Enablers

Massive sets of labeled data

Acceleration with GPU’s

Availability of state of the art models from experts

Page 9: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

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 GPU’s

Visualize and debug deep neural networks

Access and use models from experts

Page 10: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

10

Image classification using pre-trained network

Transfer learning to classify new objects

Locate & classify objects in images and video

Page 11: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

11

Image classification using pre-trained network

Transfer learning to classify new objects

Locate & classify objects in images and video

Page 12: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

12

Convolutional Neural Networks

Convolution +

ReLU PoolingInput

Convolution +

ReLU Pooling

… …

Flatten Fully

ConnectedSoftmax

cartruck

bicycle

van

… …

Feature Learning Classification

Page 13: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

13

Image Classification Using Pre-trained Network (Video)

Page 14: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

14

Agenda

Image classification using pre-trained network

Locate & classify objects in images and video

Transfer learning to classify new objects

Page 15: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

15

Why should I train my own network?

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: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

16

Two Approaches for Deep Learning

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

1. Train a Deep Neural Network from Scratch

Page 17: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

17

Example: Classify Vehicles With Transfer Learning

AlexNet

Pretrained Model

1000 classes

Trained on millions of images

Vehicle

Classifier

( 5 Class)

Car

SUV

Van

Truck

Large Truck

Transfer learning – use AlexNet as

starting point

New Data

Page 18: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

18

Why Perform Transfer Learning

Requires less data and training time

Reference models (like AlexNet, VGG-16, VGG-19) have learned rich

feature representations for a wide range of images.

Leverage best network types from top researchers

Page 19: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

19

Transfer Learning to Classify New Objects

Page 20: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

20

Transfer Learning to Classify New Objects

Page 21: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

21

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 GPU’s

Visualize and debug deep neural networks

Access and use models from experts

Page 22: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

22

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 GPU’s

Visualize and debug deep neural networks

Access and use models from experts

Training modes supported:

Auto Select (CPU)

GPU

Multi GPU (local)

Multi GPU (cluster)

Page 23: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

23

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 GPU’s

Visualize and debug deep neural networks

Access and use models from experts

Page 24: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

24

MATLAB makes Deep Learning Easy and Accessible

Learn about new MATLAB capabilities to

Handle and label large sets of images

Accelerate deep learning with GPU’s

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: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

25

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: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

26

Image classification using pre-trained network

Transfer learning to classify new objects

Locate & classify objects in images and video

Page 27: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

27

Is Object Recognition/Classification Enough ?

Car Label for entire image

Car ? SUV? Truck?

Page 28: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

28

Object Detection – Locate and Classify Object

TRUCK

SUV

CAR

Page 29: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

29

Goal: Create Object Detector to Locate Vehicles

Step 1: Label / Crop data

Step 2: Train detector

Step 3: Use detector

Page 30: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

30

Label Images with MATLAB

Page 31: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

31

Labeling Videos with MATLAB

Page 32: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

32

MATLAB makes Deep Learning Easy and Accessible

Learn about new MATLAB capabilities to

Handle and label large sets of images

Accelerate deep learning with GPU’s

Visualize and debug deep neural networks

Access and use models from experts

Image Labeler

Video Labeler

Page 33: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

33

New MATLAB framework makes deep learning easy

and accessible

and

MATLAB can be used by experts for real deep

learning problems

Page 34: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

34

Deep Learning Object Detection Frameworks in MATLAB

Deep Learning R-CNN Fast R-CNN Faster R-CNN

Single Line of Code to Train Each Detector E.g. trainFasterRCNNObjectDetector

Page 35: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

35

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: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

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 GPU’s

Visualize and debug deep neural networks

Access and use models from experts

Page 37: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

37

3D Image Processing

Page 38: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

38

3-D Image Processing

Capabilities Includes:

Image arithmetic

Morphology

Segmentation

Geometric transforms

Enhancement

Volume Viewer App for exploration

Over 40 functions support 3-D volumetric image processing

Page 39: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

39

3-D Image Processing

Page 40: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

40

Flexible delivery options:

Public training available worldwide

Onsite training with standard or

customized courses

Web-based training with live, interactive

instructor-led courses

Self-paced interactive online training

More than 30 course offerings:

Introductory and intermediate training on MATLAB, Simulink,

Stateflow, code generation, and Polyspace products

Specialized courses in control design, signal processing, parallel computing, code generation,

communications, financial analysis,

and other areas

Email: [email protected]

Page 41: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

41

Image Processing with MATLABThis two-day course provides hands-on experience with performing image analysis. Examples

and exercises demonstrate the use of appropriate MATLAB® and Image Processing

Toolbox™ functionality throughout the analysis process.

Topics include:

Importing and exporting images

Analyzing images interactively

Removing noise

Aligning images and creating a panoramic scene

Detecting edges, lines, and circles in an image

Segmenting objects based on their color and texture

Modifying objects' shape using morphological operations

Measuring shape properties

Performing batch analysis over sets of images

Page 42: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

42

Computer Vision with MATLABThis one-day course provides hands-on experience with performing computer vision tasks.

Examples and exercises demonstrate the use of appropriate MATLAB® and Computer Vision

System Toolbox™ functionality

Topics include:

Importing, displaying and annotating images and videos

Detecting, extracting and matching object features

Automatically aligning images using geometric transformations

Detecting objects in images and videos

Tracking objects and estimating their motion in a video

Removing lens distortion from images

Measuring planar objects

Page 43: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

43

Accelerating and Parallelizing MATLAB Code This two-day course covers a variety of techniques for making your MATLAB® code run faster.

If you are working with long-running simulations, you will benefit from the hands-on

demonstrations and exercises in the course

Topics include:

Improving performance within core MATLAB

Generating MEX-files

Parallelizing computations

Offloading execution

Working with clusters

GPU computing

Page 44: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

44Email: [email protected] URL: http://www.mathworks.in/services/training Phone: 080-6632-6000

MathWorks Training

Upcoming Public Trainings Dates Location

Image Processing with MATLAB May 24 – 25 Bangalore

Computer Vision with MATLAB May 26 Bangalore

Machine Learning with MATLAB July 10 - 11 Hyderabad

Machine Learning with MATLAB Sept 26 - 27 Pune

Guaranteed to run

Page 45: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

45

Speaker Details

Email: [email protected]

Contact MathWorks India

Products/Training Enquiry Booth

Call: 080-6632-6000

Email: [email protected]

Your feedback is valued.

Please complete the feedback form provided to you.

Page 46: Simplifying Image Processing and Computer Vision ... - MATLAB · Simplifying Image Processing and Computer Vision Application Development ... and exercises demonstrate the use of

46

Thank You