Ant Colonies For MRF-Based Image Segmentation: Salima Ouadfel, Mohamed Batouche and Said Talhi
Ant Colonies For MRF-Based Image Segmentation: Salima Ouadfel, Mohamed Batouche and Said Talhi
Résumé: This paper presents HACSEG, a new ant algorithm for the image segmentation based on the Markov Random
Field (MRF) and a modified version of the Ant Colony System algorithm coupled with a local search. HACSEG
algorithm differs from other ant algorithms proposed for image segmentation, in the way that each artificial ant is
associated with a particular partition that is modified using pheromone trails and heuristic information unlike to build a
completely new partition using a iterative constructive process. The new partitions found by ants are then optimized
using a local search algorithm. Pheromone trails are updated according to the quality of the partitions found by the best
ant. A diversification phase is also used to diversify the search. The experimental results presented outperforms those
obtained with other methods.
.
Mots clés: Image segmentation, Clustering, Markov Random Field, Ant Colony System., local search.
image segmentation, that differ in (1) manipulation of σ xs : the deviation value of the cluster xs
solutions, (2) the way pheromone is exploited and
laid, (3) the use of a heuristic information to guide Vc (x ) : the potential function for clique c
ants and (4) the introduction of a diversification phase C : the set of all cliques over the image.
to diversify the search in the solutions space.
Experimental results show that the HACSEG obtained
good quality segmentation results and outperforms A clique is a set of pixels that are neighboring of
ACS-MRF and others methods. one another. In this paper we consider only the pair-
site clique potentials of 8-neighborhood system, with
The paper is organized as follows. Section 2 the form V(x1, x2)= −β if x1 = x2 and 0 otherwise. β is
presents a brief review on image modeling using a positive parameter and the larger β, the larger is the
MRF. Section 3 describes ACO paradigm. Section 4 influence of the neighboring pixels.
presents HACSEG for MRF based image
segmentation. In section 5 we present the Minimization of the global energy function, is hard
experimental results and we compare HACSEG with optimization problem because the number of possible
other heuristics. Finally a conclusion is drawn in label configurations is generally very large and
section 6. moreover, the energy function may contains local
minima (Li, 1995).
U(x) = ∑
(
ys −µxs 2
+
) ∑log(σ )+∑V (x)
xs c
(2)
s∈S 2σ xs
2
s∈S c∈C
where
between intensity patterns in a local neighborhood of information by moving pixels from one class to
the two pixels. The heuristic function values are another. N/2 moves are applied as follows. First a
computed from the linear correlation coefficient corr, pixel s is selected at random, next another pixel s’
once for all pixels in a preprocessing step and are from its immediate neighbors N s is selected to be
recorded in a matrix of dimension (N, M), where N is assigned to the same class as the pixel s, with two
the dimension of the image and M=8 if we consider different policies: with a probability q0, ant exploits
only the 8-neighborhood. The values of the heuristic the information contained in the pheromone trail and
function η are normalized to the range [0,1] and are heuristic information, while with probability (1-q0),
computed as follows: ant k explores the solution space.
j∈N s
i. Modify the partition x k ;
ii. Apply a local search to the where
modified partition; o η(s,s') is the local heuristic between the
b. Record the global best solution two pixels s and s’ .
x gb =min (U(x k )) ; o τ k (s,s') is the desirability to assign the
k =1,...., K
pixels s and s’ to the same class in the
c. Update the pheromone trails; new partition of ant k.
6- If a number of iterations applied without
amelioration of x gb then apply Parameter q0 allows to modulate the degree of
Diversification. exploration (q0 ≈ 0) versus exploitation (q0 ≈ 1) and
to choose whether to concentrate the search of the
Figure. 3. HACSEG algorithm for image segmentation algorithm on the best solutions (greedy search) or to
explore the search space.
In the following, we present into details our
Pheromone trail update
implementation of HACSEG algorithm, step by step.
In HACSEG, as in (Ouadfel & al, 2003a) the
Initialization of partitions update of the pheromone trails is done only by the best
ant with the best quality found since the beginning of
Initially, we associate each ant k with a randomly
the algorithm. First, all the values contained in the
chosen partition x k such that each pixel s is given a
pheromone trail are reduced using the evaporation
random label from the set Λ . Theses partitions are
process (as in the real ants) according to the rule.
then optimized using ICM algorithm.
In the second phase, only the globally best ant, the partitions.
one that constructed the clustering with the minimum
energy function defined in Eq (2) from the beginning 5 Experimental Results
of the algorithm, is allowed to update the pheromone
trails using the following update formula HACSEG is compared with the previous algorithm
presented in [Ouadfel & al, 2003a] which is also based
on ant colonies, and with other methods based on
τ(s, s')=τ(s, s') + ρ.∆τ(s, s') (7) genetic algorithm and simulated annealing. For the
comparison, we use cerebral magnetic resonance
(MR) images with differents levels of noise and
inhomogeneities (Figure. 3.) and real images
where
considered in (Ouadfel & al, 2003A).
1 MR images
if (s, s') ∈ x gb (8)
U(x gb) Brain matter can generally be categorized as white
∆τ(s, s') =
0 matter (WM), gray matter (GM) and cerebrospinal
otherwise fluid (CSF). Tests have been done on the
computationally synthesized Brainweb phantoms
available on the site Brainweb:
Local search http://www.bic.mni.mcgill.ca/brainweb/,containing 0,
Local search has shown to be effective to solve 3 and 5% of noise and have an inhomogeneity of 20,
large optimization problems. Adding local search to or 40%, to compare the following segmentation
ant algorithms yields a faster convergence of the algorithms : (1) SA, (2) GA, (3)ACS-MRF, (4)
algorithm and an earlier detection of high quality HACSEG
solutions. The basic idea is to construct a complete
labeling and then iteratively refine it by applying a Inhomogeneity Inhomogeneit
neighborhood examination with fist improving =20% y =40%
strategy.
For each ant solution, we use a simple iterative
improvement local search that starting from an initial Noise=0%
solution iteratively generates a better solution from its
neighborhood. The neighborhood for a current
clustering x is the set of candidate clustering N(x)
that can be reached from x by making small
modifications on the labels of pixels. Iterative
improvement has been implemented using the first
improvement, i.e., the first improving move found is Noise=3%
accepted. For each solution x, we evaluate the
neighboring candidates solutions and the first
x' ⊂ N(x) for which U(x') < U(x) is selected. The
neighborhood of a solution is defined by a set of
solutions that can be obtained by exchanging the
labels of two pixels (Franti & al, 2000).
Noise=5%
Diversification
If x gb , the best global partition has not been
improved during a number of iterations which
indicates that the search is stuck or has prematurely
Figure. 3..Brain phantoms with different values of noise
converged the diversification step is started in order to
and inhomogeneities.
diversify the search. The pheromone trails are
completely re-initialised: All the values of the The parameters of SA GA and ACS-MRF are directly
pheromone trail matrix are set to the same value. and taken form (Ouadfel & al, 2003a). The parameters of
new partitions are generated for k – 1 ants expect for HACSEG are set identical to ACS-MRF and are
the keme ant for which we associate the best global tabulated in table 1
partition x gb . A matrix Freq ,
( )
(Freq s,s'),s∈S,s'∈N s is used to store the number
of times each pair (s,s’) has been incorporated into the
ant solutions. During the diversification phase, we Algorithms Parameters Value
have used assignments that have not been incorporated T0 2
into ants’solutions frequently to generate new
SETIT2005
Ak : area, or the number of pixels of the kéme (Bonabeau & al, 1999) Bonabeau, E., Dorigo M. and
cluster; Therualez, G. “ Swarm Intelligence: From Natural to
ek : gray level error of cluster k. Artificial Systems”. New Work: Oxford University
Press, 1999.
(Borsotti & al, 1998) Borsotti, M., Campadelli, P. and
ek is defined as sum of the square of the Euclidean
Shettini, R. “Quantitative evaluation of color
distances between the gray level intensity of pixels in image segmentation results”, Pattern Recognition
cluster k and the average gray level intensity of cluster letters 741-747, 1998.
k in the segmented image.
(Bullnheimer & al, 1997) Bullnheimer, B., Hartl, R. and
The first term of Eq. (10) is a normalization factor. Strauss, C. “Applying the Ant System to the Vehicle
The smallest the value of Q(I), the better the Routing Problems”, 2nd Metaheuristic International
segmentation results were. Table 2 summeatizes the Conference (MIC-97), Sophia-Antipolis, France, 1997.
results obtained from SA, GA, ACS-MRF and (Chellappa & al, 1993) Chellappa, R. and Jain, A.K.
ACSEG algorithms. Editors, Markov Random Fields: Theory and
Images (a) (b) Application Academic Press, San Diego. 1993.
SA 1.130 0.980 (Chen & al, 1995) Chen, J.L. and Kundu, A.,
“Unsupervised texture segmentation using multichannel
GA 1.128 0.950
decomposition and hidden Markov-models”. IEEE
ACS-MRF 1.128 0.9486 Trans. Image Process. (4) pp. 603–619, 1995.
HACSEG 1.1272 0.9473 (Costa & al, 1997) Costa., D. and Hertz., A. “Ants Can
Color Graphs”, Journal of the Operational Research
Table. 2: Borsotti & al. Measure (Q) comparison for real
Society, (48): 295-305, 1997.
images (a) and (b)
(Di Caro & al, 1998) Di Caro, G. and Dorigo, M. "AntNet:
As we can see, HACSEG obtained good quality Distributed Stigmergetic Control for Communications
segmentation results. Networks", Journal of Artificial Intelligence Research
(JAIR), (9): 317-365, 1998.
6 Conclusion (Dorigo & al, 1991) Dorigo, M., Maniezzo, V. and Colorni,
A., “Positive feed back as a search strategy”. Technical
In this paper we have described HACSEG, a new Report (16). Politecnico di Milano, Italy. 1991.
ant algorithm for image segmentation based on a
modified version of the Ant Colony System (ACS) (Dorigo & al, 1997a) Dorigo, M. and Gambardella, L.,
algorithm coupled with a local search. Instead of “Ant Colony System: A Cooperative Learning Approach
to the Traveling Salesman Problem”. IEEE Transactions
building a new partition each time, the ant algorithm
on Evolutionary Computation (1), pp: 53-66, 1997.
starts with a number of random partitions. Each
partition is first optimized and then associated with (Dorigo & al, 1997b) Dorigo, M. and Gambardella, M.
one ant, which applies a given number of local moves “Ant Colony for the Traveling Salesman Problem”,
to pixels. The moves are chosen according to the BioSystems, (43): 73-81, 1997.
pheromone trails and heuristic information. A simple (Dorigo & al, 1999) Dorigo, M., Di Caro,G. and
local search algorithm is used to improve the quality Gambardella, L. “Ant Algorithms for Discrete
of the partition found by each ant and yielding a faster Optimization”, Artificial Life. 2(5): 137-172, 1999.
convergence of the algorithm. Experimental results
(Dubes & al, 1990) Dubes, R, Nadabar, S., Chen, C.C. and
show a noticeable increase in performance compared Jain, A.K., “MRF Model-Based algorithm for Image
to ACS-MRF algorithm and other global optimization Segmentation” Proc. 10th Int’l. Conference on Pattern
methods like SA and GA. Recognition, Atlantic City, pp. 808-814, 1990.
(Franti & al, 2000) Franti, A. and Kivijarvi, J.,
Références “Randomized Local Search Algorithm for the Clustering
(Andrey & al, 1998) Andrey, P. and Tarroux, P., Problem”. Pattern Analysis & Applications (3). 358-369,
“Unsupervised segmentation of Markov random field 2000.
modeled textured images using selectionist relaxation”. (Gambardella & al, 1997) Gambardella, L. and Dorigo, M.
IEEE Trans. Pattern Anal. Machine Intell. (20) 3, pp. ”HAS-SOP: An hybrid ant system for the sequential
252–262, 1998. ordering problem”, Technical Report (11), IDSIA,
(Bertelle & al, 2003) Bertelle, C., Dutot, A., Guinand, F., Lugano, CH. 1997.
Olivier, D. “Color Ant Populations Algorithm for (Gambardella & al, 1999) Gambardella, L., Taillard, E.,
Dynamic Distribution in Simulations”. In ESS 2003 and Dorigo, M. “Ant Colonies for the QAP”.
European Simulation Symposium, Delft (Holland) J.Oper.Res.Soc., 50,167-176. 1999.
October 2003.
(Geman & al, 1984) Geman, S. and Geman, D., “Stochastic
(Besag, 1986) Besag, J. “On the statistical analysis of dirty relaxation, Gibbs distribution, and Bayesian restoration
pictures”, J. Roy. Statist. Soc. B 3(48): 259–302, 1986. of images”. IEEE Trans. Pattern Anal. Machine
Intell.(6). pp. 721–741, 1984.
SETIT2005
(Gunnels & al, 1994) Gunnels, J., Cull, P. and Holloway, (Panjwani & al, 1995) Panjwani, D.K. and Healey, G.,
J.L. “Genetic algorithms and simulated annealing for “Markov random field models for unsupervised
gene mapping”, In: Proc. 1st IEEE Conf. Evolutionary segmentation of textured color images”. IEEE Trans.
Computation, 385–390. 1994. Pattern Anal. Machine Intell. (17) 10, pp. 939–954.,
1995.
(Hu & al, 1992) Lu, Y. and Dennis, T.J. “Simulated
annealing and iterated conditional modes with selective (Ramos & al, 2002) Ramos, V. and Merelo, J.J. Self-
and confidence enhanced update schemes”, In: Proc. 5th Organized stigmergic Document Maps:
Annual IEEE Symp. Computer-based Medical Systems, Environment as a Mechanism for Context
257–264, 1992. Learning, in AEB´2002 – 1st Spanish Conference on
Evolutionary and Bio-Inspired Algorithms, E. Alba, F.
(Huang & al, 1995) Huang, Y., Palaniappan, K., Zhuang X.
Herrera, J.J. Merelo et al. (Eds.), pp. 284-293, Centro
and Cavanaugh, J.E. “Optic flow field segmentation and
Univ. de Mérida, Mérida, Spain, 6-8 Feb. 2002.
motion estimation using a robust genetic partitioning
algorithm”, IEEE Tranactions and Pattern Analysis. (Solnon & al, 2004) Solnon, C., and Fenet, S.
Machine Intelligence. (17), pp. 1177–1190. 1995. ”Investigating ACO capabilities for solving the
maximum clique problem”. Research report LIRIS RR-
(Kato, 1994) Kato, Z. “Modélisation Markoviennes
2004-021, Journal of Heuristics / Kluwer - May 2004
Multiresolutions en vision par ordinateur. Application à
la segmentation d’images SPOT”, Thèse de l’Université (Taillard & al, 1997) Taillard, E. and Gambardella, L. “An
de Nice Sophia Antipolis, 1994. Ant Approach for Structured Quadratic Assignment
Problems”, 2nd Metaheuristic International Conference
(Kervrann & al, 1995) Kervrann, C. and Heitz, F., “A
(MIC-97), Sophia-Antipolis, France, 1997.
Markov random field model based approach to
unsupervised texture segmentation using local and (Trejos & al, 2004) Trejos, J., Murillo, A. and Piza, E.
global spatial statistics”. IEEE trans. Image Process. (4 “Clustering by Ant Colony Optimization''. In Meeting of
), 1995. the International Federation of Classification Societies,
2004.
(Kim & al, 1998) Kim, E. Y. , Park, S. H. and Kim, H. J. “A
Genetic algorithm-based segmentation of Markov .
Random Field modeled images”. IEEE Signal
processing letters 7 (11), pp. 301–303., 2000.
(Li, 1995) Li, S.Z. Markov Random Field Modeling in
Computer Vision, Springer, Tokyo, 1995.
(Lin & al, 1993) Lin, F.T., Kao, C.Y. and Hsu, C.C.
“Applying the genetic approach to simulated annealing
in solving some NP-hard problems”, IEEE Trans. Syst.
Man Cybernet. 6(23) : 1752–1767,1993.
(Maniezzo & al, 1994) Maniezzo, V., Colorni, A. and
Dorigo,M. “The Ant System Applied to the Quadratic
Assignment Problem”, Technical Report. IRIDIA. (28),
Université Libre de Bruxelles, Belgium, 1994.
(Maniezzo & al, 2001) Maniezzo, V., Carbonaro, A., “Ant
Colony Optimization: an overview”. In C.Ribeiro (eds.)
Essays and Surveys in Metaheuristics, Kluwer, page.21-
44, 2001.
(Meshoul & al, 2003) Meshoul, S. and Batouche, M.
“Robust Point Correspondence for Image
Registration using a colony of cooperating artificial
ants”. Pp 1102-1110, WSEAS Transactions on
systems, Issue 4, V(2), 2003.
(Ouadfel & al, 2003a) Ouadfel, S. and Batouche, M.
”MRF-based image segmentation using Ant
Colony System’. ELCVIA: Electronic Letters on
Computer Vision and Image Analysis 2(1):pp 12-24,
2003.
(Ouadfel & al, 2003b) Ouadfel, S., Batouche, M. and
Talhi, S. “MRF-based image segmentation using
autonomous agents”. International Conference:
Sciences of Electronic, Technologies of Information and
Telecommunications, SETIT 2004 TUNISIA
(Pal & al, 1993) Pal, N.R. and Pal, S.K., “A review on
image segmentation techniques”. Pattern Recognition
(26) 9, pp. 1277–1294., 1993.