You are on page 1of 21

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/319077636

Evaluation of particle swarm optimisation for medical image segmentation

Conference Paper · September 2016

CITATIONS READS

3 179

1 author:

Mohammad Hashem Ryalat


Al-Balqa Applied University
14 PUBLICATIONS   458 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Automatic Construction of Immobilisation Masks for use in Radiotherapy Treatment of Head-and-Neck Cancer View project

Automatic Detection and Classification of the Ghor-area Plant Diseases View project

All content following this page was uploaded by Mohammad Hashem Ryalat on 04 November 2019.

The user has requested enhancement of the downloaded file.


Evaluation of Particle Swarm Optimisation for
Medical Image Segmentation

Mohammad Hashem Ryalat1 , Daniel Emmens2 , Mark Hulse4 , Duncan Bell4 ,


Zainab Al-Rahamneh3 , Stephen Laycock1 , and Mark Fisher1
1
University of East Anglia, Norwich Research Park, Norwich, NR4 7TJ, UK
{M.Ryalat,S.Laycock,Mark.Fisher}@uea.ac.uk
http://www.uea.ac.uk/computing
2
Department of Clinical Oncology, Ipswich Hospital NHS Trust, Ipswich, UK
Daniel.Emmens@ipswichhospital.nhs.uk
3
Dept of Computer Information Systems, AlBalqa Applied University, Jordan
Zainab@bau.edu.jo
4
Faculty of Health and Science, University Campus Suffolk, Ipswich, UK
m.hulse@ucs.ac.uk,Duncan@fisherideas.co.uk

Abstract. Otsu’s criteria is a popular image segmentation approach


that selects a threshold to maximise the inter-class variance of the dis-
tribution of intensity levels in the image. The algorithm finds the op-
timum threshold by performing an exhaustive search, but this is time-
consuming, particularly for medical images employing 16-bit quantisa-
tion. This paper investigates particle swarm optimisation (PSO), Dar-
winian PSO and Fractional Order Darwinian PSO to speed up the algo-
rithm. We evaluate the algorithms in medical imaging applications con-
cerned with volume reconstruction, with a particular focus on addressing
artefacts due to immobilisation masks, commonly worn by patients un-
dergoing radiotherapy treatment for head-and-neck cancer. We find that
the Fractional-Order Darwinian PSO algorithm outperforms other PSO
algorithms in terms of accuracy, stability and speed which makes it the
favourite choice when the accuracy and time-of-execution are a concern.

Keywords: Particle swarm optimisation, Medical image Segmentation,


Volume reconstruction

1 Introduction
Image segmentation is the process of dividing an image into multiple parts.
Every pixel in an image is allocated to one of a number of these parts. The
aim of segmentation process is to simplify the representation of an image into
something that is more meaningful and easier to analyze [1].
Image segmentation is one of the most important steps that should take
place in the treatment process in order to benefit from the medical images pro-
duced by the modern imaging modalities such as computed tomography (CT)
and magnetic resonance imaging (MRI). Segmentation of medical images can
be performed manually, automatically (computerized) or using a combination
2 Mohammad Hashem Ryalat et al.

of both. Manual segmentation is time-consuming comparing to automatic seg-


