21
1 © 2015 The MathWorks, Inc. Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah

Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

  • Upload
    others

  • View
    6

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

1© 2015 The MathWorks, Inc.

Working with Large Sets of Images in MATLAB Just

Got Easier

Avi Nehemiah

Page 2: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

3

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

2. Can I find patterns or models to represent my image data?

3. How do I test and visualize my algorithm on many images?

4. What if my desktop or laptop doesn’t have enough computing power?

5. What if my data is too big to fit into memory?

Goal: Show you new functionality in MATLAB to augment existing workflows to

solve these challenges

Page 3: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

4

Problem : How to Recognize/Categorize Cars ?

Lightning Mater

Nigel SpareO

Page 4: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

5

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet

2. Can I find patterns or models to represent my image data?

3. How do I test and visualize my algorithm on many images?

4. What if my desktop or laptop doesn’t have enough computing power?

5. What if my data is too big to fit into memory?

Page 5: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

6

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet

2. Can I find patterns or models to represent my image data?

3. How do I test and visualize my algorithm on many images?

4. What if my desktop or laptop doesn’t have enough computing power?

5. What if my data is too big to fit into memory?

Page 6: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

7

Machine Learning

A machine learning algorithm takes examples of inputs and outputs associated

with a task and produces a program that can perform the task.

Hand

Written

Program

If brightness > 0.5

then ‘hat’

If edge_density < 4 and

major_axis > 5

then “boat”

‘boats’

‘mugs’

‘hats’

Machine

Learning

𝑚𝑜𝑑𝑒𝑙 = 𝑓𝑖𝑡𝑐svm (image_features, label)

‘boats’

‘mugs’

‘hats’

Computer

Vision

Page 7: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

8

Machine Learning Workflow Using Images

Training Data Feature

Extraction

Learning or

Modelling

Classifier / Model ‘Lightning’

Input Image Feature

ExtractionClassification

Page 8: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

9

Machine Learning Workflow Using Images

Training Data Feature

Extraction

Learning or

Modelling

Classifier / Model ‘Lightning’

Input Image Feature

ExtractionClassification

imageSet bagOfFeatures

bagOfFeatures

classificationLearner

Page 9: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

10

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

4. What if my desktop or laptop doesn’t have enough computing power?

5. What if my data is too big to fit into memory?

Page 10: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

11

Other Applications of Same Workflow

Detection and Location

Anomaly Detection/ Verification

‘yes’ ‘no’

‘pass’ ‘fail’

Page 11: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

12

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

4. What if my desktop or laptop doesn’t have enough computing power?

5. What if my data is too big to fit into memory?

Page 12: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

13

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

– Image Batch Processor App

4. What if my desktop or laptop doesn’t have enough computing power?

5. Can I acquire large sets of images using MATLAB ?

Page 13: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

14

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

– Image Batch Processor App

4. What if my desktop or laptop doesn’t have enough computing

power?

5. What if my data is too big to fit into memory?

Page 14: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

15

Parallel Computing Toolbox

Parallel Computing with MATLAB

MATLAB

MATLAB Distributed Computing Server

Page 15: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

16

Page 16: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

17

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

– Image Batch Processor App

4. What if my desktop or laptop doesn’t have enough computing

power?

– Parallel Computing Toolbox , MATLAB Distributed Computing Server

5. What if my data is too big to fit into memory?

Page 17: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

18

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

– Image Batch Processor App

4. What if my desktop or laptop doesn’t have enough computing power?

– Parallel Computing Toolbox , MATLAB Distributed Computing Server

5. What if my data is too big to fit into memory?

Page 18: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

19

Big Data Stored on Hadoop

On Your Workstation

• Access, explore, and analyze

out-of-memory data

• Prototype MapReduce based

algorithms

• Access portions of data sets

on HDFS

Connected to Hadoop

• Run algorithms on Hadoop

against data in HDFS

Production Hadoop

• Create applications or

components that

execute on Hadoop

Easily migrate programs from workstation to Hadoop

MATLAB Distributed

Computing Server

MATLAB Compiler

Page 19: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

20

Scaled Analysis

Explore

Prototype

Access Share/Deploy

ComplexityEmbarrassingly

Parallel

Non-Partitionable

MapReduce

Distributed Memory

SPMD

Load,

Analyze,

Discard

datastore, parfor

Scale

out-of-memory

in-memory

Page 20: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

21

Challenges Posed by Large Sets of Images

1. How do I import several thousand images into MATLAB?

– imageSet to manage large collections of images

2. Can I find patterns or models to represent my image data?

– Computer Vision System Toolbox, Statistics and Machine Learning Toolbox

3. How do I test and visualize my algorithm on many images?

– Image Batch Processor App

4. What if my desktop or laptop doesn’t have enough computing power?

– Parallel Computing Toolbox , MATLAB Distributed Computing Server

5. What if my data is too big to fit into memory?

– MapReduce, distributed arrays, SPMD, Hadoop

Page 21: Working with Large Sets of Images in MATLAB Just Got Easier · Working with Large Sets of Images in MATLAB Just Got Easier Avi Nehemiah. 3 ... How do I import several thousand images

22

Thank You !