49
Introduction to Pattern Recognition Chapter 1 (Duda et al.) CS479/679 Pattern Recognition Dr. George Bebis 1

Introduction to Pattern Recognition Chapter 1 ( Duda et al.)

  • Upload
    gad

  • View
    95

  • Download
    0

Embed Size (px)

DESCRIPTION

Introduction to Pattern Recognition Chapter 1 ( Duda et al.). CS479/679 Pattern Recognition Dr. George Bebis. What is Pattern Recognition?. Assign a pattern to one of several pre-specified categories (or classes ). Male or Female?. What is Pattern Recognition? (cont’d). - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Introduction to Pattern Recognition

Chapter 1 (Duda et al.)

CS479/679 Pattern RecognitionDr. George Bebis

1

Page 2: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

What is Pattern Recognition?

• Assign an unknown pattern to one of several known categories (or classes).

2

Page 3: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

What is a Pattern?

• A pattern could be an object or event.

3

biometric patterns hand gesture patterns

Page 4: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

What is a Pattern? (con’t)

• Loan/Credit card applications – Income, # of dependents, mortgage amount credit worthiness

classification.

• Dating services– Age, hobbies, income “desirability” classification

• Web documents– Key-word based descriptions (e.g., documents containing

“football”, “NFL”) document classification.

4

Page 5: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Pattern Class

• A collection of “similar” objects.

5

Female Male

Page 6: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

How do we model a Pattern Class?

• Typically, using a statistical model.– probability density function (e.g., Gaussian)

6

Gender Classification malefemale

Page 7: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

How do we model a Pattern Class? (cont’d)

• Key challenges:

– Intra-class variability

– Inter-class variability

7Letters/Numbers that look similar

The letter “T” in different typefaces

Page 8: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Pattern Recognition:Main Objectives

• Hypothesize the models that describe each pattern class (e.g., recover the process that generated the patterns).

• Given a novel pattern, choose the best-fitting model for it and then assign it to the pattern class associated with the model.

8

Page 9: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Classification vs Clustering

– Classification (known categories) – Clustering (unknown categories)

9

Category “A”

Category “B”

Classification (Recognition) (Supervised Classification)

Clustering(Unsupervised Classification)

Page 10: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Pattern Recognition Applications

10

Page 11: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Handwriting Recognition

11

Page 12: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Handwriting Recognition (cont’d)

12

Page 13: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

License Plate Recognition

13

Page 14: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Biometric Recognition

14

Page 15: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Fingerprint Classification

15

Page 16: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Face Detection

16

Page 17: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Gender Classification

17

Balanced classes (i.e., male vs female)

Page 18: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Autonomous Systems

18

Page 19: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Medical Applications

19

Skin Cancer Detection Breast Cancer Detection

Page 20: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Land Classification(from aerial or satellite images)

20

Page 21: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

“Hot” Applications

• Recommendation systems– Amazon, Netflix

• Targeted advertising

21

Page 22: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

The Netflix Prize

• Predict how much someone is going to enjoy a movie based on their movie preferences.– $1M awarded in Sept. 2009

• Can software recommend movies to customers?– Not Rambo to Woody Allen fans– Not Saw VI if you’ve seen all previous Saw movies

22

Page 23: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Main Classification Approaches

x: input vector (pattern)

y: class label (class)

•Generative – Model the joint probability, p(x, y)– Make predictions by using Bayes rules to calculate p(ylx)– Pick the most likely label y

•Discriminative – Estimate p(ylx) directly (e.g., learn a direct map from inputs x to

the class labels y)– Pick the most likely label y

23

Page 24: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

“Syntactic” Pattern Recognition Approach

• Represent patterns in terms of simple primitives.

• Describe patterns using deterministic grammars or formal languages.

24

Page 25: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Complexity of PR – An Example

25

Problem: Sorting incoming fish on a conveyor belt.

Assumption: Two kind of fish: (1) sea bass (2) salmon

Page 26: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Pre-processing Step

26

Example

(1) Image enhancement

(2) Separate touchingor occluding fish

(3) Find the boundary of each fish

Page 27: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Feature Extraction

• Assume a fisherman told us that a sea bass is generally longer than a salmon.

• We can use length as a feature and decide between sea bass and salmon according to a threshold on length.

• How should we choose the threshold?

27

Page 28: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

“Length” Histograms

• Even though sea bass is longer than salmon on the average, there are many examples of fish where this observation does not hold.

28

threshold l*

