Hidden Markov Models
Hidden Markov Models
Introduction
• Most of the methods • Hidden Markov
we’ve looked at Models (HMMs)
• Have examined • Provide a way of
images and tried to representing a model
compute a few pieces of what happens to
of information cause these
• These give us observations
observations that tell • We can use this to
us about the world in explain a sequence of
some way observations, such as
those made from a
sequence of images
Hidden, Markov, Model
• Hidden
• We can’t observe the model directly, but we
know that it is there, and we can observe
things related to it
• Markov
• The state of the model at any time depends
only on the previous state, and not on
those before (is Markovian)
Hidden Markov Models
• A HMM consists of • The functions:
two sets and three • A start state function,
I(si), giving the prob.
functions of starting in state si
• The sets: • A transition function,
• A set of n states, T(si, sj), giving the
S={s1, s2, …, sn} prob. of going from
state si to state sj
• A set of m symbols
• An observation
that can be observed, function, O(ak , si)
A={a1, a2, …, am} giving the prob. of
seeing symbol ak in
state si
Example
• Suppose we have a • We expect people to
camera watching have several actions
some people • Sitting, standing,
• We segment the walking, or running
scene into individuals • Each of these is a
• We track each person state in our HMM for
to class their speed that person
into still, slow, or fast • Each state has an
• We use stereo to class expected observation
their height as being (eg sitting people are
low, or high still and appear low)
Eg: Sets and Start States
• The sets: • The function I tells
• The set of states, S, is us how people enter
{sitting, standing, the scene
walking, running} • I(sitting) = 0
• The observations, A, • I(standing) = 0
are • I(walking) = 0.9
{(still, low), • I(running) = 0.1
(still, high),
(slow, low), …}
Eg: Transition Function
• Tells us how people’s • Eg:
actions change • T(sit, sit) = 0.7
• Given that we saw • T(sit, stand) = 0.2
someone sitting in the • T(sit, walk) = 0.1
last frame what are • T(sit, run) = 0
they likely to be doing
now? • We repeat this for all
• The’ll probably still be other pairs of
sitting, might have actions. Note that
stood up or walked T(x,x) is often high
off, but won’t have
run
Eg: Transition Function
0.5
0.2 0.2
0.1 0.1
0.6
Eg: Observation Function
• Tells us how each • Eg: A sitting person
state looks is almost certainly
• Often a bit uncertain ‘low’ and probably
because of errors in ‘still’ but not ‘fast’
measurements • O(sit, (low, still)) = 0.6
• We assume there are • O(sit, (low, slow)) = 0.3
a discrete set of • O(sit, (low, fast)) = 0
measurements made • O(sit, (high, still)) = 0.1
(not necessary, but
• O(sit, (high, slow)) = 0
simpler)
• O(sit, (high, fast)) = 0
Three Problems
• Given the model, what is the chance of
some event happening