Automatic Superpixel-Based Clustering for Color Image Segmentation Using q-Generalized Pareto Distribution under Linear Normalization and Hunger Games Search

: Superixel is one of the most efﬁcient of the image segmentation approaches that are widely used for different applications. In this paper, we developed an image segmentation based on superpixel and an automatic clustering using q-Generalized Pareto distribution under linear normalization (q-GPDL), called ASCQPHGS. The proposed method uses the superpixel algorithm to segment the given image, then the Density Peaks clustering (DPC) is employed to the results obtained from the superpixel algorithm to produce a decision graph. The Hunger games search (HGS) algorithm is employed as a clustering method to segment the image. The proposed method is evaluated using two different datasets, collected form Berkeley segmentation dataset and benchmark (BSDS500) and standford background dataset (SBD). More so, the proposed method is compared to several methods to verify its performance and efﬁciency. Overall, the proposed method showed signiﬁcant performance and it outperformed all compared methods using well-known performance metrics.


Introduction
Image Segmentation is a key component of various computer vision applications. It aims to divide a given image into perceptual regions, in which pixels in each region belong to a same visual object with small feature variations. Image segmentation approaches have been widely implemented in various applications, such as object detection [1,2], remote sensing images [3,4], medical images [5], agriculture image [6] and many other applications.
One of the most effective segmentation methods is called superpixel segmentation, which implements an over-segmentation on input images. The process of superpixel segmentation is to divide a given image into small, compact and regular regions, that contain pixels with similar texture, spatial positions brightness, color, and so on [7]. In contrast to other segmentation approaches, in general superpixel has strong boundary coherence and it is easy to control the produced segments [7]. Therefore, superpixel segmentation approach has received wide attentions and have been adopted in different applications, such as object tracking [8,9], boundary detection [10], object detection [11], and others [12][13][14][15][16].
Earlier, various methods have been adopted for image segmentation with superpixels. Levinshtein et al. [17] proposed a geometric flow algorithm depending on the local gradient of the image to initiate superpixels with uniform sizes and compactness. In [18], a method called USEQ was proposed for superpixel extraction. The spatial and color information were utilized to represent pixels and superpixels, and to reduce computational cost. After that they adopted a maximum posteriori estimation to generate superpixels. Di et al. [19] proposed a superpixel image segmentation method using a hierarchical multi-level segmentation scheme. They applied simple liner iterative clustering approach to segment the input image, and then they applied simple liner iterative clustering to further segment the generated superpixels. Finally, adjacent superpixels are merged depending on probability distribution similarity. More so, different images were considered to evaluate the proposed method, including Berkeley and 3Dircadb datasets. In literature, different machine learning and deep learning approaches have been adopted with superpixels for image segmentations. For example, in [20], superpixels method based on the unsupervised learning technique was employed for oropharyngeal cancer image segmentation. Mi and Chen [21] presented a superpixel-enhanced Deep Neural Forest (DNF) for semantic segmentation of remote sensing images. The DNF was developed to enhance classification accuracy, and a Superpixel-enhanced Region Module was developed to reduce noise. Huang and Ding [22] developed a generic image segmentation algorithm using the properties of a fully convolutional network and superpixels. Most recently, metaheuristic optimization algorithms also have been adopted in a few studies for superpixel segmentation, and they showed prominent performance. For example, Mittal and Saraswat [23] applied a modified gravitational search algorithm with superpixel clustering for nuclei segmentation. Moreover, Chakraborty and Mali [24] proposed superpixel based image segmentation for COVID-19 CT scan images using a modified flower pollination algorithm (FPA) with type 2 fuzzy clustering.
In general, the superpixel image segmentation based on clustering techniques have been established their performance in comparison with the other image segmentation methods. However, the main drawbacks of these clustering image segmentation method is the process of determine the number of clusters and their cluster centers. To tackling this limitation, several automatic clustering image segmentation have been developed. For example, the automatic fuzzy clustering method is presented in [25]. It is depends on using Density peaks clustering (DPC) to determine the number of clusters. In , authors presented a robust self-sparse fuzzy clustering and applied it to segmented the image using clustering techniques. These methods provided results better than those methods that required to determine the number of clusters.
However, these methods have some limitations that influence on its quality and still require more enhancements. For example, they are use the traditional DPC that depends on the linear generalized extreme value (GEV) distribution [26] to determine the cluster center. This traditional GEV is not more accurate since the estimation of the distribution based on extracted blocks maxima, considered by this approach, involves a loss of information.
Therefore, this motivated us to propose an alternative clustering method based on modified DPC using q-Generalized Pareto distribution under linear normalization (q-GPDL). In addition, using the Hunger Games Search (HGS) [27] to determine the cluster centers. HGS was inspired by the social animals' characteristics in searching for food. For each iteration, the HGS searches for an optimal location, similar to animals forage, and hunger values or weights simulate the impact of animals' hunger. It was evaluated with different optimization problems, and it achieved prominent performance compared to other swarm intelligence and MH algorithms.
In this study, we propose superpixel-Based automatic clustering method for color image segmentation. The developed method, named ASCQPHGS, starts by applying superpixel algorithm to presegmented the image. Followed by using the modified DPC based on GEVL to automatic determine the number of clusters. Then, the HGS generates a set of solutions and each of them represents the clustering centers. To evaluate the quality of each solution, the fitness function that uses CS-index is computed and the best of them is determined. The next process is to update the solutions using the operators of HGS and check the stop conditions and in case they are met then the best solution is used to segmented the image and compute the performance measures.
Therefore, the summary of the main contributions and novelty of this study are: • Proposed an superpixel-based automatic clustering method and applied it for color image segmentation. • Present an extension for Generalized Pareto distribution under linear normalization (GPDL), named q-GPDL. In addition, deduce its quantile function and estimate its parameters using Maximum Likelihood Estimation. • Improve the behavior of DPC by using q-GPDL. • Apply Hunger Games Search (HGS) as clustering method to determine the center of each cluster then segmented the image. • Evaluate the performance of the developed method using real-world datasets and compared it with other MH techniques and state-of-the-art methods.
The rest of this study is introduced as: In Section 2, preliminaries of Clustering problem formulation for image segmentation, q-Generalized Pareto distribution under linear normalization, and Hunger Games Search are introduced. Section 3 presents the proposed automatic superpixel clustering method for color image segmentation, and Section 4 introduces the comparison results and discussion of the developed method with other methods. Section 5 presents the conclusion and future work of this study.