mentation and the results may be prone to observer variability whereas using
computer-aided segmentation techniques have significantly improved the accu-
racy of the segmentation outcomes [2].
There is no standard classification of those algorithms which are used for
medical images. However, A review study of algorithms for medical image seg-
mentation [2] categorised those algorithms in accordance with their primary
methodologies based on thresholds, clustering techniques and deformable mod-
els. Thresholds can be chosen manually or automatically. Manual selection of a
threshold value requires prior information and occasionally trial experimenta-
tions while automatic segmentation uses image information such as the image
histogram and pixel intensities to determine the threshold value automatically.
Otsu’s method [3] is a common approach in image segmentation field used
to automatically perform clustering-based image thresholding [4]. The basic as-
sumption of Otsu’s approach is that the image contains two classes of pixels (i.e.
foreground pixels and background pixels). It then computes the optimum thresh-
old separating the two classes so that their inter-class variance (i.e. between-class
variance) is maximal. Multi Otsu method, which is an extension of the basic as-
sumption of Otsu’s method to multi-level thresholding, is presented in [5].
The speed that is offered by computer imaging analysis plays a key role
in diagnosing different health problems and injuries such as traumatic brain
injury. This speed helps reduce mortality, cost and long-term complications
[6]. Exhaustive search for optimal thresholds requires evaluations of fitness of
(n + 1)(D − n + 2)n combinations of thresholds [7] where n represents the
number of thresholds and D represents the absolute difference between the
max intensity pixel value and the min intensity pixel value on the test im-
age. This point motivated us to dispense with using exhaustive search method
(i.e. brute-force method) and looking for fast segmentation methods working
under Otsu-criterion. The need of using optimisation algorithms to look for the
optimal threshold(s) becomes very persistent in the case of medical images which
are normally saved in dicom format (Digital Imaging and COmmunications in
Medicine). The reason for that is that the range of values that dicom images
do normally have lies in [-1000, 3000] whereas most of other non-medical im-
ages are having uniform gray values in the range of [0, 255]. So if we need, for
example, to apply the brute-force method to look for the optimal five thresh-
olds that segment a dicom image, then we need for (5 + 1)(4000 − 5 + 2)5 =
6.1210 ∗ 1018 combinations of thresholds to be evaluated, whereas we need to
evaluate (5 + 1)(255 − 5 + 2)5 = 6.0975 ∗ 1012 combinations of thresholds to
segment an images which has a uniform gray values in the range of [0, 255].
That discussion implies that using optimisation algorithms instead of brute-
force method over medical images will gain a large plenty of saved time since we
normally need to segment tens or hundreds of dicom images for the same object
which makes the time of execution a matter.
Numerous artificial intelligence and machine learning algorithms have been
widly applied in image segmentation field to segment non-medical images (e.g.
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 3

modified bacterial foraging algorithm was used in [8], artificial bee colony in [9],
Cuckoo search algorithm and wind driven optimization in [10], particle swarm
optimisation based in [11], differential evolution in [12] and genetic algorithms
in [13]).
Particle swarm optimization (PSO) is a population based stochastic opti-
mization algorithm developed in 1995 [14] inspired by social behavior of bird
flocking or fish schooling in search of food. It is basically initialized with a pop-
ulation of random solutions and searches for optima by updating generations.
The basic drawback of the PSO algorithm is that their is a possibility, as other
optimisation algorithms, to be trapped in a local optima. Darwinian particle
swarm optimization (DPSO) introduced in 2005 [15] as an extension to the PSO
algorithm by adding the natural selection mechanism (i.e. survival of the fittest)
to improve the ability of the PSO algorithm to escape from local optima. In
DPSO, many parallel PSO algorithms, each one forms a swarm, operate on the
same search space. The fractional-order Darwinian PSO (FODPSO) [16] was de-
veloped in 2011 and published in 2012 as an extension to the DPSO algorithm.
In the FODPSO, fractional calculus concepts are used in order to control the
convergence rate of the DPSO.
Few studies have applied the PSO, DPSO and FODPSO algorithms on image
segmentation (e.g. the authors of [17] applied those algorithms over hyperspec-
tral remote sensing images which contain numerous number of data channels).
In the context of medical images, there are a number of studies that applied
the traditional form of the PSO algorithm to segment medical images (e.g [18],
[19], [20], [21], [22]). This paper compares and validates the PSO, DPSO and
FODPSO algorithms, when using with medical images, in terms of speed, accu-
racy and stability of results. It also develops, using the FODPSO algorithm, a
new procedure to remove automatically the masks that are normally appeared
in CT images for those patients who are undergoing radiotherapy treatment for
tumours affecting the head and neck. In addition to that, this paper employs the
three PSO-based algorithms in: MRI image segmentation and CT volume recon-
struction. The experiments prove the gained speed and accuracy of PSO-based
algorithms when they are used in those mentioned applications.
The remaining sections of this paper is organised as follows. Section 2 gives
an overview on the PSO, DPSO and FODPSO algorithms. Section 3 presents
the datasets, experiments, applications and results of the work. Finally, Section
4 concludes this study.

2 Overview on PSO-Based Algorithms

2.1 The PSO Algorithm

Particle swarm optimisation (PSO) algorithm is inspired in the way swarms


act and its elements move in a synchronized way. It is based on a population
initialized with a random solutions called particles. Each particle is distinguished
by its own position and velocity. Equations (1) and (2) describes how the velocity
4 Mohammad Hashem Ryalat et al.

vid and position Xid are updated at each iteration k. Each particle has a kind of
memory which stores the position where it had the lowest cost (Xpbestid ), and
the position of the best particle in the population (Xgbestd ).

Vid (k) = wvid (k −1)+c1 r1id (k)(Xpbestid −Xid )+c2 r2id (k)(Xgbestd −Xid ) (1)

Xid (k) = Xid (k − 1) + Vid (k) (2)


In equations (1) and (2), w represents the inertia weight, r1 and r2 are random
numbers with a uniform distribution in the range [0,1], and c1 and c2 are assigned
weights to the local and global best solutions respectively.
Algorithm 1 represents the basic steps that PSO algorithm follows until it
reaches the stopping criteria. It is obvious that the algorithm starts by initialising
some parameters for the swarm. Those parameters include the population-size,
number-of-iterations, c1 (cognitive weight), c2 (Social weight), w(Inertial factor),
and Vmax and Vmin to set the limits of velocities. After that, the algorithm iter-
ates through all particles to calculate the fitness function. Notice that the fitness
function in this study will be the inter-class variance between pixels intensities.
Our aim is to search for the threshold(s) that maximise this fitness value to
global optima. The algorithm will iterate again through all particles to update
the value of the velocity Vid (k) and the location of the new position Xid (k).
those iterations will be repeated until stopping criteria happen. These criteria
includes setting a maximum number of iterations or stopping after executing a
fixed number of iterations without giving any enhancement.

Algorithm 1 Steps of PSO Algorithm


