Object Boundary Detection Using Active Contour Model via Multiswarm PSO with Fuzzy-Rule Based Adaptation of Inertia Factor

Active contour models, colloquially known as snakes, are quite popular for several applications such as object boundary detection, image segmentation, object tracking, and classification via energyminimization.While energyminimizationmay be accomplished using traditional optimization methods, approaches based on nature-inspired evolutionary algorithms have been developed in recent years. One such evolutionary algorithm that has been used extensively in active contours is the particle swarm optimization (PSO).However, conventional PSO converges slowly and gets trapped in localminimumeasily which results in inaccurate detection of concavities in the object boundary. This is taken care of by using proposed multiswarm PSO in which a swarm is set for every control point in the snake and then all the swarms search for their best points simultaneously through information sharing among them.Theperformance of themultiswarmPSO-based search process is further enhanced by using dynamic adaptation of the inertia factor. In this paper, we propose using a set of fuzzy rules to adjust the inertia weight on the basis of the current normalized snake energy and the current value of inertia. Experimental results demonstrate the effectiveness of the proposed method compared to conventional approaches.


Introduction
Active contours are deformable models that were introduced by Kass et al. for automatic object boundary detection [1].The active contour model is an energy minimizing problem induced by specific image features such as the edge and shape information.The active contour model gradually evolves the final contour of the desired object by minimizing energy terms such as the internal and the external energy.In a digital image, these energy terms are computed from object features at some discrete points known as the control points; the contour is a spline curve fitted through these control points.As the energy terms computed at these points are minimized, they gradually move towards the desired object boundary.Thus, starting from an initial contour, the contour deforms iteratively and in the end shrinks to wrap around the object.
One of the many concerns with the active contour model is the local minimum problem.The energy minimization procedure depends on the initial choice of the control points and hence, in case of inappropriate initialization, is highly prone to getting trapped in local minima.There are two issues associated with initialization and convergence of the active contour algorithm.First, the initial control points must generally be chosen close to the true boundary.Otherwise, the contour is likely to converge to a wrong result.The second problem is that active contours generally find it difficult to capture concave boundaries.In view of this, various approaches for snake implementation have been proposed in the literature that aim at enlarging the search space so as to enable the active contours to progress into the object concavities thereby capturing the true object boundary.
Williams and Shah [2] did an early attempt in implementing active contour using greedy algorithm for faster convergence.Another early work in this direction was proposed by Cohen [3] in which the external forces that push the curve to the edges are modified to give a more stable result.The model 2 Advances in Fuzzy Systems makes the curve behave like a balloon which is inflated by an additional force.Wang et al. [4] presented multistage, optimal active contour model by using spline representation and dividing the energy minimization process into multiple stages.Yezzi Jr. et al. [5] proposed geometric snake model for segmentation of medical images.This method is based on defining feature-based metrics on a given image.An active contour algorithm with the objective of better localization was developed by Xu and Prince [6].This method uses a new external force for active contour, called the gradient vector flow (GVF), which is computed as the diffusion of the gradient vectors of the edge map derived from the image.A "Segmented Snake" approach was proposed by Wong et al. in [7].In this, the problem of global optimization of the closed snake curve is converted into local optimization of a number of open Segmented Snake curves.A "Directional Snake" model is presented in [8] which considers both the gradient strength and the gradient direction of the image to guide the snake towards the appropriate edges.Chan and Vese proposed active contour without edges in [9].This model detects objects whose boundaries are not defined by gradient.Energy minimization is done as a case of minimal partition problem using level set formulation.In [10], Park and Keller presented a method for initialization of the snake using watershed transformation following which a coarseto-fine strategy is used to finally capture the object boundary.[11].This object segmentation scheme is useful for tracking moving objects in a sequence of images.Adaptive snakes using expectation maximization (EM) algorithm were presented in [12].The EM algorithm is used to update the confidence degrees associated with edge points and to estimate the object contour.Kim et al. [13] proposed object contour tracking by insertion of new points and deletion of unnecessary points to better describe and track the object's boundary.They used more points in highly curved parts of the contour and fewer points in less curved parts.Venkatesh et al. [14] proposed multiple contour extraction using artificial neural network by splitting a single contour into as many subcontours as the objects in the image.