Clustering Problem Formulation for Image Segmentation
With this section, the general formulation of the automatic clustering (AC) problem for image segmentation is introduced. The AC is defined as the process of dividing the image (I), which contains N X samples, into different K max clusters. This can be performed by maximizing the between-cluster variation simultaneous with minimizing the within-cluster variation [28].
So, the mathematical definition of AC problem can be formulated by assuming the image I contains N X samples X = [X 1 , X 2 , . . . , X N X ]. In addition, X i = [X i1 , X i2 , . . . , X iD ] where D is the total number of pixels. Then clustering approach aims to divid X into K max cluster (i.e., C 1 , C 2 , . . . , C K max ) subject to [28]: Density Peaks clustering (DPC) [29] is one of the most popular clustering techniques that can be used to solve different cluster problems. The main goal of DPC is to find the points that have the largest peaks of density. DPC assumes the cluster centers are those points that have density higher than others in their neighbors. As well as, the distance between the clustering centers is larger than the distance between them and other points.
The mathematical representation of DPC is given as: consider the given image (data) X = [X 1 , X 2 , . . . , X n ] (where n is the number of samples belongs to X). The DPC starts by calculating the distance (d ij ) between X i and X j (i, j = 1, 2, . . . , n, and i = j). Then calculate the density ρ i of X i as: where d c is the cut-off distance and ξ is the kernel function which defined as: where β represents the parameter of ξ function. The next process is find the minimum distance (δ i ) as: From Equations (3) and (5), the clustering centers are those pixels that have high ρ and large δ. In addition, DPC has ability to avoid limitations of other techniques when the one cluster has two pixels that have high ρ with a small distance between them. Actually, the lead to divide the cluster into sub-clusters. So, DPC using the following formula to avoid this situation by considering the clustering centers are those have higher θ value than other pixels. where