Initialize parameters of particles;
repeat
forall particles do
calculate fitness f
end
forall particles do
update Vid (k) according to equation (1)
update Xid (k) according to equation (2)
end
t=t+1
until stopping condition;

2.2 The DPSO Algorithm


A general problem with optimization algorithms is that of befalling trapped in a
local optimum. This leads a specific technique to work well on one problem but
may fail on another one. Tillett et.al. proposed an approach, named Darwinian
PSO [15] and based on natural selection, in which when a search have a tendency
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 5

to a local optimum, the search in that area is basically ignored and another area is
searched instead. More than one swarm is exist in DPSO. Each swarm separately
behaves like a normal PSO algorithm with some rules controlling the group of
swarms that are intended to simulate natural selection.
Algorithm 2 displays the internal processes that are performed by the DPSO
algorithm. The algorithm starts by setting initial values in a collection of pa-
rameters. Those parameters include number of swarms, maximum and minimum
possible number of swarms, maximum and minimum possible population size in
addition to the basic parameters of the traditional PSO. It is worthy to notice
that the swarm in the DPSO algorithm spawns (reproduce) a new particle if
it finds a new global best, and a particle is removed if the swarm has been
unsuccessful to find a more fit status in a fixed number of steps.

Algorithm 2 Steps of DPSO Algorithm


Initialize parameters of swarms;
repeat
forall swarms do
forall particles do
calculate fitness f
end
forall particles do
Update particle Bests
end
forall particles do
Move particle
end
if swarm gets better then
Reward swarm, spawn particle and extend swarm life
end
if swarm has not enhanced then
Delete particle and reduce swarm life
end
end
forall swarms do
Allow the swarm to spawn
end
Delete failed swarms
until stopping condition;

2.3 The FODPSO Algorithm

The fractional calculus is a generalization of the ordinary differentiation and


integration to non-integer order [23]. There are numerous uses of fractional cal-
culus in physics, mechanics, chemistry, computational mathematics and others.
6 Mohammad Hashem Ryalat et al.

The basic idea that stands behind the FODPSO algorithm is that this algorithm
utilises the fractional calculus concepts in order to control the convergence rate
of the DPSO algorithm. Those systems that comprise the using of fractional
processes reveal residual memory and their fractional order is understood as a
measure of the memory strength [24] [25].
Equation 3 presents the Grunwald-Letnikov description based on the concept
of fractional differential of a general signal x(t):
+∞
1 X (−1)k Γ (α + 1)x(t − kh)
 
α
D [x(t)] = lim (3)
h→0 hα Γ (k + 1)Γ (α − k + 1)
k=0

where Γ is the gamma function and α is the fractional coefficient such that α ∈
C. It is worthy to notice that while an integer-order derivative is evaluated as
an finite series, the fractional-order derivative is evaluated as an infinite number
of terms. Consequently, integer-order derivative behaves like a local operator,
while fractional-order derivative behaves like a structure that has a memory of
all past events [16].

3 Experimental Works

In order to explore the obtained benefits of PSO-based algorithms in the field of


medical images analysis, we have applied the PSO, DPSO and FODPSO algo-
rithms for medical images segmentation in three different areas. The experiments
in this study can be divided, according to the aim of each experiment, into three
categories:

1. Segmentation of brain in MRI Images.


2. Volume reconstruction form a stack of CT images.
3. Removing the mask automatically in CT images of those patients who have
tumours affecting the head and neck.

3.1 Segmentation of Brain in MRI Images

MRI is a medical imaging technique used in radiology to image the anatomy of


the body. MRI has proven to be an effective tool in the study of the human brain
[26]. The information provided by MRI images about the soft tissue anatomy has
significantly enhanced the quality of brain pathology diagnosis and treatment
[27]. The employment of computer technology in medical decision support is now
common through a numerous areas, such as cancer research, heart diseases and
brain tumors [28].
Segmentation means to divide up the image into a number of regions, each
of which is homogeneous in some sense (i.e. intensity, colour etc..) where clas-
sification means to assign to each point in the MRI image a tissue class, where
the classes are agreed in advance. Grey matter, White matter, cerebrospinal fluid
and air are examples on those classes. Notice that it is outside of our interests
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 7

(a) Image1. (b) Image2. (c) Image3.

Fig. 1: Three MRI images from three patients.

in this study to classify each point in the MRI image under specific class and
validate that process. Instead, we explore the feasibility of applying the PSO,
DPSO and FODPSO algorithms, in the field of medical images segmentation, in
terms of:

– CPU execution time


– The fitness value
– Stability of each algorithm

The presented experiments on this study were performed on Intel(R) Core(TM)


