Vous êtes sur la page 1sur 33

# Markovian Segmentation

Meryem Ameur

## Laboratory of Information Processing and Decision Support

Faculty of Sciences and Technics
Sultan Moulay Slimane University
Beni Mellal city
Morocco

30 March 2017

30 March
Processing
2017 and
1 / Decis
33
Outline

1 Introduction

## 2 Hidden Markov Chain With Independant Noise (HMC-IN)

3 Iterative Estimators

4 Experimental Results

5 Conclusion

30 March
Processing
2017 and
2 / Decis
33
Introduction 1/3

## Hidden Markov Model(HMM) is a stochastic process, it contains two

processes :
1 An observed process, noted Y.
2 A hidden process, noted X.
In Markovian segmentation we consider :
1 An observed process Y is an image to be segmented.
2 A hidden process X is an image result of segmentation .

30 March
Processing
2017 and
3 / Decis
33
Example

## Figure: Figure: Image

Observation Y Result X

30 March
Processing
2017 and
4 / Decis
33
Introduction 2/3

## To estimate the result image X = (Xn ) = {0 , ....., k } k K ,

where K is a number of membership class. It's initialized by the user. From
the observed image Y = (Yn ) R, n N , where N is a number of pixels
component the image. HMM(eld,chain,tree) used the Bayes theorem :
P(X ).P(Y |X )
P(X |Y ) = (1)
P(Y )

Where :
P(X |Y ) : is the probability of a posteriori law X knows Y .
P(X ) : is the probability of the a priori law .
P(Y |X ) : is the probability of the attached data law.
P(Y ) : is a constant of normalization P(Y ) = 1.

30 March
Processing
2017 and
5 / Decis
33
Introduction 3/3

## In this work, we propose a comparative study between EM algorithm and

ICE algorithm. We are used these estimators to estimate a parameters of
Hidden Markov Chain with Independant Noise model(HMC-IN) to
segment the brain tumor MRI images.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 March
Processing
2017 and
6 / Decis
33
Hidden Markov Chain With Independant Noise (HMC-IN)

## It is a classical Markovian model, It's called Hidden Markov Chain with

Independent Noise (HMC-IN), because, it ignores the noise information
contained the image to be segmented Y .
Let the process Z = (X , Y ), where X = (Xn )Nn=1 and
Y = (Yn )N n=1 R.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 March
Processing
2017 and
7 / Decis
33
Hidden Markov Chain With Independant Noise (HMC-IN)

## The process Z = (X , Y ) is a HMC-IN, if and only if :

1 The process X is a Markov Chain, it's homogeneous and stationary, its
law is as follows :
Y1
N
P(x) = P(X1 = x1 ). P(Xn+1 = xn+1 |Xn = xn ) (2)
n=1

## 2 The observations Y are conditionally independant of X .

3 Each observation yn , n N depends only on its hidden class xn .
P(Yn = yn |X ) = P(Yn = yn |Xn = xn ) (3)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 March
Processing
2017 and
8 / Decis
33
The laws of HMC-IN

## The HMC-IN has two laws of probability :

1 The law of Markov chain X .
2 The law of attached data Y |X (observations).

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 March
Processing
2017 and
9 / Decis
33
The parameters of HMC-IN

## 1 Markov chain parameter's x :

I The initial law PI (i) = p(x1 = i) i .
I The transition matrix A(i, j) = p(xn+1 = j|xn = i) i, j .
2 Attached data parameter's y |x (Gaussian law ) :
I The mean i i for each class k .
I The variance i2 i for each class k .
I The density f of the distribution Y condionally to X using :

1 (yn i )2
f =p exp[ ] (4)
2(i2 ) (i2 )

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 10
and/ Decis
33
Estimation phases

## 1 The initialization parameters phase.

2 The iterative estimation parameters phase.
3 The nal decision phase.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 11
and/ Decis
33
Initialization phase

Conguration initial of X 0 by :
I K-means.
I FCM....
Initialization parameters of the X process x0 .
I PI (i)0 .
I A(i, j)0 .
Initialization parameters of the data attached law y0|x .
I (i)0 .
I ((i)2 )0 .

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 12
and/ Decis
33
Iterative Estimation phase