Goldenberg et al. proposed a fast version of the geodesic active contour model in
Although the above modifications to the traditional optimization procedure work well, they are plagued by increased computational cost.The extra energy terms and/or the complex processes involved in these methods increase the computational cost.This has motivated looking for some nonconventional techniques in optimizing the active contour model.Recently, nature-inspired evolutionary algorithms like particle swarm optimization (PSO), bacterial foraging algorithm (BFA), ant colony optimization (ACO), genetic algorithm (GA), and so forth, have been applied in solving many complex problems including the active contour model.GA approach to active contour [15,16], ACO-based active contour [17], active contour using dynamic evolutionary algorithm [18], and active contour with honey bee mating optimization [19][20][21][22] employing PSO are some of the examples.Wang et al. [17] use ACO to search for the best path in a constrained region and reach the best feasible boundary with minimum energy function value.Horng et al. [19] used honey bee mating optimization for active contour.Each active contour contains a chromosome that includes several genes as well as the control points of active contour.These control points are moved iteratively by minimizing the total energy of the active contour.Novo et al. [23] proposed the segmentation model that uses Differential Evolution as an evolutionary method that minimizes the decisions of the designer.Discrete particle swarm optimization algorithm to solve the branch-cut phase unwrapping problem of MRI data has been proposed by He et al. [24].Cruz-Aceves et al. [25] proposed a novel Cardiac medical image segmentation method based on multiple active contours driven by particle swarm optimization.Xia et al. [26] proposed an improved active contour without edges to detect boundary in a given image, based on the techniques of curve evolution.A novel hybrid region-based active contour model is presented in [27] to segment medical images with intensity inhomogeneity.Boonnuk et al. [28] proposed active contour model with edge flow for texture segmentation to give better quality.Bilqis and Widita [29] studied segmentation comparison between fast marching and geodesic active contours.Results proved that the active contours method has slightly higher accuracy and sensitivity values than the fast marching method.
We recently proposed active contour model using multiswarm PSO in which the inertia factor is adaptively varied using fuzzy rules [30].This eventually facilitates gradual transition from global to local search as the control points move nearer to the object boundary.In this paper, we give a detailed description of our earlier proposed active contour model.Theory of the basic active contour model is given in Section 2 followed by existing PSO-based active contour models in Section 3. Section 4 presents our proposed method of multiswarm PSO and fuzzy-rule based adaptation of inertia factor in the multiswarm PSO process.Section 5 gives detailed description of implementation steps of multiswarm PSO with fuzzy adaptive inertia.Experimental results in the support of our proposed method and comparison are given in Section 6 while we draw our conclusion in Section 7.

Active Contour Model
Basic snake model [1] is a spline under the influence of internal and external image forces.Image forces push the snake towards the image salient features such as edges and lines.Snake is a closed curve and representing the position of points parametrically by V() = ((), ()) and energy functional can be written as where  int represents the internal energy of spline and  ext generates image forces.The internal spline energy and the external image energy are represented as where , , and Γ are weights of the energy components, Δ(V()) is the gradient of the image intensity at V(), and V  () and V  () represent the first and the second derivatives of V(), respectively.In case of digital images, spatial discretization of the contour at  distinct control points is done by the standard finite difference operators.Accordingly, internal and external energy terms are redefined in discrete domain using these transformations as Finally, the discrete form of the snake energy is written as the sum of internal and external energies as where   is the local energy at the th control point, defined as − Γ     Δ (  ,   )     2 . (7)