i7-3770 CPU @ 3.40GHz 3.40GHz / 16.0 GB (RAM)/ Windows 7 Enterprise
64-bit operating system. Three MRI images were selected randomly for three
different anonymised patients in order to apply the algorithms over them. Fig-
ure. 1 shows the three MRI images, that are taken from three different datasets,
used in this part of the study.
In order to present the difference that is gained by applying the FODPSO
algorithm, we compared it with PSO, DPSO and exhaustive search methods
in terms of speed and accuracy. The PSO, DPSO and FODPSO need, as any
optimization algorithm, to define search space, candidate solutions and global op-
tima. In the case of images, the pixels intensities of the image will form the search
space, the possible threshold values (i.e. [min − intensity, max − intensity]) will
form the candidate solutions, and maximising the inter-class variance will be our
global optima.
Since PSO, DPSO and FODPSO algorithms need initial values to be set
in parameters before they start, we present in Table 1 those required values.
The initial values of those parameters were adjusted experimentally to lead for
faster convergence. It was obvious from the experiments that we did there is no
significant influence on the execution time and the fitness value when slightly
change the initial values for those parameters. However, we recommend using
those values for any future studies in the field of dicom images segmentation since
we found those values the most efficient values that speed up the convergence
rate.
8 Mohammad Hashem Ryalat et al.

Table 1: Initial parameters of the PSO, DPSO and FODPSO algorithms


Parameter PSO DPSO FODPSO
Population size 180 35 35
Number of iterations 25 25 25
Cognitive weight 0.8 1.1 1.1
Social weight 0.8 0.9 0.9
Inertial factor 1.2 1.2 1.2
Vmax 3 3 3
Vmin -3 -3 -3
Number of swarms N/A 5 5
Max number of swarms N/A 7 7
Min number of swarms N/A 3 3
Max population size N/A 50 50
Min population size N/A 20 20
Stagnancy N/A 8 8
Fractional coefficient N/A N/A 0.8

In order to evaluate the accuracy of the results generated by each one of the
three optimisation algorithms (i.e. PSO, DPSO and FODPSO), we measured the
fitness (i.e. inter-class variance) for each algorithm and compared the outcomes
with the brute-force (exhaustive search) method. Since brute-force method ex-
plores all the different combinations of threshold values, then it will certainly
find the optimal threshold(s) and the optimal fitness value. Table 2 presents the
average fitness values generated by the PSO, DPSO and FODPSO algotithms
against the fitness value generated by the brute-force method. We run PSO,
DPSO and FODPSO algorithms 50 times since those optimisation algorithms
are stochastic and random. We calculate the average fitness values for 1, 2, 3
and 4 thresholds.
It is obvious from Table 2 that the three optimisation algorithms achieved
fitness values which are either the same or very closed to the fitness value gen-
erated by the brute-force method. In general, the accuracy (fitness value) of
FODPSO and DPSO were better than the accuracy of the PSO algorithm. The
FODPSO algorithm has either the same value or a slightly better fitness value
when compared to the DPSO algorithm. Although the fitness values of the three
algorithms were closed to the one of the brute-force method, we can notice that
as the number of thresholds increase, the differences between fitness values of the
three optimisation algorithms and the one of the brute-force method increases
but marginally. Fortunately, The trend of the results is the same for the three
test images which supports the robustness of the procedure. The average optimal
threshold(s) that were generated by PSO, DPSO and FODPSO against the ones
generated by the brute-force method are presented in Table 3. The readings of
this table supports the fact that PSO algorithm is prone to give a local maxima.
In order to evaluate the speed of each algorithm, we measured the average
CPU processing time that PSO, DPSO, FODPSO and brute-force methods need
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 9

Table 2: Average fitness values of Brute-Force, PSO, DPSO and FODPSO algo-
rithms for different number of thresholds over three MRI images.
Image No. Thresholds Brute-Force PSO DPSO FODPSO
Image1 1 1985.55 1984.78 1985.55 1985.55
2 2218.33 2216.98 2218.33 2218.33
3 2273.58 2272.91 2273.38 2273.49
4 2300.49 2297.44 2299.21 2299.27

Image2 1 2187.61 2187.43 2187.61 2187.61


2 2426.88 2425.53 2426.88 2426.88
3 2505.68 2504.62 2505.59 2505.59
4 2536.87 2535.89 2536.76 2536.79

Image3 1 2306.73 2306.64 2306.73 2306.73


2 2547.22 2546.12 2547.22 2547.22
3 2618.67 2617.97 2618.63 2618.65
4 2645.43 2643.89 2645.17 2645.31

Table 3: Average thresholds of PSO, DPSO and FODPSO over three MRI images
against the thresholds coming from Brute-Force.
No. Thresholds Brute-Force PSO DPSO FODPSO
Img1 1 {582} {575} {582} {582}
2 {418, 1077} {407, 1066} {418, 1077} {418, 1077}
3 {341, 835, 1242} {330, 824, 1231} {343, 837, 1244} {342, 837, 1244}
4 {275,681,1022,1374} {256, 655, 996, 1346} {270, 672, 1015, 1363} {270, 672, 1012, 1358}

Img2 1 {473} {468} {473} {473}


2 {373,946} {365, 937} {373,946} {373,946}
3 {241,622,1020} {231, 613, 1011} {240, 621, 1018} {240, 621, 1018}
4 {224,581,887,1186} {213, 569, 876, 1175} {220, 578, 885, 1184} {220, 577, 884, 1184}

Img3 1 {427} {423} {427} {427}