Generalized Pareto Distribution under Linear Normalization (GPDL)
For extreme order statistics, the maximum of independent and identically distributed (i.i.d) random variables has one of the three types: Frichet type with heavy tail, Gumbel type, whose upper tail, and Weibull type with finite upper tail.
The generalized extreme value (GEVL) is a generalized family of the Gumbel, Frichet and Weibull depends on only one and it is formulated as: In Equation (8), k, σ and µ denote the shape, scale and location parameter, respectively. GEVL in Equation (8) has been applied to find the value of threshold to determine the optimal number of clustering centers. This main aim of this process is to enhance the quality of image segmentation [5].
Provost et al. [30] introduced the Cumulative Distribution Functions (cdf) and Probability Density Functions (pdf) of the q-GEVL and q-Gumbel (by setting ξ → 0 in the q-GEVL) are defined as in Equations (9) and (10), respectively: where s = 1 σ and m = µ σ . The generalized Pareto distribution under linear normalization (GPDL) is considered as a foremost pillar of the POT approach. The GPDL is the limit distribution of scaled excesses over high thresholds, which has the form 1 + log H(x; k, σ, µ).

Hunger Games Search
Hunger Games Search (HGS) is is a novel optimization algorithm enhanced by Yutao and Huiling [27].The algorithm emulates the animals conducts and hunger actions, where Hunger has the responsibility of one of the most crucial homeostatic motivations for decisions, behaviours, and actions in the life of animals.
HGS can be modeled as following, start with a population Z which has a number of solutions N for each of them, the objective function noted as Fit i as well as the finest solution noted as Z b . After initialization stage, modernization stage comes in which the previous solutions are modernized by utilizing the Equation (11), where through such stage, a cooperation among animals for reaching food is perfected.
where in the previous equation, r 1 and r 2 exemplify arbitrary numbers in addition to rand which exemplifies random normal distribution. The parameter R represents a number updated in the interval [−a, a] which is able to decide the searching interval where it depends on the entire iterations as: In Equation (12), T is the number of iterations. E exemplifies a coefficient, clarified in Equation (11), which corresponds the variation control for X and defined as: where Fit b is the best fitness value and Sech denotes the hyperbolic function (i.e., sech(x) = 2 e x −e −x ). Furthermore, W 1 and W 2 represent the weights of hunger clarified in Equations (14) and (15).
The parameters r 3 , r 4 and r 5 exemplifies arbitrary number in the range [0,1]. SH identifies the hungers feeling for all solutions sum given by: As well as, H i corresponds the hunger of each solution H i : The coefficient Fit b corresponds the finest objective value and Fit i corresponds the fitness of current solution X i . In addition, H n represents a new hunger given as: In Equation (18), hunger sensation H is restricted with lower boundary (LW). The last parameter Fit w corresponds the worst objective value and r 6 ∈ [0, 1] is arbitrary value corresponding to the negative or positive effects on hunger occurred by some factors. The steps of HGS are given in Algorithm 1.

Algorithm 1 Steps of HGS.
1: Insert the iterations number given by T, the solutions number given by N 2: initialize the population Z. 3: while t ≤ T do 4: calculate the objective value for the solutions Z i . 5: Modernize the value of H i using Equation (17)   7: Modernize W 1 and W 2 using Equations (14) and (15), respectively. 8: for i = 1 : N do 9: Modernize R using Equation (12). 10: Modernize E using Equation (13). 11: Update Z i using Equation (11). 12: end for 13:

Proposed Method
In this section, we introduce the developed method for color image segmentation based on superpixel and automatic clustering using q-Generalized Pareto distribution under linear normalization (q-GPDL) and Hunger Games Search. However, in the beginning we introduces the modified version of Generalized Pareto distribution under linear normalization that named q-GPDL. Since, it has been used to improve the behavior of DPC algorithm.

q-Generalized Pareto Distribution under Linear Normalization (q-GPDL)
In this paper, we introduce the q − GPDL which has the form 1 + log G(x; k, σ, µ, q). Then, the cdf and pdf of q − GPDL are respectively: and where k is the shape parameter, µ is the threshold value and σ is the scale parameter.

The Quantile Function
The quantile function of the q − GPDL(k = 0) and q − GPDL(k → 0 ) can be readily formulated as: In Equation (22), p is the probability of quantile. So, the point x i is assumed to be a clustering center in the case the the following criteria is met.

