102
1 Digital Image Processing Lecture # 12 Machine Learning & CNN

Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

1

Digital Image Processing

Lecture # 12Machine Learning & CNN

Page 2: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

What is Machine Learning?

• Machine Learning– Study of algorithms that

– improve their performance

– at some task

– with experience

• Optimize a performance criterion using example data or past experience.

• Role of Statistics: Inference from a sample

• Role of Computer science: Efficient algorithms to– Solve the optimization problem

– Representing and evaluating the model for inference

Page 3: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

An Introduction to Machine Learning

• According to Herbert Simon, learning is, “Any changein a System that allows it to perform better thesecond time on repetition of the same task or onanother task drawn from the same population.” [G. F.Luger and W. A. Stubblefield, Artificial Intelligence:Structures and Strategies for Complex ProblemSolving, The Benjamin/Cummings PublishingCompany, Inc. 1989.]

Page 4: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

We will return to the previous slide in two minutes. In the meantime, we are going to play a quick game.

I am going to show you some classification problems which were shown to pigeons!

Let us see if you are as smart as a pigeon!

Page 5: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

Pigeon Problem 1

Page 6: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

8 1.5

4.5 7

What class is this object?

What about this one, A or B?

Pigeon Problem 1

Page 7: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

8 1.5

This is a B!Pigeon Problem 1

Here is the rule.If the left bar is smaller than the right bar, it is an A, otherwise it is a B.

Page 8: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

4 4

5 5

6 6

3 3

Examples of class B

5 2.5

2 5

5 3

2.5 3

8 1.5

7 7

Even I know this one

Pigeon Problem 2 Oh! This ones hard!

Page 9: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

4 4

5 5

6 6

3 3

Examples of class B

5 2.5

2 5

5 3

2.5 3

7 7

Pigeon Problem 2

So this one is an A.

The rule is as follows, if the two bars are equal sizes, it is an A. Otherwise it is a B.

Page 10: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

4 4

1 5

6 3

3 7

Examples of class B

5 6

7 5

4 8

7 7

6 6

Pigeon Problem 3

This one is really hard!What is this, A or B?

Page 11: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

4 4

1 5

6 3

3 7

Examples of class B

5 6

7 5

4 8

7 7

6 6

Pigeon Problem 3 It is a B!

The rule is as follows, if the sum of the two bars is less than or equal to 10, it is an A. Otherwise it is a B.

Page 12: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

Pigeon Problem 1

Here is the rule again.If the left bar is smaller than the right bar, it is an A, otherwise it is a B.

Left

Bar

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Right Bar

Page 13: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

4 4

5 5

6 6

3 3

Examples of class B

5 2.5

2 5

5 3

2.5 3

Pigeon Problem 2

Left

Bar

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Right Bar

Let me look it up… here it is.. the rule is, if the two bars are equal sizes, it is an A. Otherwise it is a B.

Page 14: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Examples of class A

4 4

1 5

6 3

3 7

Examples of class B

5 6

7 5

4 8

7 7

Pigeon Problem 3

Left

Bar

100

10 20 30 40 50 60 70 80 90 100

10

20

30

40

50

60

70

80

90

Right Bar

The rule again:if the square of the sum of the two bars is less than or equal to 100, it is an A. Otherwise it is a B.

Page 15: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

15

Why “Learn”?• Machine learning is programming computers to

optimize a performance criterion using example data or past experience.

• Learning is used when:– Human expertise does not exist (navigating on Mars),– Humans are unable to explain their expertise (speech

recognition)– Solution changes in time (routing on a computer

network)– Solution needs to be adapted to particular cases (user

biometrics)

Page 16: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

OLD VIEW OF ML:

Page 17: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 18: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

The machine learning pipeline

Page 19: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

19

ML Methods

• Supervised Learning

– Classification

– Regression/Prediction

• Unsupervised Learning

• Association Analysis

Page 20: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

x1

x2

Supervised Learning

We knew the correct answers