2 {381,983} {374, 976} {381,983} {381,983}
3 {221,579,1006} {212, 571, 998} {220, 578, 1004} {219, 578, 1004}
4 {206,541,793,1098} {196, 534, 788, 1095} {203, 543, 799, 1106} {203, 541, 797, 1105}
10 Mohammad Hashem Ryalat et al.

to produce results. Table 4 presents the average execution time in seconds for
each method. It is obvious from the readings in that table that the FODPSO al-
gorithm is always faster than the DPSO algorithm with a slight difference where
the DPSO algorithm is faster than PSO algorithm with significant difference.

Table 4: Average execution time (in sec) of the Brute-Force, PSO, DPSO and
FODPSO over three MRI images.
No. Thresholds Brute-Force PSO DPSO FODPSO
Img1 1 0.1168 0.2792 0.1225 0.1118
2 1.466 0.4376 0.3732 0.3501
3 158.8388 0.5575 0.4575 0.4373
4 14623 0.6840 0.5490 0.5170

Img2 1 0.1386 0.2673 0.1291 0.1155


2 1.47438 0.4337 0.3526 0.3428
3 157.7319 0.5680 0.4628 0.4425
4 12821 0.6846 0.5426 0.5255

Img3 1 0.1369 0.2611 0.1148 0.1089


2 1.4568 0.4328 0.3432 0.3317
3 157.1496 0.5703 0.4570 0.4327
4 12765 0.7088 0.5564 0.5224

By comparing the brute-force method against the FODPSO algorithm in


terms of speed in Table 4, we can conclude that the speed of the brute-force is
closed to but less than the speed of FODPSO when the aim of the segmentation
process is to produce only one threshold over the whole pixels of an image (i.e.
when the number of thresholds = 1). But as the number of thresholds increases,
the difference between the speed of the brute-force and the speed of the other
three optimisation algorithms becomes significant and noticeable. This supports
our idea about the feasibility of using FODPSO in medical images segmentation
and particularly when the number of thresholds equals two or more. Since the
FODPSO algorithm has a fractional coefficient, then this allows controlling the
convergence rate of the algorithm and that process explains why the FODPSO
needs less time than the DPSO algorithm. We found one study [29] reporting
that the time required for brute-force method was less than the time required for
the PSO algorithm when the number of thresholds equals one. This is true since
they applied their experiments over an image having uniform gray values at (0,
255) range. The range of values, in the case of medical images (dicom images), is
[-1000,3000] which explains why the brute-force method (i.e. exhaustive search)
takes considerable time as it was shown from the readings of Table 4. This
supports our recommendation about the importance of applying optimisation
algorithms to search for the optimal thresholds in medical images when the time
is concern.
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 11

Since PSO, DPSO and FODPSO algorithms are stochastic and random, then
there is a possibility to have different results in each run. In order to evaluate the
stability of the three optimisation algorithms, we used the standard deviation
as an evaluation metric of stability by finding the deviation of the fitness value
generated in each run. Table 5 presents the calculated standard deviation for
each algorithm in different cases.

Table 5: Standard deviation of the PSO, DPSO and FODPSO after running each
algorithm 50 times over three MRI images.
No. Thresholds PSO DPSO FODPSO
Img1 1 0.8134 0.0259 0.0213
2 0.9821 0.0329 0.0255
3 1.1711 0.6257 0.0341
4 1.2513 0.4251 0.1002

Img2 1 0.3207 0.0053 0.0012


2 0.0893 0.0082 0.0013
3 0.9625 0.0823 0.0149
4 1.0261 0.0928 0.0356

Img3 1 0.0251 0 0
2 0.0011 0 0
3 0.0966 0.0622 0.0112
4 0.3227 0.1925 0.0409

It is obvious that the measured values of standard deviation are low for the
PSO, DPSO and FODPSO algorithms which means that we can consider our
implementation of them over medical images is stable. FODPSO is the most
stable one when compared to the PSO and DPSO. It can be concluded from
Table 5 that the standard deviation values increase as the number of thresholds
increase in most cases. We present in Figure 2 the results of segmentation when
applying the FODPSO algorithm over the three MRI images using different
number of thresholds.

3.2 Volume reconstruction form a stack of CT images


Reconstructing volumes from CT images takes considerable time. A fundamental
reason for this is due to the fact that there is normally a large number of 2D slices
generated by the CT scanner. That number depends on the resolution of the CT-
scanner, spacing-between-slices and the dimensions of the scanned object. Before
the process of volume reconstruction starts, the stack of 2D slices generated
from the CT-scanner are required to be segmented. Since the results presented
in section 3.1 indicates that the FODPSO has the lowest CPU execution time,
then we decide to apply it to be used for 2D segmentation of CT slices. We also
12 Mohammad Hashem Ryalat et al.

Img1, 1 threshold Img1, 2 thresholds Img1, 3 thresholds Img1, 4 thresholds

Img2, 1 threshold Img2, 2 thresholds Img2, 3 thresholds Img2, 4 thresholds

Img3, 1 threshold Img3, 2 thresholds Img3, 3 thresholds Img3, 4 thresholds

Fig. 2: Results of segmentation when applying FODPSO over the three MRI
images using different number of thresholds
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 13