Maximum Likelihood Estimation (MLE)
To identify the parameters of the q-GPDL whose density functions are in Equation (21), one has to maximize log-likelihood function subject to its parameters. Suppose the observations x i , i = 1, . . . , n, so the log-likelihood of q-GPDL model is given by The system of the log-likelihood is given as: and (24).

Framework of the Developed ASCQPHGS Method
The stages of the developed method are given in Figure 1. First, the developed ASCQPHGS method performs a presegmentation for the given image using a superpixel algorithm since the time computational of using superpixel image is less than the using the pixel in original image. Then the DPC method is applied to the results obtained from superpixel algorithm to produce a decision-graph. The output of using decision-graph is two groups and those ones that have the largest ρ and δ are considered as centers of clustering. Finally, the proposed HGS as clustering method is used to segment the image. In this stage, HGS starts by producing a set of N agents which contains the cluster centers. Then the fitness value for each agent is computed and the best of them is determined. The next step is to update the agents using the operators of HGS as discussed in Section 2.3 until reached to the stop conditions. Thereafter, the best solution that represents the cluster center is used to segmented the image and the quality of segmented image is computed using different performance metrics.
The details of each stages of the developed ASCQPHGS as a image segmentation approach are given in the following.

Initial Stage
Within this stage, the developed methods starts by receiving the tested image (I). Then the DPC is applied since it performs clustering nearly in semiautomatic form and the number of clusters can be determined based on decision-graph (DG). However, the DPC produces similarity matrix with large size that leads to high computational cost and memory overflow, in addition to forget the spatial information of I. To tackling this problems, the superpixel methods can be used to reduce the similarity matrix since they have ability to maintain the structuring information and the texture of image. After that, the DPC based on QGEVL is used to automatically determine the number of cluster. In the first step of this stage, we following [31] by applying the multiscale morphological gradient reconstruction based watershed transform (MMGRWT) as a superpixel algorithm, since it established its efficiency as discussed in [25]. The output of MMGRWT is an image superpixel matrix with smaller size than original image. The next step is to calculate the value of ρ using Equation (3) and the value of δ using Equation (5). The third step is to determine the value of θ as defined in Equation (6) based on the maximum likelihood approach to identify the the parameters of QGEVL using θ as input. Then the number of cluster centers (K max ) are determined by using Equation (23).

Encoding of Solution in HGS
The HGS starts by setting the initial value for a set of N agents and each of them represent the cluster centers. For the input matrix (S ∈ R N S ×D ), that obtained from using superpixel algorithm, the dimension (D X ) of each agent Z i is K max × D. Therefore, the encoding of each agent can be formulated as: where C ij is the jth cluster center of the solution i. For clarity, consider S ∈ R 2 (i.e., 2D dataset) and K max = 4, and Z i = [15.8, 11.1, 3.5, 9.3, 2.4, 5.7, 12.3, 8.9]. This indicates that the centers of the first cluster is (15.8, 11.1), second cluster is (3.5, 9.3), third cluster is (2.4, 5.7), and fourth cluster is (12.3, 8.9).

Compute Fitness Value
To compute the fitness value for each agent Z i ∈ Z, we using the CS-index (CSI) that defined as [32]: In the first step of this stage, we following [31] by applying the multiscale morphological gradient reconstruction based watershed transform (MMGRWT) as a superpixel algorithm, since it established its efficiency as discussed in [25]. The output of MMGRWT is an image superpixel matrix with smaller size than original image. The next step is to calculate the value of ρ using Equation (3) and the value of δ using Equation (5). The third step is to determine the value of θ as defined in Equation (6) based on the maximum likelihood approach to identify the the parameters of QGEVL using θ as input. Then the number of cluster centers (K max ) are determined by using Equation (23).

Encoding of Solution in HGS
The HGS starts by setting the initial value for a set of N agents and each of them represent the cluster centers. For the input matrix (S ∈ R N S ×D ), that obtained from using superpixel algorithm, the dimension (D X ) of each agent Z i is K max × D. Therefore, the encoding of each agent can be formulated as: where C ij is the jth cluster center of the solution i. For clarity, consider S ∈ R 2 (i.e., 2D dataset) and K max = 4, and Z i = [15.8, 11.1, 3.5, 9.3, 2.4, 5.7, 12.3, 8.9]. This indicates that the centers of the first cluster is (15.8, 11.1), second cluster is (3.5, 9.3), third cluster is (2.4, 5.7), and fourth cluster is (12.3, 8.9).