Page 21: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Predicting house prices

Page 22: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Sentiment analysis

Page 23: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Unsupervised Learning

x1

x2

We need to figure out the patterns

Page 24: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Document retrieval

Page 25: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Learning Associations

• Basket analysis:

P (Y | X ) probability that somebody who buys X also buys Y where X and Y are products/services.

Example: P ( bread |cold drink) = 0.7Market-Basket transactionsTID Items

1 Bread, Milk

2 Bread, Diaper, Cold Drink, Eggs

3 Milk, Diaper, Cold Drink

4 Bread, Milk, Diaper, Cold Drink

5 Bread, Milk, Diaper, Water

Page 26: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Product recommendation

Page 27: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Product recommendation

Page 28: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Visual Product recommender

Page 29: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Model Choice

– What type of classifier shall we use? How shall we select its parameters? Is there best classifier...?

– How do we train...? How do we adjust the parameters of the model (classifier) we picked so that the model fits the data?

Page 30: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Features

• Features: a set of variables believed to carry discriminating and characterizing information about the objects under consideration

• Feature vector: A collection of d features, ordered in some meaningful way into a d- dimensional column vector, that represents the signature of the object to be identified.

• Feature space: The d-dimensional space in which the feature vectors lie. A d-dimensional vector in a d-dimensional space constitutes a point in that space.

Page 31: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Features

Feature space (3D)

Page 32: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Features

• Feature Choice

– Good Features

• Ideally, for a given group of patterns coming from the same class, feature values should all be similar

• For patterns coming from different classes, the feature values should be different.

– Bad Features

• irrelevant, noisy, outlier?

Page 33: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Features

“Good” features “Bad” features

Linear separability Non-linear separability Highly correlated features Multi-modal

Page 34: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Training a classifier= Learning the weights

Page 35: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Classification error & accuracy

• Error measures fraction of mistakes

-Best possible value is 0.0• Often, measure accuracy-Fraction of correct predictions

• -Best possible value is 1.0

Page 36: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Type of mistakes

Page 37: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

A Classification ProblemExample

Page 38: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Grasshoppers

Katydids

Given a collection of annotated data. In this case 5 instances of Katydids and five of Grasshoppers, decide what type of insect the unlabeled example is.

Katydid or Grasshopper?

Page 39: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Thorax

Length

Abdomen

Length Antennae

Length

Mandible

Size

SpiracleDiameter

Leg Length

For any domain of interest, we can measure features

Color {Green, Brown, Gray, Other} Has Wings?

Page 40: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Insect ID

Abdomen Length

Antennae Length

Insect Class

1 2.7 5.5 Grasshopper

2 8.0 9.1 Katydid

3 0.9 4.7 Grasshopper

4 1.1 3.1 Grasshopper

5 5.4 8.5 Katydid

6 2.9 1.9 Grasshopper

7 6.1 6.6 Katydid

8 0.5 1.0 Grasshopper

9 8.3 6.6 Katydid

10 8.1 4.7 Katydids

11 5.1 7.0 ???????

We can store features

in a database.

My_Collection

The classification

problem can now be

expressed as:

• Given a training database

(My_Collection), predict the class

label of a previously unseen instance

previously unseen instance =

Page 41: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

An

ten

na

Len

gth

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Grasshoppers Katydids

Abdomen Length

Page 42: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

An

ten

na

Len

gth

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Grasshoppers Katydids

Abdomen Length

Page 43: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

An

ten

na

Len

gth

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Abdomen Length

KatydidsGrasshoppers

• We can “project” the previously

unseen instance into the same space

as the database.

• We have now abstracted away the

details of our particular problem. It

will be much easier to talk about

points in space.

11 5.1 7.0 ???????previously unseen instance =

Page 44: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Simple Linear Classifier

If previously unseen instance above the line

then

class is Katydid

else

class is Grasshopper

KatydidsGrasshoppers

R.A. Fisher1890-1962

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Page 45: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

