hmm-based pattern detection

14
HMM-BASED HMM-BASED PATTERN DETECTION PATTERN DETECTION Image Processing and Image Processing and Reconstruction Reconstruction Winter 2002 Winter 2002

Upload: siran

Post on 09-Jan-2016

20 views

Category:

Documents


0 download

DESCRIPTION

HMM-BASED PATTERN DETECTION. Image Processing and Reconstruction Winter 2002. Outline. Markov Process Hidden Markov Models Elements Basic Problems Evaluation Optimization Training Implementation 2-D HMM Application Simulation and Results. Markov Process. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: HMM-BASED  PATTERN DETECTION

HMM-BASED HMM-BASED PATTERN DETECTIONPATTERN DETECTION

Image Processing and ReconstructionImage Processing and Reconstruction

Winter 2002Winter 2002

Page 2: HMM-BASED  PATTERN DETECTION

OutlineOutline

Markov Process Hidden Markov Models

• Elements• Basic Problems

Evaluation Optimization Training

• Implementation• 2-D HMM

Application Simulation and Results

Page 3: HMM-BASED  PATTERN DETECTION

Markov ProcessMarkov Process Can be described at any time to

be in one state among N distinct states

Its probabilistic description just requires a fixed specificationof current and previous states actual state at time t

state transition probability

Each state corresponds to a physical (observable) event

Too restrictive for sophisticated applications

ijitjt

ktitjt

aSqSqP

SqSqSqP

1

21

|

,...,|

S1

S2

S3

a31

ijatq

Page 4: HMM-BASED  PATTERN DETECTION

Extension to Hidden Markov Extension to Hidden Markov ModelsModels

A conditionally independent process on a Markov chain States correspond to clusters of context with similar

distribution

Elements of HMM:

• State transition probability

• The observation symbol probability in each state

• The initial state distribution

itjtij SqSqPa 1|

Mk

NjSqVPkb jtkj

1

1|)(

ji SqP 1

),,( BA

Page 5: HMM-BASED  PATTERN DETECTION

Fundamental Problems for HMMFundamental Problems for HMM

Evaluation the probability of the observation O=O1O2…OT given the model , P(O| )

OptimizationChoosing optimal state sequence given the observation and the model .

Training

Estimating model parameters to maximize P(O| )

Page 6: HMM-BASED  PATTERN DETECTION

Evaluation the Model; Forward-Evaluation the Model; Forward-Backward AlgorithmBackward Algorithm

This calculation is on order of

Forward-Backward Procedure with order of Forward variable: Backward variable:

statesof

nscombinatioallTqqqqqq ObObaObOP

T...| 11 12111

TTN2

N

iT iOP

1

|

TN 2

|,...21 ittt SqOOOPi ,|...21 itTttt SqOOOPi

Page 7: HMM-BASED  PATTERN DETECTION

Optimal States Sequence; Optimal States Sequence; Solution(s)Solution(s)

One solution: choose the states which are individually most likely.

This optimal solution has to be a valid state sequence!!

Vitterbi Algorithm: find the single best state sequence that maximizes P(Q|O,)

|,...,,,...max 2121 ttt OOOiqqqPi

Niiq

ii

iiOSqPi

tt

N

itt

ttitt

1max

,|

1

1

Page 8: HMM-BASED  PATTERN DETECTION

Training the ModelTraining the Model

1

1

1

1

1

1

1

1

1

1 111

111

,

,|,,

T

tt

T

VOift

t

j

T

tt

T

tt

ij

i

N

j

N

ittjijt

ttjijtjtitt

i

i

kb

i

jia

i

jObai

jObaiOSqSqPji

kt

,,

,

,

BA

Page 9: HMM-BASED  PATTERN DETECTION

Continuous Observation Continuous Observation

DistributionsDistributions In most of the applications (Speech, Image, …),

observations can not be characterized as discrete symbols from finite alphabet and should be considered by probability density function (PDF).

The most general representation of the PDF is a finite mixture of normal distributions with different means and variances for each state.

Estimating mean and variance instead of estimating bj(k)

Page 10: HMM-BASED  PATTERN DETECTION

Implementation ConsiderationsImplementation Considerations Scaling: Dynamic range of and will exceed the

precision range of any machine

Multiple observations for training

Initial Estimation of HMM Parametersfor convergence, good initial values of PDF are really helpful.

Choice of Model, Number of states, Choice of observation PDF

K

k

k

K

OPOP

OOOO

1

21

)|()|(

...

Page 11: HMM-BASED  PATTERN DETECTION

Two-Dimensional HMMTwo-Dimensional HMM

Set of Markovian states within each super-state

Transition probability

Useful for segmentation

Si,j

Si-1,j

Si,j-1

Sub-State

Super-State

ji

ji

ji

lnm

Sl

Sn

Sm

a

,

1,

,1

,,

Page 12: HMM-BASED  PATTERN DETECTION

Application: Pattern DetectionApplication: Pattern Detection

SNR=-5

SNR=10

Wyd

xjinc

yd

xjinc

),2

(

),2

(

NoiseW

yx

yxJyxjinc :

2),(

22

221

Wyxjinc ),( W

Page 13: HMM-BASED  PATTERN DETECTION

SimulationsSimulations Feature Vector: DCT Coefficients or their averages over some of them

Block Size: 16*16

Both images in training set and test set have different rotation of “jinc”s, but the distance and center of them are fixed.

Running K-means Clustering Algorithm For initial estimation Comparing with template matching and Learning Vector Quantization

Distance measure for LVQ: is the computed variance of each coefficients in reference centroid

Average of Absolute value of the Coefficients

Page 14: HMM-BASED  PATTERN DETECTION

Results and Conclusion! Results and Conclusion! Detection Error