Existing PSO-Based Active Contour Models
Particle swarm optimization (PSO) is a population based evolutionary algorithm developed by Kennedy and Eberhart [31].In this, the candidate solution, termed particles, explores the search space thoroughly to reach the point in the search space at which the objective function is minimum.In this process, velocity is constantly adjusted according to the concerned particles self-experience and global best information available from neighboring particles.Motivated by this idea of PSO, Zeng and Zhou [20] proposed an active contour model (ACM) that is based on invariant snake topology driven by PSO.This method uses swarm particles as control points on the contour to capture the object boundary.Later, Tseng et al. proposed using multipopulation PSO [21] for active contours so as to enhance the concavity searching ability.In another piece of work, snake driven PSO is used for segmenting medical images [22].In this, snake movement around the object of interest is guided by modified velocity update equation of PSO.
In multipopulation PSO method for active contour model, control points are initialized around the boundary of the object in a manner same as in any conventional method for active contour model.Let the total number of control points around the object be  and each control point is designated as q  = (  ,   ).The total snake energy is calculated as per ( 6) and ( 7) and subsequently minimized using particle swarm optimization.A swarm Q  , having  number of particles, is initialized around control point q  .During the optimization process, the swarm Q  takes part in the energy minimization process.This is done by iterating PSO over the swarm Q  at the th control point q  for some fixed number of generations.
In mathematical terms, PSO dynamics for the th swarm particle of the th swarm (corresponding to the th control point) is expressed as follows: where  is the inertia factor of the swarm,  1 and  2 are positive constants,  1 and  2 are random numbers between [0, 1], p , () is the position of the th particle in the th swarm after the th iteration, V , () is velocity of the th particle in the th swarm during th iteration,  , () denotes the best position of the th particle in the th swarm till th iteration, and   () denotes the best position of the whole population of the th swarm till th iteration.Since the swarm is set in the two-dimensional space corresponding to the image plane, the swarm particles move along the image plane and hence the velocity V , () consists of two components corresponding to the displacements along the horizontal (axis) and vertical (-axis) directions in the image plane.The cost associated with the th swarm particle in the th swarm (p , ) is defined as Once the swarm Q  converges to the final   , the location of the control point q  is updated to this   position.This process is performed for all the  control points sequentially.That is, swarms are set around the control points q 1 , q 2 , q 3 , . . ., q  and the PSO process is repeated for every swarm.This way, one round of optimization is performed.Further rounds of this process are repeated for further energy minimization starting from control point q 1 and continued to q  in every round.These rounds of optimization (snake energy minimization) are carried on for a predecided fixed number of rounds or till there is no more significant decrease in the total snake energy  snake .The final object contour is obtained by passing a spline through the coordinates of the  control points (final   location for all  = 1, 2, . . ., ) at the end of all rounds of optimization.

Proposed Method of Multiswarm PSO with
Fuzzy Adaptive Inertia  control points fixed.In order to alleviate this problem, it seems to be reasonable, justified, and effective if the control points are updated simultaneously.In view of this, we propose a multiswarm PSO-based active contour model in which multiple swarms, one swarm at every control point, look for the best position of the control points simultaneously via cooperation and information sharing among themselves.
Flow chart illustrating our proposed multiswarm PSObased active contour model is given in Figure 1 and drawn as per [32].
Traditional active contour model has limitation in searching for boundary concavities.Our proposed PSO-based active contour model provides better movement of particles to enhance search ability but still the search capability is restricted due to the nonadaptive nature of the inertia value.Inertia plays key role in the PSO implementation.Inertia factor is used to balance the global and local search ability.High value of inertia causes the swarm particles to fly/swim a larger distance from one generation to the next thereby aiding in better and wider exploration of the search space.This is particularly important where the search space is large.On the other hand, it is desired that the swarm particles make very small displacements when the swarm is very close to the point of global minimum.This guarantees better stabilization and convergence of the algorithm.Thus, using a fixed high or low inertia factor, as used in [21], may not result in good convergence.Accordingly, we propose improving the performance of the search process by using dynamic adaptation of the inertia factor.We propose using a set of fuzzy rules to adjust the inertia weight on the basis of the current normalized snake energy and the current value of inertia of the swarm particles.This eventually facilitates gradual transition from global to local search as the control points move nearer to the object boundary.
As discussed above, the inertia factor  plays a vital role in achieving better convergence.High value of inertia is used for better global exploration in search of the minimum energy point.Nevertheless, such high value is less desired near points where energy minimization is almost complete so that the contour stabilizes for better capture of the object.On the other hand, low inertia values during the initial phase may lead to the contour trapped in local minimum.Hence, an adaptive PSO with adjustable inertia factor is desired.One popularly used strategy is to reduce the inertia at a linear rate as the search progresses so that local exploration is preferred over global search in the later stage of the search process.A variation to this is to use a nonlinear change in inertia, as proposed in [33].However, setting the rate of change in inertia to an appropriate value is again a question.Fuzzy adaptive particle swarm optimization introduced in [34,35] uses a set of fuzzy rules for dynamic adaptation of the inertia.This way, inertia of all particles in a swarm (  ) is modified dynamically as per the current search result.Following the idea in [34,35], we propose a fuzzy-rule based adaptation to the multiswarm PSO technique for active contour model given in [21].In our work, we define a set of fuzzy rules to adjust the inertia weight on the basis of the current normalized snake energy and the current value of inertia.
In our proposed approach, we first calculate the normalized energy at all control points and the same is calculated after every round of PSO generation as follows: where  snake is calculated using (6) after every PSO generation and  max is the sanke enrgy due to the initial configuration of the control points.This normalized energy value  norm and the current value of the inertia  for the swarm are then Thus, our fuzzy inference system is a two-input and oneoutput system: two input variables (antecedent clauses) are the normalized energy  norm term and the current inertia ; and the resultant output variable (consequent clause) is the desired change in the inertia value Δ.Antecedent clauses are linked by fuzzy AND operators.Three fuzzy sets for the antecedents and three fuzzy sets for the consequent clauses are used, as represented in Figures 2, 3, and 4. Fuzzy sets for the antecedents are labeled as "low," "medium," and "high."Fuzzy sets for the consequent clauses are "negative," "zero," and "positive" representing corresponding change in inertia value.The range of values for all three fuzzy sets has been taken as per [35].Normalized energy is represented between 0 and 1 and inertia value is represented between 0.4 and 1.0.Output variable is in the form of change in inertia value and this variation is done between −0.1 and +0.1.Thus, the extent by which the inertia value needs to be updated is estimated on the basis of the present snake energy and the inertia value.Thus, this strategy of varying inertia value adaptively gives a trade-off between global and local exploration.The above set of fuzzy rules are eventually combined using Mamdani's max-min deductive fuzzy inference mechanism followed by centroid-based defuzzification to obtain the value of the desired Δ.A detailed description of the inference mechanism can be found in [36].Flow chart of our proposed active contour model by using multiswarm PSO with fuzzy adaptive inertia factor is drawn in Figure 5.