10

1 2 3 4 5 6 7 8 9 10

123456789

100

10 20 30 40 50 60 70 80 90 100

10

20

30

40

50

60

70

80

90

10

1 2 3 4 5 6 7 8 9 10

123456789

Which of the “Pigeon Problems” can be solved by the

Simple Linear Classifier?

1) Perfect

2) Useless

3) Pretty Good

Problems that can be solved by a linear classifier are call linearly separable.

Page 46: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Nearest Neighbor Classifier

If the nearest instance to the previously unseen instance is a Katydid

class is Katydidelse

class is Grasshopper

KatydidsGrasshoppers

An

ten

na

Le

ngt

h

10

1 2 3 4 5 6 7 8 9 10

1

2

3

4

5

6

7

8

9

Abdomen Length

Page 47: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Artificial Neural Network -Perceptron

Page 48: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Input signals sent

from other neurons

If enough sufficient

signals

accumulate, the

neuron fires a

signal.

Connection strengths

determine how the

signals are accumulated

Page 49: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

A (Linear) Decision Boundary

Represented by:

One artificial

neuron

called a

“Perceptron”

-------------------------

-

Low space

complexity

Low time

Page 50: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Perceptron

Page 51: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Perceptron

Page 52: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Multilayer Neural Network

Page 53: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

53

Convolutional Neural Network

Page 54: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 55: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 56: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Fei-Fei Li & Andrej Karpathy & Justin Johnson

Preview [From recent Yann

LeCun slides]

Page 57: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet classification with deep

convolutional neural networks." Advances in Neural Information Processing Systems. 2012

ImageNet Large Scale Visual Recognition Challenge, 2012

Page 58: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 59: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 60: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 61: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 62: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 63: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 64: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 65: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 66: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 67: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Convolution layer

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

1 -1 -1

-1 1 -1

-1 -1 1

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

-1 -1 1

-1 1 -1

1 -1 -1

1 -1 1

-1 1 -1

1 -1 1

0.33 -0.55 0.11 -0.11 0.11 -0.55 0.33

-0.55 0.55 -0.55 0.33 -0.55 0.55 -0.55

0.11 -0.55 0.55 -0.77 0.55 -0.55 0.11

-0.11 0.33 -0.77 1.00 -0.77 0.33 -0.11

0.11 -0.55 0.55 -0.77 0.55 -0.55 0.11

-0.55 0.55 -0.55 0.33 -0.55 0.55 -0.55

0.33 -0.55 0.11 -0.11 0.11 -0.55 0.33

-1 -1 -1 -1 -1 -1 -1 -1 -1

-1 1 -1 -1 -1 -1 -1 1 -1

-1 -1 1 -1 -1 -1 1 -1 -1

-1 -1 -1 1 -1 1 -1 -1 -1

-1 -1 -1 -1 1 -1 -1 -1 -1

-1 -1 -1 1 -1 1 -1 -1 -1

-1 -1 1 -1 -1 -1 1 -1 -1

-1 1 -1 -1 -1 -1 -1 1 -1

-1 -1 -1 -1 -1 -1 -1 -1 -1

Page 68: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Pooling: Shrinking the image stack

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 69: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

1.00

Pooling

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 70: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

1.00 0.33

Pooling

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 71: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

1.00 0.33 0.55 0.33

0.33 1.00 0.33 0.55

0.55 0.33 1.00 0.11

0.33 0.55 0.11 0.77

Pooling

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

Page 72: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Rectified Linear Units (ReLUs)

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

0.77

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 73: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

0.77 0

Rectified Linear Units (ReLUs)

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 74: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

0.77 0 0.11 0.33 0.55 0 0.33

Rectified Linear Units (ReLUs)

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 75: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

0.77 0 0.11 0.33 0.55 0 0.33

0 1.00 0 0.33 0 0.11 0

0.11 0 1.00 0 0.11 0 0.55

0.33 0.33 0 0.55 0 0.33 0.33