Compute Fitness Value
To compute the fitness value for each agent Z i ∈ Z, we using the CS-index (CSI) that defined as [32]: In Equation (30), |C k | denotes the total samples in C k . k = [1, 2, . . . , K max ] denotes the index of cluster center that doesn't equal to k.

Update Population
The first step in this phase, is to find the best agent Z b that has the smallest CSI. Then using the operators of HGS to update the value of agents Z as given in Algorithm 2. The steps of updating the agents are repeated gain till reached to the terminal conditions and returning Z b . Thereafter, image is segmented based on the value of Z b and the quality of segmentation is computed using different the performance measures.

Algorithm 2
Steps of developed ASCQPHGS clustering for color segmentation.
1: Insert the color image I, determine total number of iterations T, total number of solutions N 2: Apply the superpixel MMGRWT algorithm to reduce the size of original image I. 3: Compute the value of ρ using Equation (3) and δ using Equation (5). 4: Determine the value of θ using Equation (6) and the MLE to identify the parameters of QGEVL using θ as input. 5: Determine the number of clusters (K max ) using Equation (23). 6: Generate population Z according to (K max ) as defined in Equation (29). 7: t = 1 8: while t ≤ T do 9: Compute fitness value for Z i , i = 1, 2, . . . , N as defined in Equation (30). 10: Find the finest solution Z b , which has the smallest Fit b and determine the worst fitness Fit W .

Experimental and Results
To evaluate the performance of the developed method, a set of different MH techniques are used in the comparison. For example, Slime mould algorithm (SMA) [33], Barnacles mating optimizer (BMO) [34], atom search optimization (ASO) [35], ASO based on particle swarm optimization (ASOPSO) [36], Hunger games search (HGS) [37]. In addition, the automatic fuzzy clustering framework (FCM) [25], and Density Peaks clustering (DPC) [29]. In addition, we compare the results of developed method with the modified version of FCM and DPC using the QGEV and this modifications given as FCMQGPDL and DPCQGPDL, respectively. The parameter setting of these algorithms depends on the original implementation of each of them. In addition, there are three parameters for FCM namely maximal number of iterations (is 50), minimal error threshold (10 −5 ) and the weighting exponent (is 2).

Datasets Description
Within this section, we used two real-world dataset images to assess the performance of the developed method. The images in the first dataset are collected from Berkeley from four to nine and each of these ground truth is obtained by one human subject. The Stanford background dataset (SBD) [39] is the second dataset and it contains 715 images which represents an outdoor images. Figure 3 shows an example of four images from this type of images. In these images, there are objects with vague foreground boundaries, multiple foreground objects and the accommodation of detailed background regions in ground truth segmentations. This makes these images are more challenging when applied to evaluate the superpixels segmentation methods.

Performance Metrics
A set of performance metrics are used to measure the quality of the competitive segmentation approaches. These metrics are probabilistic rand index (PRI), the variation of information (VI), the global consistency error (GCE), and the boundary displacement error (BDE) [40]. The definition of these metrics are given in the following: 1.
probabilistic rand index (PRI): It computes the the similarity of labels and it is applied to compute the classification of pixel-wise.
where c ij and p ij denote the event that pixels i and j have the same label and its probability.

2.
variation of information (VOI): is applied for clustering comparison and it depends on the distance of the conditional entropy between results of two clusters.
global consistency error (GCE): It measures the global error between two segmented images that are mutually consistent. 4.
boundary displacement error (BDE): It computes the average of the displacement error of pixels between two segmented images.
In general, the algorithm that provides higher PRI with low value of VOI, BDE, and GCE is considered the best one.