Implementation Steps of Multiswarm PSO with Fuzzy Adaptive Inertia
(1) Set PSO parameters.Calculate the image gradient at each pixel location by using the Laplacian operator.This gives the value of the external snake energy at each pixel location, as defined in ( 5).
(2) Initialize  number of control points in a clockwise order and number these control points accordingly.
(4) Set a swarm (containing  number of particles) at each control point q  in such a manner that the position of the th swarm particle p , associated with the th swarm is adequately close to q  so as to ensure that the control points do not cross over as the snake moves in the next step.In our algorithm, in order to ensure that no cross-over takes place, every particle of a swarm is taken such that the following condition is satisfied: where ‖u, v‖ denotes the Euclidean distance between vectors u and v.This condition essentially divides the whole image plane into  nonoverlapping Voronoi regions, each region corresponding to every control point q  ,  = 1, 2, . . ., .Thus, all the particles in the th swarm Q  are always restricted within the th Voronoi region that also contains the th control point q  .Since, the position of the particles of the swarm Q  are the candidates for the new location of the control point q  in the next step, it is guaranteed that no crossover will take place as the snake moves from one step to the next step.
(5) Run PSO for the first generation by taking all initial particle positions as  , and update   values and control point q  locations.
(6) Calculate velocity and then move swarm particles for the next generation, starting from the first swarm associated with the first control point and continuing till the last control point, as per (8).Based on these new positions of the particles, check fitness of all particles using (9) and accordingly update  , and   values.Declare position of   particle as the updated location of th control point.(7) Calculate snake energy at all control points (  points) and  norm  for all control points.Next, using  norm  and   values together with the set of fuzzy rules, as described above, update  =  + Δ for all control points.These new values of swarm inertia are to be used in the next generation of PSO.
(8) For starting the next PSO generation round at all control points, go back to Step (6) and run PSO using the velocity and position of the particles obtained in the previous generation.Repeat till maximum number of generations are complete or until total snake energy stabilizes.