Page 29: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

“Average Lightness” Histograms• Consider a different feature such as “average

lightness”

• It seems easier to choose the threshold x* but we still cannot make a perfect decision.

29

threshold x*

Page 30: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Multiple Features• To improve recognition accuracy, we might have to

use more than one features at a time.– Single features might not yield the best performance.– Using combinations of features might yield better

performance.

• How many features should we choose?

1

2

x

x

1

2

:

:

x lightness

x width

30

Page 31: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Classification• Partition the feature space into two regions by

finding the decision boundary that minimizes the error.

• How should we find the optimal decision boundary?

31

Page 32: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

PR System – Two Phases

32

Training PhaseTest Phase

Page 33: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Sensors & Preprocessing• Sensing:

– Use a sensor (camera or microphone) for data capture.– PR depends on bandwidth, resolution, sensitivity,

distortion of the sensor.

• Pre-processing:– Removal of noise in data.– Segmentation (i.e., isolation of patterns of interest from

background).

33

Page 34: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Training/Test data

• How do we know that we have collected an adequately large and representative set of examples for training/testing the system?

34

Training Set Test Set ?

Page 35: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Feature Extraction• How to choose a good set of features?

– Discriminative features

– Invariant features (e.g., translation, rotation and scale)

• Are there ways to automatically learn which features are best ?

35

Page 36: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

How Many Features?

• Does adding more features always improve performance?– It might be difficult and computationally

expensive to extract certain features.– Correlated features might not improve

performance.– “Curse” of dimensionality.

36

Page 37: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Curse of Dimensionality• Adding too many features can, paradoxically, lead to a

worsening of performance.– Divide each of the input features into a number of intervals, so

that the value of a feature can be specified approximately by saying in which interval it lies.

– If each input feature is divided into M divisions, then the total number of cells is Md (d: # of features).

– Since each cell must contain at least one point, the number of training data grows exponentially with d.

37

Page 38: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Missing Features

• Certain features might be missing (e.g., due to occlusion).

• How should we train the classifier with missing features ?

• How should the classifier make the best decision with missing features ?

38

Page 39: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Complexity

• We can get perfect classification performance on the training data by choosing complex models.

• Complex models are tuned to the particular training samples, rather than on the characteristics of the true model.

39

How well can the model generalize to unknown samples?

overfitting

Page 40: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Generalization• Generalization is defined as the ability of a classifier to

produce correct results on novel patterns.• How can we improve generalization performance ?

– More training examples (i.e., better model estimates).– Simpler models usually yield better performance.

40

complex model simpler model

Page 41: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

More on model complexity

41

• Consider the following 10 sample points (blue circles) assuming some noise.

• Green curve is the true function that generated the data.

• Approximate the true function from the sample points.

Page 42: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

More on model complexity (cont’d)

42

Polynomial curve fitting: polynomials having various orders, shown as red curves, fitted to the set of 10 sample points.

Page 43: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

More on complexity (cont’d)

43

Polynomial curve fitting: 9’th order polynomials fitted to 15 and 100 sample points.

Page 44: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Ensembles of Classifiers

• Performance can be improved using a "pool" of classifiers.

• How should we build and combine different classifiers ?

44

Page 45: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

PR System (cont’d)• Post-processing:

– Exploit context to improve performance.

45

How m ch info mation are y u mi

sing?

Page 46: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Cost of miss-classifications

• Consider the fish classification example; there are two possible classification errors:

(1) Deciding the fish was a sea bass when it was a salmon.

(2) Deciding the fish was a salmon when it was a sea bass.

• Are both errors equally important ?

46

Page 47: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Cost of miss-classifications (cont’d)

• Suppose the fish packing company knows that:– Customers who buy salmon will object vigorously if

they see sea bass in their cans.– Customers who buy sea bass will not be unhappy if

they occasionally see some expensive salmon in their cans.

• How does this knowledge affect our decision?

47

Page 48: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Computational Complexity

• How does an algorithm scale with the number of:

• features• patterns • categories

• Consider tradeoffs between computational complexity and performance.

48

Page 49: Introduction to Pattern Recognition Chapter 1 ( Duda  et al.)

Would it be possible to build a “general purpose” PR system?

• Humans have the ability to switch rapidly and seamlessly between different pattern recognition tasks.

• It is very difficult to design a system that is capable of performing a variety of classification tasks.– Different decision tasks may require different features.– Different features might yield different solutions.– Different tradeoffs exist for different tasks.

49