Results and Discussion
The comparison results between the developed method and other methods using BSDS500 are given in Table 1. It can be observed that the developed HGS provides better results than other methods in terms of performance measures. In terms of RI, VOI, and BDE, the ASOPSO allocates the second rank, followed HGS, which provides results better than other MH techniques. However, the BMO provides better results than other MH methods in terms of GCE.
Moreover, the comparative results of the developed HGS with other models using SBD dataset are given in Table 2. One can be seen from these results that HGS provides better results in terms of RI, VOI, and BDE. However, the FCM based on QGEV provides results better than other methods in terms of GCE. Figure 4 depicts the average of the developed method and other methods among the tested two real-world images datasets. From these results it can be seen that the developed ASCQPHGS image segmentation method provides better average among the two datasets in terms of all performance measures.  For further analysis the performance of the developed method, the non-parametric Friedman test is applied to the obtained results. This test is used to determine if there is a significant difference between ASCQPHGS and other algorithms or not. This decision is taken based on the p-value obtained by Friedman test and in case of the p-value is less than 0.05, then there is a significant difference. Otherwise (i.e., p-value > 0.05), this indicates there is no a significant difference between ASCQPHGS and competitive algorithms. Table 3 depicts the mean rank obtained by Friedman test for each algorithm over the two tested datasets (i.e., SBD and BSD500). It can be observed from these results that the developed ASCQPHGS has the largest mean rank in terms of RI, and smallest mean rank in terms of VOI, GCE, and BDE. In addition, ASOPSO allocates the second rank in terms of RI, followed by modified version of FCM (i.e., FCMQGPDL). Meanwhile, in terms of VOI, each of SMA and ASO allocates the second rank, followed by DPCQGPDL and ASOPSO. In terms of GCE, FCM, BMO, and SMA allocate the second, third, and fourth rank, respectively. Finally, the FCMQGPDL, ASOPSO, and DPCQGPDL acheive the second, third, and fourth rank, respectively.  Figures 5 and 6 depict the segmentation of I4 BSDS500 and I1 BSD from BSDS500 and BSD datasets. It can be seen from this segmentation, the high ability of the developed method to split the objects inside the image. In addition, the influence of q-GPDL is better than other traditional GEV.

Comparison with Literature Works
The results of the ASCQPHGS method is compared with a set of well-known superpixel cluster methods that have been applied to segmented the BSDS500 dataset. The methods including FCM [41], Superpixel-based fast FCM (SFFCM) [31], Significantly fast and robust FCM (FRFCM) [42], Neighbourhood weighted FCM (NWFCM) [43], Adaptive FCM based on local noise detecting (NDFCM) [44], A fuzzy clustering approach toward hidden Markov random field models for enhanced spatially constrained (HMRF-FCM) [45], fast and robust FCM algorithms incorporating local information (FGFCM) [46], A robust fuzzy local information C-means clustering (FLICM) [47], A possibilistic FCM (PFCM) [48], General type-2 FCM for uncertain fuzzy clustering (MSFCM) [49], FCM with local information and kernel metric (KWFLICM) [50], A novel type-2 FCM (AWSFCM) [51]. Table 4 shows the comparison between the results of developed method and the collected results of other literature works. From these results, we observed that the developed ASCQPHGS has better results than other methods in terms of performance measures. The main reason of this high quality of the developed ASCQPHGS is combining the behaviour of superpixel algorithm that leads to decrease the computational time and memory requirements. As well as, using the modified version of DPC based on Generalized Extreme Types Under Linear Normalization (GEVL).

Conclusions
In this paper, an alternative color image segmentation method has been developed. This method depends on using the superixel algorithm to reduce the memory requirements. In addition, to determine the number of clusters, a modified version of density peak clustering algorithm has been introduced based on a definition of Generalized Pareto distribution under linear normalization (GPDL), named q-GPDL. This distribution avoid the limitations of traditional generalized extreme value that used in DPC. Finally, to determine the cluster centers, the Hunger Games Search has been used since it has high ability to explore the search space which leads to enhance the convergence towards the optimal solution. The comparison results between the developed method and other methods based on metaheuristic techniques have been conducted using two real image datasets named BSDS500 and Stanford background dataset (SBD). These results provide evident about the superiority of the developed method over either the MH techniques or the state-of-the-art methods.
Besides, the developed method can be applied in future to different clustering-based image segmentation problems. In addition, it can be extent as multi-objective clustering optimization problems. Also, it can applied to different applications such as remote sensing, medical image classification and others.