Experimental Results and Comparison
In our experiments, we applied our proposed fuzzy adaptive multiswarm PSO method on four images and our method is compared with the traditional snake [1], multipopulation PSO-based method, as given in [21], and our  proposed multiswarm PSO method.In the first set of experiments, four images were taken."Star" and "Vase" images are of sharp boundaries."Peppers" and "MRI" images are taken as complex real images.The final snake energies obtained in all these cases are tabulated in Table 1.
As far as results are concerned, our proposed method is able to achieve better energy minimization compared to the other methods.This verifies the efficacy of our proposed method for catching up with concave image boundaries.Results show that our proposed multiswarm PSO method is better than the traditional snake and the multipopulation PSO-based methods.Our proposed multiswarm PSO helps in more stable convergence and better minimization of snake energy due to the parallel nature of the algorithm.
In the next set of experiments, we demonstrate the effectiveness of the proposed fuzzy based inertia adaptation scheme.For this, we compare our proposed PSO-based active contour models with multipopulation PSO method [21] using six different cases of inertia factor variations, as listed below.
Case 3. Linearly varying inertia using index  = 1.0 in (12).Nonlinear variation of inertia factor for dynamic adaptation in PSO has been discussed in [33] in which the inertia factor is adapted as where linear or nonlinear variation is decided by proper choice of the index value "".In our experiments,  initial = 0.95,  final = 0.4, and iter is the iteration number in the PSO algorithm.Here one PSO iteration means one complete round of PSO optimization through all control points for multiswarm implementation.In case of multiswarm PSO, in each iteration, PSO runs for one generation only at each control point.To maintain fair comparison, region of swarm initialization as well as number of control points and number of particles in each swarm are taken same in all the above listed cases for one image.
Experiments have been performed on the same set of four images by using three methods, namely, multipopulation PSO, proposed multiswarm PSO, and proposed fuzzy adaptive multiswarm PSO-based method, with all the above six cases of inertia.Final contour energies obtained in these methods are given in Tables 2-3.Total contour energy versus computation time plots for all the above six cases for three images are plotted in   High or low inertia values are to some extent capable of capturing concavities.Results are generally better when inertia factor is varied linearly or nonlinearly in comparison to the fixed low or high value.Results show that our proposed fuzzy adaptive multiswarm PSO-based method is always able to provide better energy minimization than the   multipopulation PSO method.Our proposed fuzzy adaptive multiswarm PSO method is capable of capturing the true boundaries including the concavities at the cost of increased computational time.
As we observe in the contour energy versus computation time plots given in Figures 6-11, our proposed fuzzy

Figure 1 :
Figure 1: Flow chart of proposed multiswarm PSO-based active contour model.

Figure 3 :Figure 4 :
Figure 3: Membership function plots for fuzzy sets corresponding to low, medium, and high inertia ().

Figure 5 :
Figure 5: Flow chart of proposed active contour model by using multiswarm PSO with fuzzy adaptive inertia factor.
. Results obtained by multipopulation PSO-based method are shown in Figures 12-15 and results obtained by our proposed multiswarm PSObased method are shown in Figures 16-19 .

Figure 6 :
Figure 6: Contour energy versus computation time plot for "multipopulation PSO" method with six different cases of inertia in case of "Vase" image.

Figure 7 :
Figure 7: Contour energy versus computation time plot for "multipopulation PSO" method with six different cases of inertia in case of "Peppers" image.

Figure 8 :
Figure 8: Contour energy versus computation time plot for "multipopulation PSO" method with six different cases of inertia in case of "MRI" image.

Figure 9 :
Figure 9: Contour energy versus computation time plot for "proposed multiswarm PSO" method with six different cases of inertia in case of "Vase" image.

Figure 10 :
Figure 10: Contour energy versus computation time plot for "proposed multiswarm PSO" method with six different cases of inertia in case of "Peppers" image.

Figure 11 :
Figure 11: Contour energy versus computation time plot for "proposed multiswarm PSO" method with six different cases of inertia in case of "MRI" image.
PSO-based active contour model has been used extensively for image segmentation.However, the existing multipopulation PSO-based active contour model gets trapped in local minimum easily.The problem of local minimum results in inaccurate detection of concavities in the object boundary.In our proposed active contour model, we used multiswarm
Membership function plots for fuzzy sets corresponding to low, medium, and high normalized energy ( norm ).combined using fuzzy reasoning to determine the necessary change in the inertia value for use in the next round of PSO generation.For this, we formulate a set of nine "IF . . .THEN . .." fuzzy rules, as stated below.Our proposed method for fuzzy adaptive PSO uses deductive fuzzy inference system based on this set of nine fuzzy rules.
Rule 1. IF  norm is low AND  is low THEN Δ is zero.Rule 2. IF  norm is low AND  is medium THEN Δ is negative.Rule 3. IF  norm is low AND  is high THEN Δ is negative.Rule 4. IF  norm is medium AND  is low THEN Δ is positive.Rule 5. IF  norm is medium AND  is medium THEN Δ is zero.Rule 6. IF  norm is medium AND  is high THEN Δ is negative.Rule 7. IF  norm is high AND  is low THEN Δ is positive.Rule 8. IF  norm is high AND  is medium THEN Δ is zero.Rule 9. IF  norm is high AND  is high THEN Δ is negative.

Table 1 :
Minimum snake energy values obtained by different methods.

Table 2 :
Minimum snake energy values obtained by "multipopulation PSO" method for different cases of inertia.

Table 3 :
Minimum snake energy values obtained by "proposed multiswarm PSO" method for different cases of inertia.