0.55 0 0.11 0 1.00 0 0.11

0 0.11 0 0.33 0 1.00 0

0.33 0 0.55 0.33 0.11 0 0.77

Rectified Linear Units (ReLUs)

0.77 -0.11 0.11 0.33 0.55 -0.11 0.33

-0.11 1.00 -0.11 0.33 -0.11 0.11 -0.11

0.11 -0.11 1.00 -0.33 0.11 -0.11 0.55

0.33 0.33 -0.33 0.55 -0.33 0.33 0.33

0.55 -0.11 0.11 -0.33 1.00 -0.11 0.11

-0.11 0.11 -0.11 0.33 -0.11 1.00 -0.11

0.33 -0.11 0.55 0.33 0.11 -0.11 0.77

Page 76: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Layers get stacked

-1 -1 -1 -1 -1 -1 -1 -1 -1

-1 1 -1 -1 -1 -1 -1 1 -1

-1 -1 1 -1 -1 -1 1 -1 -1

-1 -1 -1 1 -1 1 -1 -1 -1

-1 -1 -1 -1 1 -1 -1 -1 -1

-1 -1 -1 1 -1 1 -1 -1 -1

-1 -1 1 -1 -1 -1 1 -1 -1

-1 1 -1 -1 -1 -1 -1 1 -1

-1 -1 -1 -1 -1 -1 -1 -1 -1

1.00 0.33 0.55 0.33

0.33 1.00 0.33 0.55

0.55 0.33 1.00 0.11

0.33 0.55 0.11 0.77

0.33 0.55 1.00 0.77

0.55 0.55 1.00 0.33

1.00 1.00 0.11 0.55

0.77 0.33 0.55 0.33

0.55 0.33 0.55 0.33

0.33 1.00 0.55 0.11

0.55 0.55 0.55 0.11

0.33 0.11 0.11 0.33

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 77: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Deep stacking

-1 -1 -1 -1 -1 -1 -1 -1 -1

-1 1 -1 -1 -1 -1 -1 1 -1

-1 -1 1 -1 -1 -1 1 -1 -1

-1 -1 -1 1 -1 1 -1 -1 -1

-1 -1 -1 -1 1 -1 -1 -1 -1

-1 -1 -1 1 -1 1 -1 -1 -1

-1 -1 1 -1 -1 -1 1 -1 -1

-1 1 -1 -1 -1 -1 -1 1 -1

-1 -1 -1 -1 -1 -1 -1 -1 -1

1.00 0.55

0.55 1.00

0.55 1.00

1.00 0.55

1.00 0.55

0.55 0.55

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 78: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Fully connected layer

1.00 0.55

0.55 1.00

0.55 1.00

1.00 0.55

1.00 0.55

0.55 0.55

1.00

0.55

0.55

1.00

1.00

0.55

0.55

0.55

0.55

1.00

1.00

0.55

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 79: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Fully connected layer

X

O

0.55

1.00

1.00

0.55

0.55

0.55

0.55

0.55

1.00

0.55

0.55

1.00

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 80: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Images

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 81: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Sound

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 82: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Text

Brandon Rohrer https://brohrer.github.io/how_convolutional_neural_networks_work.html

Page 83: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 84: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 85: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 86: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 87: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 88: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 89: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 90: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 91: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 92: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion
Page 93: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Page 94: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1

Total Connections?

6x6x1 3x3x1x

What would have been the number of connections if this had been a fully-connected layer?

Total Unique Parameters?

3x3x1+ bias

Page 95: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

8x8 image, 3x3 filter, Stride 1 2x2 pooling, Stride 2

Page 96: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

2x2 pooling, Stride 28x8 image, 3x3 filter, Stride 1

Page 97: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Fei-Fei Li & Andrej Karpathy & Justin Johnson

INPUT: [224x224x3] memory: 224*224*3=150K params: 0

CONV3-64: [224x224x64] memory: 224*224*64=3.2M params: (3*3*3)*64 = 1,728