## Estimation the parameters of HMC-IN = (x , y |x ) for a Q number of

iterations q Q .
1 EM : Expectation Maximization.
2 SEM :Stochastic Expectation Maximization.
3 ICE : Iterative Conditional Estimation.
These algorithms are based on Baum Welch algorithm to calculate
parameters.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 13
and/ Decis
33
Baum Welch algorithm

## Baum Welch algorithm proceeds as :

Calculated Forward probabilities n (i) = p(y1 , ....., yn , xn ).

Forward Algorithm
1 Initialization : (n = 1)

PI (i)fi (y1 )
1 (i) = P i (5)
j PI (i)fj (y1 )

2 Induction : (n > 1)
P
fi (yn+1 ) j n (j)A(i, j)
n (i) = P P i (6)
k fk (yn+1 ) j n (j)A(i, j)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 14
and/ Decis
33
Baum Welch Algorithm

## Calculated Backward probabilities n (i) = p(yn+1 , ....., yN |xn ).

Backward Algorithm
1 Initialization : (n = N)
N (i) = 1i, j (7)

2 Induction : (n < N)
P
j A(i, j)fj (yn+1 )n+1 (j)
n (i) = P P i, j (8)
k fk (yn+1 ) j n (j)A(i, j)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 15
and/ Decis
33
Baum Welch Algorithm

## Calculated a Marginal a posteriori probabilities n (i) = p(xn = i|yn ).

Marginal a posteriori Law n (i)
n (i) = n (i)n (i)i, j (9)
Calculated Joint a posteriori probabilities
n (i, j) = p(xn = i, xn+1 = j|yn ).

## Joint a posteriori Law n (i, j)

n (i)A(i, j)fj (yn+1 )n+1 (j)
n (i, j) = P P i, j (10)
k fk (yn+1 ) l n (l)A(l, k)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 16
and/ Decis
33
A.EM Algorithm

EM Algorithm
For a number of iteration q Q :
Step(E ) :
I Calculate n (i), n (i), n (i, j) and n (i), using Baum Welch.
Step(M ) :
[q]
I Estimate parameters of the Markov chain x using the deterministic
strategy.

PN
1 n (i, j)
[q]
A(i, j) = Pn= N
i, j (12)
n=1 n (i)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 17
and/ Decis
33
EM Algorithm

Estimate parameters of law attached data y[q]|x for each class i also by
the deterministic strategy.
PN
1 yn n (i)
[q]
i = Pn=
N
i (13)
n=1 n (i)
PN [q] 2
2 [q] n=1 (yn i ) n (i)
(i ) = PN i (14)
n=1 n (i)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 18
and/ Decis
33
B.ICE Algorithm

ICE Algorithm
For each iteration q Q :
Calculate n (i), n (i), n (i, j) and n (i), using Baum Welch.
Simulate a sample of X q for one random simulation using the
parameters of the iteration q

## Estimate the parameters of Markov chain x[q] using deterministic

strategy.
PI (i)[q] = 1 (i)i (15)

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 19
and/ Decis
33
ICE Algorithm

PN
1 n (i, j)
A(i, j) [q]
= Pn=
N
i, j (16)
n=1 n (i)

## Estimate data attached parameters y[q]|x for each class i using

stochastic strategy :
yn 1[xn = i]
PN
1
[q]
i = Pn= i (17)
n=1 1[xn
N
= i]

PN [q] 2
2 [q] = i]
(i ) = i (18)
n=1 1[xn = i]
PN

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 20
and/ Decis
33
Complexity of ICE and EM (Comparaison)

Calculate O(K 2 N) O(K 2 N)
Calculate O(K 2 N) O(K 2 N)
Calculate O(K 2 N) O(K 2 N)
Calculate O(KN) O(KN)
Calculate PI O(K ) O(K )
Calculate A O(K 2 N) O(K 2 N)
Calculate O(KN) O(KN)
Calculate 2 O(KN) O(KN)
Simulate X O(KN) not executable
Table: Complexity of EM and ICE algorithms