applied the other three algorithms to be compared with the FODPSO algorithm
in terms of speed. We used Marching cubes algorithm [30] to construct the
volume from the stack of segmented images.
The three objects that were used in this part of the study is shown in Fig.
3. The first object is a 3D-printed scaled head of a Cantonese chess piece that
were delicately carved from ivory throughout the 19th Century. This object was
produced using 3D-printing techniques by Laycock et al. [31]. A CT data set (512
x 512 x 180, helical, pitch = 0.562:1, collimation 16x0.625 mm (10mm)) of this
head was acquired at Ipswich Hospital. The second dataset is a plastic object in a
shape of nested cubes where the third dataset is a plastic hemisphere. The second
and third datasets were initially designed digitally with known dimensions and
then printed in the 3D printing lab in computing sciences school at University
of East Anglia. CT data sets of those two objects were acquired (helical, pitch =
0.562:1, collimation 16x0.625 mm (10mm), 512 x 512 x 60 for the nested cubes,
512 x 512 x 129 for the hemisphere). Figure 4 displays one example CT slice for
each object.

Object1 Object2 Object3

Fig. 3: The three objects that were used in this part of study (section 3.2) to
investigate the speed of volume reconstruction using different algorithms.

Object1 Object2 Object3

Fig. 4: Examples of one CT slice for each object.

Figure 5 shows the generated meshes that we got, displayed in 3D Max,


after applying the FODPSO algorithm for segmentation and Marching cubes for
building the 3D model. Table 6 shows a comparison, in terms of execution time,
14 Mohammad Hashem Ryalat et al.

between the brute-force, PSO, DPSO and FODPSO algorithms when they are
used in segmentation to construct 3D models. The table gives the required time
for constructing the mesh, in seconds, for the three objects (i.e. the Cantonese
head, nested cubes and the hemisphere).

(a) (b) (c)

Fig. 5: The (a)Cantonese head (b) Nested cubes and (c) The hemisphere depicted
in 3D Max after we applied the FODPSO algorithm and Marching cubes.

Table 6: A comparison between the brute-force, PSO, DPSO and FODPSO


algorithms in terms of elapsed execution time (in sec) when they are used in
segmentation to construct 3D models.
Object name Brute-force PSO DPSO FODPSO
Cantonese head 24.193 49.257 24.815 21.669
Nested cubes 8.538 15.355 8.187 6.814
Hemisphere 17.031 32.913 16.896 14.766

Table 6 shows clearly that the FODPSO algorithm is the fastest algorithm
to construct a volume when applying it over any one of the three objects where
the PSO was the slowest one. It is also obvious from that table that the speed
of DPSO algorithm is very closed to the speed of the brute-force method. It is
worthy to notice that in order to construct a volume from the CT images, we
chose the number of thresholds to be equal to one (i.e. number of thresholds = 1)
for the 2D segmentation process. Consequently the difference in CPU execution
time between the brute-force method and the FODPSO algorithm will not be
significant to a high level. We recommend using FODPSO algorithm as a mean
of segmentation to construct volumes as the total number of slices is large since
this will make a direct reflect on the total required time for the construction
process.
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 15

3.3 Removing the mask automatically from CT images


Masks are routinely used to immobilise patients undergoing radiotherapy treat-
ment for tumours affecting the head and neck. CT images of those patients form
the base of the researches in the field of Head-and-Neck cancer. Numerous re-
searchers, in the field of biomedical engineering, is looking for CT images that
have no masks in order to apply their techniques over it. Unfortunately, most
of the datasets that are either available on the internet or in hospitals include
masks. This problem limits the reusability and applicability of a large number of
available datasets. In those cases, researchers almost need to remove the mask
form the collection of CT images in order to be able to complete their work.
Removing the mask manually, using a painting software, is time consuming and
prone to errors particularly in the regions of adhesion. Development of a robust
technique to remove the masks from the CT slices automatically will present an
appreciable choice to save time and to avoid committing manual errors. In this
part of the study, we proposed a procedure that can be used to remove masks
automatically from CT images.
1. Input the CT dicom image that has a mask (see Fig 6.(a)). Name this image:
InputImage

(a) (b)

Fig. 6: (a) The input CT image with a mask. (b) The same image after using
FODPSO algorithm to segment it.

2. Make a copy of InputImage. Name it: CopyImage.


3. Use FODPSO algorithm to segment the InputImage. Name the image after
segmentation: SegmentedImage (See Fig 6.(b)).
4. Seek the pixels of the segmentedImage staring from the top middle pixel in
the image until you find the first pixel that has a different value (see Fig 7).
Get the value stored in this pixel and store this value in Vmask . Get also the
index (i.e row number and column number) of the pixel that lies directly
above that pixel. Pick the value of the pixel that lies at that index from the
CopyImage and store the value in Vbackground .
5. Find, in the segmentedImage, the indices for all pixels which have the same
value as Vmask . Store these indices in a data structure named indices. See
16 Mohammad Hashem Ryalat et al.

Fig. 7: Illustration of step 4 of the procedure of removing masks automatically.

Fig 8.

(a) (b)