CONV3-64: [224x224x64] memory: 224*224*64=3.2M params: (3*3*64)*64 = 36,864

POOL2: [112x112x64] memory: 112*112*64=800K params: 0

CONV3-128: [112x112x128] memory: 112*112*128=1.6M params: (3*3*64)*128 = 73,728

CONV3-128: [112x112x128] memory: 112*112*128=1.6M params: (3*3*128)*128 = 147,456

POOL2: [56x56x128] memory: 56*56*128=400K params: 0

CONV3-256: [56x56x256] memory: 56*56*256=800K params: (3*3*128)*256 = 294,912

CONV3-256: [56x56x256] memory: 56*56*256=800K params: (3*3*256)*256 = 589,824

CONV3-256: [56x56x256] memory: 56*56*256=800K params: (3*3*256)*256 = 589,824

POOL2: [28x28x256] memory: 28*28*256=200K params: 0

CONV3-512: [28x28x512] memory: 28*28*512=400K params: (3*3*256)*512 = 1,179,648

CONV3-512: [28x28x512] memory: 28*28*512=400K params: (3*3*512)*512 = 2,359,296

CONV3-512: [28x28x512] memory: 28*28*512=400K params: (3*3*512)*512 = 2,359,296

POOL2: [14x14x512] memory: 14*14*512=100K params: 0

CONV3-512: [14x14x512] memory: 14*14*512=100K params: (3*3*512)*512 = 2,359,296

CONV3-512: [14x14x512] memory: 14*14*512=100K params: (3*3*512)*512 = 2,359,296

CONV3-512: [14x14x512] memory: 14*14*512=100K params: (3*3*512)*512 = 2,359,296

POOL2: [7x7x512] memory: 7*7*512=25K params: 0

FC: [1x1x4096] memory: 4096 params: 7*7*512*4096 = 102,760,448

FC: [1x1x4096] memory: 4096 params: 4096*4096 = 16,777,216

FC: [1x1x1000] memory: 1000 params: 4096*1000 = 4,096,000

(not counting biases)

Page 98: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

Fei-Fei Li & Andrej Karpathy & Justin Johnson

98

two more layers to go: POOL/FC

Page 99: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

99

Resources: Datasets

• UCI Repository: http://www.ics.uci.edu/~mlearn/MLRepository.html

• UCI KDD Archive: http://kdd.ics.uci.edu/summary.data.application.html

• Statlib: http://lib.stat.cmu.edu/

• Delve: http://www.cs.utoronto.ca/~delve/

Page 100: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

100

Resources: Journals

• Journal of Machine Learning Research www.jmlr.org

• Machine Learning

• IEEE Transactions on Neural Networks

• IEEE Transactions on Pattern Analysis and Machine Intelligence

• Annals of Statistics

• Journal of the American Statistical Association

• ...

Page 101: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

101

Resources: Conferences

• International Conference on Machine Learning (ICML) • European Conference on Machine Learning (ECML)• Neural Information Processing Systems (NIPS)• Computational Learning • International Joint Conference on Artificial Intelligence (IJCAI)• ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD)• IEEE Int. Conf. on Data Mining (ICDM)

Page 102: Lecture # 12 Machine Learning & CNNbiomisa.org/wp-content/uploads/2020/02/Lect-12.pdf–improve their performance –at some task –with experience •Optimize a performance criterion

102

Acknowledgements

Emily Fox & Carlos Guestrin, Machine Learning Courses, University of Washington, Coursera

Introduction to Machine Learning, Alphaydin

Statistical Pattern Recognition: A Review – A.K Jain et al., PAMI (22) 2000

Pattern Recognition and Analysis Course – A.K. Jain, MSU

Pattern Classification” by Duda et al., John Wiley & Sons.

Mat

eria

l in

th

ese

slid

es h

as b

een

tak

en f

rom

, th

e fo

llow

ing

reso

urc

es