+ All Categories
Home > Documents > Digital Camera and Computer Vision Laboratory Department of Computer Science and Information...

Digital Camera and Computer Vision Laboratory Department of Computer Science and Information...

Date post: 13-Dec-2015
Category:
Upload: emerald-cain
View: 219 times
Download: 0 times
Share this document with a friend
58
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C. Computer Vision Chapter 4 Statistical Pattern Rec ognition Presenter: 王 Cell ph one: 0937384214 E-mail: [email protected]
Transcript
Page 1: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

Digital Camera and Computer Vision LaboratoryDepartment of Computer Science and Information Engineering

National Taiwan University, Taipei, Taiwan, R.O.C.

Computer VisionChapter 4

Statistical Pattern Recognition Presenter: 王夏果

Cell phone: 0937384214E-mail: [email protected]

Page 2: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Introduction

Units: Image regions and projected segments Each unit has an associated measurement

vector Using decision rule to assign unit to class or

category optimally

Page 3: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Introduction (Cont.)

Feature selection and extraction techniques Decision rule construction techniques Techniques for estimating decision rule error

Page 4: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Simple Pattern Discrimination

Also called pattern identification process A unit is observed or measured A category assignment is made that names

or classifies the unit as a type of object The category assignment is made only on

observed measurement (pattern)

Page 5: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Simple Pattern Discrimination (cont.)

a: assigned category from a set of categories

C t: true category identification from C d: observed measurement from a set of meas

urements D (t, a, d): event of classifying the observed unit P(t, a, d): probability of the event (t, a, b)

Page 6: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

e(t, a): economic gain/utility with true category t and assigned category a

A mechanism to evaluate a decision rule Identity gain matrix

Economic Gain Matrix

Page 7: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

An Instance

Page 8: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Another Instance

P(g, g): probability of true good, assigned good,

P(g, b): probability of true good, assigned bad,

...

e(g, g): economic consequence for event (g, g),

e positive: profit consequence

e negative: loss consequence

Page 9: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Another Instance (cont.)

Page 10: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Another Instance (cont.)

Page 11: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Another Instance (cont.)

Fraction of good objects manufactured

P(g) = P(g, g) + P(g, b) Fraction of good objects manufactured

P(b) = P(b, g) + P(b, b) Expected profit per object

E =

Page 12: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Conditional Probability

Page 13: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Conditional Probability (cont.)

P(b|g): false-alarm rate P(g|b): misdetection rate Another formula for expected profit per object

Page 14: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.1

P(g) = 0.95, P(b) = 0.05

Page 15: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.1 (cont.)

Page 16: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.2

P(g) = 0.95, P(b) = 0.05

Page 17: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.2 (cont.)

Page 18: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Decision Rule Construction

(t, a): summing (t, a, d) on every measurements d

Therefore,

Average economic gain

Page 19: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Decision Rule Construction (cont.)

Page 20: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Decision Rule Construction (cont.)

We can use identity matrix as the economic gain matrix to compute the probability of correct assignment:

Page 21: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Fair Game Assumption

Decision rule uses only measurement data in assignment; the nature and the decision rule are not in collusion

In other words, P(a| t, d) = P(a| d)

Page 22: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Fair Game Assumption (cont.)

From the definition of conditional probability

Page 23: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

By fair game assumption,

P(t, a, d) = By definition,

=

=

Fair Game Assumption (cont.)

Page 24: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Deterministic Decision Rule

We use the notation f(a|d) to completely define a decision rule; f(a|d) presents all the conditional probability associated with the decision rule

A deterministic decision rule:

Decision rules which are not deterministic are called probabilistic/nondeterministic/stochastic

Page 25: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Previous formula

By and

=>

Expected Value on f(a|d)

Page 26: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Expected Value on f(a|d) (cont.)

Page 27: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Bayes Decision Rules

Maximize expected economic gain Satisfy

Page 28: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Bayes Decision Rules (cont.)

Page 29: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Bayes Decision Rules (cont.)

+

+

Page 30: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Continuous Measurement

For the same example, try the continuous density function of the measurements:

and Prove that they are indeed density function

Page 31: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Continuous Measurement (cont.)

Suppose that the prior probability of

is and the prior probability of

is

When , a Bayes decision rule will assign an observed unit to t1, which implies

=>

Page 32: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Continuous Measurement (cont.)

.805 > .68, the continuous measurement has larger expected economic gain than discrete

Page 33: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Prior Probability

The Bayes rule:

Replace with The Bayes rule can be determined by assigni

ng any categories that maximizes

Page 34: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Economic Gain Matrix

Identity matrix

Incorrect loses 1

A more balanced instance

Page 35: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Maximin Decision Rule

Maximizes average gain over worst prior probability

Page 36: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.3

Page 37: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.3 (cont.)

Page 38: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.3 (cont.)

Page 39: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.3 (cont.)

The lowest Bayes gain is achieved when

The lowest gain is 0.6714

Page 40: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.3 (cont.)

Page 41: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.4

Page 42: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.4 (cont.)

Page 43: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.4 (cont.)

Page 44: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.4 (cont.)

Page 45: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.5

Page 46: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.5 (cont.)

Page 47: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Example 4.5 (cont.)

Page 48: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Decision Rule Error

The misidentification errorαk

The false-identification error βk

Page 49: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

An Instance

Page 50: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Reserving Judgment

The decision rule may withhold judgment for some measurements

Then, the decision rule is characterized by the fraction of time it withhold judgment and the error rate for those measurement it does assign.

It is an important technique to control error rate.

Page 51: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Nearest Neighbor Rule

Assign pattern x to the closest vector in the training set

The definition of “closest”:

where is a metric or measurement space Chief difficulty: brute-force nearest neighbor

algorithm computational complexity proportional to number of patterns in training set

Page 52: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Binary Decision Tree Classifier

Assign by hierarchical decision procedure

Page 53: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Major Problems

Choosing tree structure Choosing features used at each non-terminal

node Choosing decision rule at each non-terminal

node

Page 54: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Decision Rules at the Non-terminal Node

Thresholding the measurement component Fisher’s linear decision rule Bayes quadratic decision rule Bayes linear decision rule Linear decision rule from the first principal co

mponent

Page 55: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Error Estimation

An important way to characterize the performance of a decision rule

Training data set: must be independent of testing data set

Hold-out method: a common technique

construct the decision rule with half the data set, and test with the other half

Page 56: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Neural Network

A set of units each of which takes a linear combination of values from either an input vector or the output of other units

Page 57: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Neural Network (cont.)

Has a training algorithm Responses observed Reinforcement algorithms Back propagation to change weights

Page 58: Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.

DC & CV Lab.DC & CV Lab.CSIE NTU

Summary

Bayesian approach Maximin decision rule Misidentification and false-alarm error rates Nearest neighbor rule Construction of decision trees Estimation of decision rules error Neural network


Recommended