Fig. 8: A snap shot that displays pixel values after segmentation using Image
Viewer App in MATLAB where red squares represent the pixels that form the
mask.

6. Get the copyImage and set all the pixels on this image that lies on the
same locations as indices to Vbackground . This modified image represents the
output image which does not include the mask as Fig 9 displays.

We find that setting the number of thresholds to be equal to five when apply-
ing the FODPSO algorithm will lead to better results when compared to other
number of thresholds. Setting the number of thresholds to five means that the
algorithm will segment the image into five different classes in addition to the
background class. This number of thresholds will classify all or most of the pix-
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 17

Fig. 9: The output image after removing the mask.

els that belong to mask under the same class. We applied our procedure over
a group of images for the same subject. Our experiments produced correct re-
sults over 90% of the tested images. However, the proposed procedure needs
more investigation over more than one dataset in order to generalise its use and
applicability.

4 Conclusion

This paper investigated the advantages gained when applying the PSO, DPSO
and FODPSO algorithms in the field of medical images segmentation. The results
showed that the FODPSO is a superior algorithm in terms of speed, accuracy
and stability of results when using over dicom images.
In order to benefit from the PSO-based algorithms, some arguments (such as
search space, candidate solutions and global optima) are needed to be correctly
defined, perceived and grasped according to field of the study. We customised
those arguments and showed the exact meaning of it in the field of medical image
segmentation.
To present the success and superiority of the FODPSO algorithm , we com-
pared it with PSO, DPSO and brute-force methods. The reason for selecting
those algorithms for comparison is due to that there are other studies reported
the superiority of the PSO over bacterial foraging algorithm [7] in terms of speed,
PSO over ant colony optimization, genetic algorithms, tabu search and simulated
annealing [32] in terms of accuracy and speed, PSO over genetic algorithms in
terms of speed and stability [33], and since the experimental works in this study
revealed that the FODPSO algorithm exceeds significantly the PSO algorithms
in terms of speed, accuracy and stability. That two facts implies the superiority
of the FODPSO over those algorithms.
The paper utilized the FODPSO algorithm by applying it in three medical
applications: MRI image segmentation, volume reconstruction from CT images,
and development of a new procedure to be used to remove automatically the
masks that are normally appeared in CT images for those patients who have
head-and-neck cancer and undergoing radiotherapy treatment.
The objective function that was used in this study is Otsu criterion (i.e. inter-
class variance). The future direction of this research will be investigating the
18 Mohammad Hashem Ryalat et al.

feasibility of applying the FODPSO algorithm in medical images segmentation


using other objective functions.

References
1. Lauren Barghout and Lawrence Lee. Perceptual information processing system,
July 11 2003. US Patent App. 10/618,543.
2. Zhen Ma, João Manuel RS Tavares, Renato Natal Jorge, and T Mascarenhas.
A review of algorithms for medical image segmentation and their applications
to the female pelvic cavity. Computer Methods in Biomechanics and Biomedical
Engineering, 13(2):235–246, 2010.
3. Nobuyuki Otsu. A threshold selection method from gray-level histograms. Auto-
matica, 11(285-296):23–27, 1975.
4. Mehmet Sezgin et al. Survey over image thresholding techniques and quantitative
performance evaluation. Journal of Electronic imaging, 13(1):146–168, 2004.
5. Ping-Sung Liao, Tse-Sheng Chen, Pau-Choo Chung, et al. A fast algorithm for
multilevel thresholding. J. Inf. Sci. Eng., 17(5):713–727, 2001.
6. SMR Soroushmehr, A Bafna, S Schlosser, K Ward, H Derksen, and K Najarian. Ct
image segmentation in traumatic brain injury. In 2015 37th Annual International
Conference of the IEEE Engineering in Medicine and Biology Society (EMBC),
pages 2973–2976. IEEE, 2015.
7. Raghavendra V Kulkarni and Ganesh Kumar Venayagamoorthy. Bio-inspired algo-
rithms for autonomous deployment and localization of sensor nodes. IEEE Trans-
actions on Systems, Man, and Cybernetics, Part C (Applications and Reviews),
40(6):663–675, 2010.
8. PD Sathya and R Kayalvizhi. Modified bacterial foraging algorithm based multi-
level thresholding for image segmentation. Engineering Applications of Artificial
Intelligence, 24(4):595–615, 2011.
9. Ming-Huwi Horng. Multilevel thresholding selection based on the artificial bee
colony algorithm for image segmentation. Expert Systems with Applications,
38(11):13785–13791, 2011.
10. Ashish Kumar Bhandari, Vineet Kumar Singh, Anil Kumar, and Girish Kumar
Singh. Cuckoo search algorithm and wind driven optimization based study of
satellite image segmentation for multilevel thresholding using kapur’s entropy. Ex-
pert Systems with Applications, 41(7):3538–3560, 2014.
11. Pedram Ghamisi, Micael S Couceiro, JóN Atli Benediktsson, and Nuno MF Fer-
reira. An efficient method for segmentation of images based on fractional calculus
and natural selection. Expert Systems with Applications, 39(16):12407–12417, 2012.
12. Erik Cuevas, Daniel Zaldivar, and Marco Pérez-Cisneros. A novel multi-threshold
segmentation approach based on differential evolution optimization. Expert Sys-
tems with Applications, 37(7):5265–5271, 2010.
13. Chih-Chin Lai and Din-Chang Tseng. A hybrid approach using gaussian smoothing
and genetic algorithm for multilevel thresholding. International Journal of Hybrid
Intelligent Systems, 1(3, 4):143–152, 2004.
14. Russ C Eberhart, James Kennedy, et al. A new optimizer using particle swarm
theory. In Proceedings of the sixth international symposium on micro machine and
human science, volume 1, pages 39–43. New York, NY, 1995.
15. Jason Tillett, T Rao, Ferat Sahin, and Raghuveer Rao. Darwinian particle swarm
optimization. 2005.
Evaluation of Particle Swarm Optimisation for Medical Image Segmentation 19

