17
嵌嵌嵌嵌嵌 Pattern Recognition for Embedded Vision •Template matching •Statistical / Structural Pattern Recognition •Neural networks

嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Embed Size (px)

Citation preview

Page 1: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

嵌入式視覺Pattern Recognition for

Embedded Vision

•Template matching•Statistical / Structural Pattern Recognition •Neural networks

Page 2: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Embedded Vision System

Image acquisitionImage ProcessingFeature ExtractionDecision Making(Pattern Recognition)

Page 3: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Pattern Recognition model

1. Template matching

2. Statistical Pattern Recognition:

based on underlying statistical model of patterns and pattern classes.

3. Structural (or syntactic) Pattern Recognition :

pattern classes represented by means of formal structures as grammars, automata, strings, etc.

4. Neural networks:

classifier is represented as a network of cells modeling neurons of the human brain (connectionist approach).

Page 4: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Pattern Representation

• A pattern is represented by a set of d features, or attributes, viewed as a d-dimensional feature vector.

1 2( , , , )Tdx x xx

Page 5: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

PreprocessingPreprocessingFeature

MeasurementFeature

MeasurementClassificationClassification

testpattern

Classification Mode

PreprocessingPreprocessing

FeatureExtraction/Selection

FeatureExtraction/Selection

LearningLearningtrainingpattern

Training Mode

Two Process for Pattern Recognition system

Page 6: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Generic concepts for PR

y x

nx

x

x

2

1Feature vector

- A vector of observations (measurements). - is a point in feature space .

Hidden state

- Cannot be directly measured.

- Patterns with equal hidden state belong to the same class.

Xx

x X

Yy

Task

- To design a classifer (decision rule)

which decides about a hidden state based on an onbservation.YX :q

Pattern

Page 7: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Pattern Representation by Feature Vector for Character

Recognition

X=[x1, x2, … , xn], each xj a real number

Xj may be object measurement

Xj may be count of object parts

Example: object rep. [#holes, Area, moments, ]

Page 8: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Example

x

2

1

x

x

height

weight

Task: identity recognition.

The set of hidden state is

The feature space is

},{ JHY2X

Training examples

)},(,),,{( 11 ll yy xx

1x

2x

Jy

Hy Linear classifier:

0)(

0)()q(

bifJ

bifH

xw

xwx

0)( bxw

Page 9: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Pattern Recognition system

Image processing

Feature extraction

Classifier

Classassignment

• Image acquisition and image processing.• Feature extraction aims to create discriminative features good for classification.• Classifier.• Learning algorithm sets PR from training examples-- supervised learning

Learning algorithm

Object

Page 10: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Feature extraction

Task: to extract features which are good for classification.

Good features: • Objects from the same class have similar feature values.

• Objects from different classes have different values.

“Good” features “Bad” features

Page 11: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Feature extraction methods

km

m

m

2

1

nx

x

x

2

11φ

km

m

m

m

3

2

1

nx

x

x

2

1

Feature extraction Feature selection

Problem can be expressed as optimization of parameters of featrure extractor .

Supervised methods: objective function is a criterion of separability (discriminability) of labeled examples, e.g., linear discriminat analysis (LDA).

Unsupervised methods: lower dimesional representation which preserves important characteristics of input data is sought for, e.g., principal component analysis (PCA).

φ(θ)

Page 12: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

ClassifierA classifier partitions feature space X into class-labeled regions such that

||21 YXXXX }0{||21 YXXX and

1X 3X

2X

1X1X

2X

3X

The classification consists of determining to which region a feature vector x belongs to. Borders between decision boundaries are called decision regions.

Page 13: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

CSE803 Fall 2014 13

Decision-Tree Classifier

Uses subsets of features in seq.

Feature extraction may be interleaved with classification decisions

Can be easy to design and efficient in execution

Page 14: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

14

Decision Trees

#holes

moment ofinertia

#strokes #strokes

best axisdirection

#strokes

- / 1 x w 0 A 8 B

01

2

< t t

2 4

0 1

060

90

0 1

Page 15: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

15

Classification using nearest class mean

Compute the Euclidean distance between feature vector X and the mean of each class.

Choose closest class, if close enough (reject otherwise)

Page 16: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Unsupervised learning

Input: training examples {x1,…,x} without information about the hidden state.

Clustering: goal is to find clusters of data sharing similar properties.

Classifier

Learning algorithm

θ

},,{ 1 xx },,{ 1 yy

Classifier

ΘY)(X: L

YΘX :q

Learning algorithm(supervised)

A broad class of unsupervised learning algorithms:

Page 17: 嵌入式視覺 Pattern Recognition for Embedded Vision Template matching Statistical / Structural Pattern Recognition Neural networks

Example of unsupervised learning algorithm

k-Means clustering:

Classifier

||||minarg)q(,,1

iki

y mxx

Goal is to minimize

1

2)q( ||||

ii ixmx

ij

ji

iII

,||

1xm })q(:{ ij ji xI

Learning algorithm

1m

2m

3m

},,{ 1 xx

},,{ 1 kmmθ

},,{ 1 yy