image segmentation using a genetic algorithm and hierarchical local search
Post on 17-May-2015
1.576 Views
Preview:
DESCRIPTION
TRANSCRIPT
Image Segmentation using aGenetic Algorithm and
Hierarchical Local Search
Mark W. Hauschild, Sanjiv Bhatia, and Martin Pelikan
Missouri Estimation of Distribution Algorithms Laboratory (MEDAL)Department of Mathematics and Computer Science
University of Missouri, St. Louis, MO
martin@martinpelikan.net
http://medal-lab.org
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Motivation
I Image segmentation important in image processing.I Often used as a preliminary step.I Can emphasize boundaries between objects.I Locate distinct objects in images.
I Image segmentation is challengingI Difficult to succeed across diverse images.I Even a relatively small image has a large number of points.I Large number of locally optimal segmentations.I Ideally want it done automatically.
I The purpose of this paperI Use Potts spin glass model to define image segmentation as
optimization problem.I Use a steady-state genetic algorithm with hierarchical local
search to solve the problem.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Outline
I Image segmentation as Potts spin glass.I Algorithm
I Steady-state genetic algorithm.I Crossover operator.I Hierarchical local search.
I Experiments.
I Conclusions and future work.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
q-state Potts Model
I Origin in physics.
I Spins arranged on a 2D or 3D lattice.
I Each spin sj can have up to q states.
I Edges have weights that define relationships betweenneighboring spins.
I Energy defined as
E = −∑〈i,j〉
Ji,jδ(si, sj) ,
where δ(si, sj) = 1 if si = sj , and δ(si, sj) = 0 if si 6= sj .
I Usual task is to minimize the total energy of the system.
I To minimize energy, neighboring spins si and sj should beequal if Ji,j > 0; otherwise the spins should be different(ideally). Larger Ji,j values are more important than smaller.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Mapping Image Segmentation to Potts model
I Each pixel corresponds to one spin.
I The value of the spin defines the pixel’s segment.
I Map grayscale image to a set of couplings {Ji,j} betweenneighboring pixels:
Ji,j = 1− ∆i,j
θ∆avg,
whereI ∆i,j is absolute difference between neighbors,I ∆avg is average difference between all neighbors in the image,I θ = 1 controls sensitivity to changes in intensity.
I Small differences between neighbors imply a large coupling(meaning that the neighbors should be in the same segment).
I Large differences between neighbors imply a small coupling(meaning that the neighbors should be in different segments).
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Mapping Image Segmentation to Potts model
I Image segmentation using Potts modelI Number q of states in Potts model = number of segments.I Each pixel’s state defines its segment.I Minimizing energy corresponds to segmentation so that similar
neighbors belong to the same segment (and dissimilarneighbors belong to different segments).
I Can apply any optimizer (e.g. simple genetic algorithm).I But naive implementations won’t work too well
I High dimensionality.I Large number of local optima.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Genetic Algorithm
I RepresentationI Segmentations represented by strings.I One character for each pixel in the image (long strings).I Each character can take q values (q=number of segments).
I Steady-state hybrid GA with small population.I Initial population of strings represents random segmentations.I Each iteration selects two random parents from population.I Parents are combined using crossover to create new string.I Local search used to improve the resulting string.I Candidate replaces the worst parent if it’s better.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Algorithm
I Two details left to discuss:I Crossover operator.I Local search and hierarchical local search.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Crossover Operator
I Creates new segmentation c from segmentations a and b.
I Select randomly rectangular region.
I c takes content of rectangular region from a.
I c takes the rest from b.I Selecting rectangular region
I Picks a random pixel for center of region to swap.I Size of swap region for image of size x× y is
√x/2×
√y/2.
I Other scenarios possible.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Transforming Solutions for Crossover
I Similar segmentations have often different strings (renamingsegments produces extremely different strings).
Image a Image b
I Crossover without transforming parents leads to poor resultsbecause of excessive disruption and ineffective juxtaposition.
I Resolution: Transform parents by renumbering segmentsI Calculate conditional probabilities that a segment i in parent a
is represented by segment j in parent b for all i and j.I Use greedy algorithm to renumber each segment in parent a to
the most likely segment it represents in b.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Difficulties with Simple Local Search
I Problems have large number of variables in each solution.
I Advantageous to use local search to speed optimization up.I First attempted to use bit-flip hill climbing (HC)
I Would get stuck at poor local optimum, even for images whereeach segment consisted of a single color (easy to segment).
I Led to actual degradation of performance.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Difficulties with Simple Local Search: Illustration
Initial image Random segmentation
Segmentation after bit-flip HC
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Hierarchical Local Search
I Developed hierarchical local search to tackle this challenge.
I Start with simple bit-flip hill climbing.
I Treat each connected segment as one variable (character).I Each iteration
I Try to change each connected segment (connected region ofpixels assigned 1 segment number) to another color.
I Accept the best change (if improvement).I Terminate when no more improvement possible.
I Regions increase in size (regions merge over time).
I Implementation can be done efficiently.
I Important: Deals with the problem of simple HC, leading to amuch more efficient search for good segmentations.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Steps of Hierarchical Local Search
Step = 1
Step = 100
Step = 50
Step = 143
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Demonstration of Importance of Hierarchical LS
g = 1, no LS
g = 1, DHC
g = 1, HLS
g = 100, no LS
g = 100, DHC
g = 100, HLS
g = 1000, no LS
g = 1000, DHC
g = 1000, HLS
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Experimental Setup
I Number of segments set to q = 4.
I Population size set to N = 50.
I Input images converted to 8-bit grayscale for 256 distinct graylevels before generating the weight matrix.
I Two different digital images were examinedI House image of size 150× 100 pixels.I Dog image of size 160× 128 pixels.
I For each image:I Find final resulting segmented image using hybrid GA.I Examine image after coloring regions based on average color of
that region in original image.I Compare the results to meanshift segmentation.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
House Image using Hybrid GA
Initial image Segmented image
Average color
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
House Image using Mean-Shift Segmentation
Intermediate Final, 17 colors
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Dog Image using Hybrid GA
Initial image Segmented image
Average color
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Dog Image using Mean-Shift Segmentation
Intermediate Final, 26 colors
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Conclusions
I Described a hybrid GA to perform image segmentation.
I Hierarchical local search proposed to improve efficiency.
I Transformation used to lower disruption due to crossover.
I Resulting hybrid GA was able to efficiently segment images.
I Results also show the necessity of hierarchical local searchwhere simple bit-flip local search actually led to performancedegradation.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
Acknowledgments
I Support was provided byI NSF grants ECS-0547013 and IIS-1115352.I ITS at the University of Missouri in St. Louis.I University of Missouri Bioinformatics Consortium.
M. Hauschild, S. Bhatia and M. Pelikan Image Segmentation using GA and Hierarchical Local Search
top related