From this table, we notice that the complexity of ICE is superior than the
complexity of EM. Because, ICE simulates the hidden process X one time
in each iteration q Q . This task makes ICE more complex than EM.
Meryem Ameur Markovian Segmentation (Laboratory of Information
30 MarchProcessing
2017 21
and/ Decis
33
Final Decision phase

## Final Bayesian estimator consists to estimate X the nal conguration of

result image X .
MPM : Maximum Posteriori Mode.
MPM Estimator
The solution in image segmentation by Hidden Markov Chain according
MPM is : maximize the marginal a posteriori probability n (i) :
xnmpm = argmaxi (n (i)n (i)) = argmaxi ((n (i))) (19)
The complexity of this estimator is O(KN).

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 22
and/ Decis
33
Experiments
We use K-means algorithm to initialize the conguration of X0 where
K = 3.
Concerning the initial law PI 0 we have :
PI0 =
0.33

0.33
0.33
Concerning the matrix of transition A0 (i, j), we have :
A0 =
0.5 0.25 0.25

0.25 0.5 0.25
0.25 0.25 0.5
The mean 0 and the variance ( 2 )0 from the conguration of X0 .
We have a number of iterations Q = 30.
We have used this type of initialization parameters in all experiments
presented in this work.
We have used the thresholding technic to extract the interset region.
Meryem Ameur Markovian Segmentation (Laboratory of Information
30 MarchProcessing
2017 23
and/ Decis
33
Experiment 1

Figure: Experiment 1

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 24
and/ Decis
33
Experiment 2

Figure: Experiment 2

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 25
and/ Decis
33
Experiment 3

Figure: Experiment 3

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 26
and/ Decis
33
Results 1/2 :PSNR index SSIM index and error rate
We have compared these estimators in term of the PSNR index, the SSIM
index, the error rate and the convergence.
Experiments PSNR ICE SSIM ICE PSNR EM SSIM EM
Experiment 1 24,0672 0.5710 24,0672 0.5697
Experiment 2 18.4713 0.4773 18.4713 0.4784
Experiment 3 21,8050 0.5157 21,8058 0.5150
Table: PSNR index and SSIM index

## Experiments Error rate ICE Error rate EM

Experiment 1 8,1357 8,1357
Experiment 2 9.6075 9.6075
Experiment 3 10,0450 10,0450
Table: error rate

## In term of the quality of segmentation the dierence is not important.

Meryem Ameur Markovian Segmentation (Laboratory of Information
30 MarchProcessing
2017 27
and/ Decis
33
Results 2/2 : Convergence

Experiments ICE EM
Experiment 1 5 iterations 7 iterations
Experiment 2 6 iterations 8 iterations
Experiment 3 7 iterations 8 iterations
Table: The convergence of ICE and EM algorithms

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 28
and/ Decis
33
Conclusion

I EM.
I ICE.

## To estimate a parameters of HMC-IN model.

Under the nal Bayesian criteria.
I MPM.
In Segmentation of.
I Brain tumor MRI images.
To extract brain tumor position
I Thresholding technic.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 29
and/ Decis
33
Conclusion

## Under ve criteria of comparaison.

1 The complexity.
2 The PSNR index.
3 The SSIM index.
4 The error rate.
5 The convergence.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 30
and/ Decis
33
Conclusion

## From the results we notice that :

1 In term of the Complexity ICE is more complex than EM.
2 In term of the quality of segmentation the dierence is not important.
3 In term of the convergence ICE converge faster than EM.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 31
and/ Decis
33
Perspectives

Perspectives
Using these estimator algorithms to :
1 Segment color textured images using a pairewise Markov chain model.
2 Segment the MRI images using the triplet Markov chain, considering
that X is non stationary.

## Meryem Ameur Markovian Segmentation (Laboratory of Information

30 MarchProcessing
2017 32
and/ Decis
33
Meryem Ameur Markovian Segmentation (Laboratory of Information
30 MarchProcessing
2017 33
and/ Decis
33