16. Micael S Couceiro, Rui P Rocha, NM Fonseca Ferreira, and JA Tenreiro Machado.
Introducing the fractional-order darwinian pso. Signal, Image and Video Process-
ing, 6(3):343–350, 2012.
17. Pedram Ghamisi, Micael S Couceiro, Fernando ML Martins, and Jon Atli Benedik-
tsson. Multilevel image segmentation based on fractional-order darwinian parti-
cle swarm optimization. IEEE Transactions on Geoscience and Remote sensing,
52(5):2382–2394, 2014.
18. Samy Ait-Aoudia, El-Hachemi Guerrout, and Ramdane Mahiou. Medical image
segmentation using particle swarm optimization. In 2014 18th International Con-
ference on Information Visualisation, pages 287–291. IEEE, 2014.
19. Kaiping Wei, Bin He, Tao Zhang, and Xianjun Shen. A novel method for segmen-
tation of ct head images. In 2007 1st International Conference on Bioinformatics
and Biomedical Engineering, pages 717–720. IEEE, 2007.
20. Ahmed Afifi, Toshiya Nakaguchi, Norimichi Tsumura, and Yoichi Miyake. Particle
swarm optimization based medical image segmentation technique. Medical Imaging
Technology, 28(1):53–62, 2010.
21. Devraj Mandal, Amitava Chatterjee, and Madhubanti Maitra. Robust medical
image segmentation using particle swarm optimization aided level set based global
fitting energy active contour approach. Engineering Applications of Artificial In-
telligence, 35:199–214, 2014.
22. Ehsan Shahamatnia and Mohamad Mehdi Ebadzadeh. Application of particle
swarm optimization and snake model hybrid on medical imaging. In 2011 IEEE
Third International Workshop on Computational Intelligence In Medical Imaging,
pages 1–8. IEEE, 2011.
23. Ivo Petráš. Fractional derivatives, fractional integrals, and fractional differential
equations in matlab. Engineering Education and Research Using MATLAB, In-
Tech, kap, 10:239–264, 2011.
24. Toma Marinov, Nelson Ramirez, and Fidel Santamaria. Fractional integration
toolbox. Fractional Calculus and Applied Analysis, 16(3):670–681, 2013.
25. KB Oldham and J Spanier. (1974). the fractional calculus: Theory and ap-
plications of differentiation and integration to arbitrary order. new york: Aca-
demic.(republished by mineola. 2006.
26. N Hema Rajini and R Bhavani. Classification of mri brain images using k-nearest
neighbor and artificial neural network. In Recent Trends in Information Technology
(ICRTIT), 2011 International Conference on, pages 563–568. IEEE, 2011.
27. Lynn M Fletcher-Heath, Lawrence O Hall, Dmitry B Goldgof, and F Reed
Murtagh. Automatic segmentation of non-enhancing brain tumors in magnetic
resonance images. Artificial intelligence in medicine, 21(1):43–63, 2001.
28. Florin Gorunescu. Data mining techniques in computer-aided diagnosis: Non-
invasive cancer detection. PWASET, 25:427–430, 2007.
29. Chen Wei and Fang Kangling. Multilevel thresholding algorithm based on par-
ticle swarm optimization for image segmentation. In 2008 27th Chinese Control
Conference, pages 348–351. IEEE, 2008.
30. William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d
surface construction algorithm. In ACM siggraph computer graphics, volume 21,
pages 163–169. ACM, 1987.
31. Stephen D Laycock, Graham D Bell, David B Mortimore, Mark K Greco, Nick
Corps, and Irving Finkle. Combining x-ray micro-ct technology and 3d printing
for the digital preservation and study of a 19th century cantonese chess piece
with intricate internal structure. Journal on Computing and Cultural Heritage
(JOCCH), 5(4):13, 2012.
20 Mohammad Hashem Ryalat et al.

32. Kamal Hammouche, Moussa Diaf, and Patrick Siarry. A comparative study of
various meta-heuristic techniques applied to the multilevel thresholding problem.
Engineering Applications of Artificial Intelligence, 23(5):676–688, 2010.
33. PD Sathya and R Kayalvizhi. Pso-based tsallis thresholding selection procedure for
image segmentation. International Journal of Computer Applications, 5(4):39–46,
2010.

View publication stats

You might also like