Multimedia Databases
Wolf-Tilo Balke Janus Wawrzinek
Institut für Informationssysteme
• Audio Retrieval
- Query by Humming
- Melody: Representation and Matching
• Parsons-Codes
• Dynamic Time Warping
- Hidden Markov Models (Introduction)
9 Previous Lecture
9 Audio Retrieval
9.1 Hidden Markov Models (continued from last lecture)
9 Video Retrieval
9.2 Introduction into Video Retrieval
9 Video Retrieval
• A HMM has at any time additional time- invariant observation probabilities
• A HMM consists of
– A homogeneous Markov process with state set
– Transition probabilities
9.1 Hidden Markov Model
– Start distribution – Stochastic process
of observations with basic sets
– And observation probabilities of observation o
kin state q
j9.1 Hidden Markov Model
9.1 HMM Example
Type 1 Type 2 Type 3 Type 4
Observations:
0.8 0.2
1
0.4 0.6
1 0.7
0.3
• Observation probability
– Given the observation sequence
and a fixed HMM λ
– How high is the probability that λ has generated the observation sequence?
=?
– Important for selecting between different models
9.1 Evaluation
• Let be a state sequence Then:
9.1 Evaluation
• Furthermore
is also valid
• And is valid for
9.1 Evaluation
• Thus the total probability for observation O is:
• Substituting in our previous results we obtain:
9.1 Evaluation
• Most probable state sequence
– Given the observation sequence
and a fixed HMM λ – What is the state sequence
which generates the observation sequence o, with the highest probability?
– Maximum likelihood estimator: maximize
9.1 Evaluation
• Because we know that
and that is constant for fixed sequences of observations, instead of maximizing
we can also maximize
• Definition:
– Maximal for the “most probable” path leading to the state q
i(at time t)
9.1 Evaluation
• is valid
• Therefore corresponds to a state sequence assuming that the occurrence of the observation sequence O, is the most likely
• Such a path can be constructed in steps by means of dynamic programming, via
9.1 Evaluation
• The corresponding algorithm is the Viterbi algorithm (Viterbi, 1967)
Initial step: for set
For inductively set
9.1 Evaluation
Termination:
Recursive path identification for probability p:
for t ∊ [1 : T - 1] set
9.1 Evaluation
• Given a fixed HMM, for each sequence of
observations, the Viterbi algorithm provides a sequence of states which has most probably
caused the observations
(Maximum likelihood estimator)
9.1 Evaluation
• Problem: Transition-, observation- and start probabilities are often
unknown
• Idea: training the parameters of the HMM λ
– Given an observation sequence
→ training sequence
– Task: determine the model parameters λ = (A, B, π) to maximize
9.1 Training of HMMs
• The training sequence should not be too short
• The maximization of the probability
leads to a high-dimensional optimization problem
– Solved e.g., through the Baum-Welch algorithm, which calculates a local optimum (Baum and
others, 1970)
9.1 Training of HMMs
• Baum-Welch algorithm:
– Begin with an initial estimate of parameters: either arbitrary or based on additional knowledge
9.1 Training of HMMs
• These statistics can be used for an iterative re- estimation of the parameters
• Define forward variables:
• Then:
and
is valid, for
9.1 Training of HMMs
• And backward variables:
• for
and for
9.1 Training of HMMs
• Then, the probability to be in q i at time t if o has been observed, is:
9.1 Training of HMMs
(conditional probability)
• And the probability to be at time t in state q i and at time t+1 in state q j is:
9.1 Training of HMMs
(conditional probability)