Microsoft Word - 1300-Article Text-6397-1-18-20231013 Adv Syst Sci Appl 2023; 03; 164-176 Published online at https://ijassa.ipu.ru. Semantic Image Segmentation Using a Hybrid Genetic–Cuckoo Search Algorithm Alaa Abu Srhan1*, Mais Haj Qasem2, Hutaf Natoureah1, Aayat Shdaifat1 1) Department of Basic Science, Faculty of Science, The Hashemite University, Zarqa, Jordan 2)Faculty of Information Technology, Computer Science Department, Zarqa University, Jordan Abstract: Image segmentation is the process of dividing a given image into a set of regions or categories. The goal of image segmentation is to change the image representation into a form that is substantially meaningful and easy to analyze. Metaheuristic optimization algorithms are widely used algorithms for many applications among them is image segmentation. Genetic algorithm (GA) and cuckoo search (CS) algorithm are among the most popular metaheuristic algorithms. In this paper, a hybrid CS and GA (CSGA) has been used to perform image segmentation and object detection, then compared with other popular algorithms for image segmentation which are fuzzy C-mean (FCM), K-means algorithms, and GA. Simulation results of the statistical measures of the performance corroborate that CSGA outperforms other compared methods. Keywords: Cuckoo Search algorithm, Genetic algorithm, image segmentation, Fuzzy C-Means, K- Means algorithms. 1. INTRODUCTION Image segmentation refers to the process of dividing an image into a set of regions or categories, which correspond to different objects or parts of objects. Every pixel in an image is allocated to one of these categories. Tasks that use image segmentation aim to represent meaningful areas of the image, such as crops, urban areas, and forests shown in a satellite image [5]. In other analysis tasks, the regions can be sets of border pixels grouped into structures, such as line and circular arc segments in the images of 3D industrial objects [3]. Image segmentation aims to understand the image and extraction information from a particular image to accomplish certain tasks. Thus, image segmentation has important applications in digital image technology [25]. Recently, image segmentation has emerged as one of the hotspots in image processing and computer vision and an important basis for image recognition. Image segmentation has two objectives. The first objective is to decompose an image into parts for further analysis. In simple cases, the environment may be controlled sufficiently, such that the segmentation process reliably extracts only the parts that must be analyzed further. The second objective is to perform a change of representation. The pixels of an image must be organized into high-level units that are either substantially meaningful or efficient for further analysis [4]. Various techniques for image segmentation have been recognized by scientists and researchers. Therefore, several of these techniques are relatively popular, important, and regularly used for image segmentation. Image segmentation techniques can be categorized into two main approaches: Boundary-based (region delimitation) and Region-based methods (pixel clustering). The boundary-based methods focus on images edges while the region-based methods generate enclosed regions [11]. * Corresponding author: alaaa@hu.edu.jo 165 SEMANTIC IMAGE SEGMENTATION USING A HYBRID… Copyright ©2023 ASSA. Adv. in Systems Science and Appl. (2023) Metaheuristic algorithms are becoming an important component of modern optimization and their general-purpose stochastic procedures are designed to solve complex optimization problems [15]. These algorithms are approximate and often non-deterministic algorithms that guide a search process over the solution space. Unlike methods designed specifically for particular types of optimization tasks, metaheuristic algorithms are general purpose algorithms and require no particular knowledge of a problem structure other than the objective function itself [10]. Genetic algorithm (GA) and cuckoo search (CS) algorithm [1] are among the most popular metaheuristic optimization algorithms that are used to solve optimization problems. GA is an adaptive heuristic search algorithm based on the evolutionary ideas of natural selection and genetics. By contrast, the CS algorithm is a recently developed metaheuristic optimization algorithm that is used to solve optimization problems. In this study, a hybrid CS and GA (CSGA) will perform image segmentation [8]. CSGA combines the advantages of GA and CS. The main disadvantage of GA is that it is easily trapped within a local minimum [16]. Accordingly, CS is used to overcome the aforementioned drawback. The use of CS will enable a local search to be performed faster than GA [16]. Moreover, CS involves only a single parameter apart from the population size. The proposed algorithm will be compared with the FCM and K-means algorithms and GA. The rest of this paper is organized as follows. Section 2 reviews the studies that are closely related to image segmentation techniques in various applications. Section 3 presents the methodology of the current research. Section 4 presents the experimental results. Section 5 presents the conclusion. 2. RELATED WORK Scientists and researchers have developed various image segmentation techniques. Image segmentation is used in a wide variety of applications, such as content-based image retrieval, machine vision, medical imaging, object detection, and other related fields. Nerurkar [18] presented two of the most efficient and suitable segmentation algorithms for brain tumor detection application. This study detected brain tumor from the (Magnetic resonance imaging) MRI scans of a brain using two different segmentation algorithms, namely, k-means and region growing techniques. The MRI images of a brain were used in the aforementioned experiment and the two algorithms were compared with each other, thereby determining the ideal one based on accuracy. The preceding study concluded that the k-means method is easy and efficient but not as accurate as the region growing method. The region growing method, which proved to be more accurate than the k-means, provided a satisfiable segmentation and proved to be among the most ideal region-based segmentation methods. Singh and Misra [12] presented an algorithm for image segmentation technique for the automatic detection and classification of plant leaf diseases. They also conducted a survey on different disease classification techniques that can be used for the detection of plant leaf diseases. Moreover, these researchers used GA belonging to the evolutionary algorithms that generate solutions for optimization problems. K-means clustering and support vector machine were applied to process the images and obtain a variety of beneficial features needed for subsequent analysis. Their experimental results showed the efficiency of their proposed algorithm in recognizing and classifying leaf diseases. Another advantage of using their proposed method is that plant diseases can be identified in the early stage. Kaur and Kaur [28] proposed a new method for the segmentation of medical images to optimize the results of the FCM clustering algorithm by using a hybrid of GA and particle swarm optimization algorithm to optimize the parameters of FCM in medical images. These researchers compared their proposed method, FCM, and Kernel Fuzzy c-Means (KFCM) by using quality parameters, such as the Rand index, global consistency error, and variation. Their 166 A. ABU SRHAN, M. H. QASEM, H.S. NATOUREAH, A. SHDAIFAT Copyright ©2023 ASSA Adv. in Systems Science and Appl. (2023) comparison showed that their proposed method is better than the existing one and provided efficient and effective results. Zang et al. [2] proposed a novel DNA-based GA to learn the kernel intuitionistic fuzzy c- means (KIFCM) clustering for MRI image segmentation, particularly using the DNA-based GA to determine the optimal number of clusters needed. To determine the optimal number of clusters, these authors attempted to determine the optimal weight exponent (m) by optimizing the KIFCM parameters. Moreover, they performed an empirical study by comparing their new method with six existing state-of-the-art fuzzy clustering algorithms by using a set of UC Irvine Machine Learning Repository (UCI) data mining data sets, a set of synthetic MRI data, and a set of clinical MRI data sets. Their experimental result concluded that their new algorithm outperforms the compared algorithms in terms of clustering metrics and computational efficiency. Bosch et al. [22] proposed an image segmentation framework that uses color and low-level intensity cues and works on the entire space of the segmentation hypotheses or segmentation volume generated from various choices of parameters. These researchers employed multiple segmentations because they acknowledged that one set of parameters cannot work consistently for different scenes and images. Their approach defines a cost function based on two criteria: (1) segments that change constantly and abruptly in the segmentation volume receive larger penalties and (2) segments that do not match with natural image contours should be discouraged. Their results concluded that their proposed framework is robust to the choice of segmentation kernel that produces the initial set of hypotheses and capable of outperforming popular segmentation algorithms. Wang et al. [24] proposed a novel deep learning-based framework for interactive segmentation by incorporating convolutional neural networks (CNNs) into a bounding box and scribble-based segmentation pipeline. They proposed image-specific fine-tuning to make a CNN model adaptive to a specific test image, which can be either unsupervised or supervised, and proposed a weighted loss function by considering network and interaction-based uncertainty for the fine-tuning. These researchers applied their new framework on two applications, namely, 2D segmentation of multiple organs from fetal magnetic resonance (MR) slices and 3D segmentation of brain tumor and the entire brain from various MR sequences. Their experimental results showed that the new framework performs well on previously unseen objects. Xiong et al. [19] proposed a new algorithm for image segmentation on the basis of real- time color image segmentation method, which is based on color similarity in the RGB color space. These researchers discussed the proposed segmentation method application combined with color sensor in real-time color image segmentation for a cyber physical system (CPS) through the application in fire detection. Moreover, they summarized a new method in identifying fire in a video based on these characteristics. Their experiment result showed that their proposed method in vision-based fire detection and identification in videos was effective. In addition, their results were accurate and can be used in real-time analysis. Table 2.1 summarizes a set of the studies on image segmentation in various fields, which contains the techniques used in each study, the application that those techniques is applied for, the metrics used to measure the performance of each study, and "Compared with" (in each study the authors compared their proposed technique with other techniques in literatures). Table 2.1. Research on image segmentation Paper Techniques Application Measures Compared With [18] K-Means and Region Growing Brain Tumor Accuracy K-Means and Region Growing [12] Genetic Algorithm Plant Leaf Diseases Accuracy K-Means and SVM [28] Genetic Algorithm, Swarm, And FCM Medical Images Rand Index, Global Consistency Error and Variation KFCM and FCM 167 SEMANTIC IMAGE SEGMENTATION USING A HYBRID… Copyright ©2023 ASSA. Adv. in Systems Science and Appl. (2023) [2] Genetic Algorithm, Fuzzy C-Mean Clinic MRI Image Clustering Metrics and Computational Efficiency. GKFCM1, GKFCM2, FLICM, KWFLICM, MICO, and RSCFCM. [22] Graph-Based Segmentation Human-Labeled Segmentations BDE, PRI, VOI, and COV CCP, gPb-owt-ucm, Selective Search, and MS [24] Convolutional neural networks 2D, and 3D Brain Tumor Images Obstetrician, and Radiologist P-Net with FCN, U-Net, DeepMedic, HighRes3DNet, GrabCut, Slic-Seg, and Random Walks [19] Real-time color image segmentation Fire Detection Average Intensity Value Color similarity and Standard deviation According to Table 2.1, metaheuristic optimization algorithms are one of the most popular algorithms with promising results for image segmentation. GA is one of the most widely used metaheuristic optimization algorithms for solving optimization problems. Its primary drawback is that it is easily trapped within a local minimum [16]. To address this shortcoming, the current study will employ the hydride algorithm of CS and GA to perform local searches faster than [16]. As a result, aside from population size, CS is only single parameter. 3. METHODOLOGY This study aims to provide an empirical basis for research on image segmentation and boundary detection. Accordingly, we applied a hybrid algorithm called CSGA, which combines the advantages of GA and CS [8], on grayscale images and compared it with FCM, K-means, and GA by using the public Berkeley benchmark. This standard uses a human segmented image that provides ground truth boundaries to determine how well this soft boundary map approximates the ground truth boundaries in different algorithms. Figure 3.1 illustrates the methodology set up used in this study. The first step involves reading an image taken from an image segmentation benchmark. The second step entails performing segmentation using GACS. The third step involves performing segmentation using other segmentation methods. Lastly, the ground truth of the proposed method is compared with other methods using the following evaluation metrics: 1. Jaccard similarity coefficient [7]. This metric compares the members of two sets to determine which members are shared and which are distinct. This measure of similarity for two sets of data has a range from 0% to 100%. The higher the percentage, the more similar the two populations. The Jaccard equation is as follows: 𝐽(𝑋; 𝑌) = |𝑋 ∩ 𝑌| |𝑋 ∪ 𝑌| (3.1) 2. False Positive Ratio [27]. This metric involves the probability of falsely rejecting a null hypothesis for a particular test. The false positive ratio is calculated as the ratio between the number of negative events wrongly categorized as positive and the total number of actual negative events: 𝐹𝑃𝑅 = 𝐹𝑃 𝐹𝑃 + 𝑇𝑁 (3.2) where 𝐹𝑃 is the number of false positives, 𝑇𝑁 is the number of true negatives, and 𝑁 is the total number of negatives. 3. False Negative Ratio [27]. This test result indicates that a condition does not hold, even though it does in reality. The false negative ratio is the conditional probability of a negative test result and the condition being determined is presented by the following equation: 168 A. ABU SRHAN, M. H. QASEM, H.S. NATOUREAH, A. SHDAIFAT Copyright ©2023 ASSA Adv. in Systems Science and Appl. (2023) 𝐹𝑁𝑅 = 𝐹𝑁 𝑇𝑃 + 𝐹𝑁 (3.3) where 𝐹𝑁 is the number of false negative and 𝑇𝑃 is the number of true positive. Fig. 3.1. Methodology steps 3.1.Cuckoo Search Yang and Deb [27] developed a CS algorithm based on the Lévy flight and brood parasitic behaviors. This CS algorithm has been proven to deliver excellent performance in function optimization, engineering design, neural network training, and other continuous target optimization problems, as well as solved the knapsack and nurse-scheduling problems [27]. Cuckoo birds have an aggressive reproduction, in which the females hijack and lay their fertilized eggs in other birds’ nests. If the host bird discovers that the eggs do not belong to it, it either throws away or abandons its nest and builds a new one elsewhere [26]. Yang and Deb [21] explained that the CS algorithm is based on three assumptions. 1. Each cuckoo lays one egg at a time and places it in a randomly chosen nest. 2. The best nests with the highest quality of eggs (solutions) carry over to the next generations. 3. The number of available host nests is fixed and a host has a probability 𝑝  (0; 1) of discovering an alien egg. In this case, the host bird either throws out the egg or abandons the nest to build a new one in a different location. The third assumption can be approximated as a fraction: pa of the n nests replaced with new nests with new random solutions at different locations. The Lévy flight behavior, rather than a simple random walk behavior, can be used to enhance the performance of CS [20]. The following formula can describe the Lévy flight behavior when generating new solutions 𝑥 (𝑡 + 1) for the 𝑖 cuckoo [14]: 𝑥 (𝑡 + 1) = 𝑥 (𝑡) +  ⊙ 𝐿𝑒 𝑣𝑦() (3.4) where   0 is the final size that should be related to the problem of interest scale,  is the step-length, and the product ⊙ refers to an entry-wise multiplication (Hadamard product)[9]. The formula that describes the Lévy flight behavior in which the step lengths fit a probability distribution is as follows: 𝑙é𝑣𝑦() 𝑡 . (3.5) 169 SEMANTIC IMAGE SEGMENTATION USING A HYBRID… Copyright ©2023 ASSA. Adv. in Systems Science and Appl. (2023) The preceding formula indicates that cuckoo birds’ consecutive jumps or steps mainly form a random walking process that corresponds to a power-law step-length distribution with a heavy tail. Figure 3.2 shows the pseudocode of GA for image segmentation [13]. Fig. 3.2. CS pseudocode for Image Segmentation 3.2.Genetic Algorithm Artificial intelligence research within the computer science field produced GA, which is a heuristic search tool designed to mimic the natural process of evolution. This heuristic (or metaheuristic) is commonly used to generate beneficial solutions for optimization and search problems and often employs the natural techniques of evolution, such as inheritance, mutation, selection, and crossover. Holland [6] developed the formal theory of GA in the 1970s and continued enhancements in the price and performance value have made GA ideal for many problem-solving optimization methods. GA has been shown to perform well in mixed (i.e., continuous and discrete) combinatorial problems. Although GA easily become trapped in the local optima, this algorithm is computationally expensive and a probabilistic one. GA begins with a set of solutions represented by a group of chromosomes called population. A new population can be generated by borrowing solutions from a current population or by applying genetic operators, such as selection, crossover, and mutation to the current population. The new population must be better than the old one [23]. The function of genetic operators warrants considerably detailed attention. The selection operator selects two parent chromosomes from the population based on their fitness to participate in the next operations, crossover, and mutation. These steps are considered important in GA because they have a positive impact on the overall performance [17]. First, parents form new offspring (i.e., children) through crossover probability. Thereafter, the mutation operator randomly exchanges alleles, which is similar to what occurs in nature. To work well, GA requires the definition of three important aspects [6]: 1) objective function, 2) genetic representation and its implementation, and 3) genetic operators and their implementation. Figure 3.3 shows the pseudocode of GA for image segmentation [13]. Input∶ Original Image=I, 𝐁𝐞𝐠𝐢𝐧: Generate initial solutions While (tFj) {Replace host by the new cuckoo solution;} Abandon a fraction (Pa) of worse nests [new build new nest at new location via Levy flights]; Keep the nest with high quality solution; Rank the results and find the current best;} End 170 A. ABU SRHAN, M. H. QASEM, H.S. NATOUREAH, A. SHDAIFAT Copyright ©2023 ASSA Adv. in Systems Science and Appl. (2023) Fig. 3.3. GA pseudocode for Image Segmentation 1.3.CSGA Algorithm The proposed algorithm combines the advantages of GA and CS and overcomes the main disadvantage of GA of easily becoming trapped in the local minima through CS, which performs the local search faster than GA. In addition, CS has only a single parameter, along with population size [8]. CSGA has the following operations: 1) search new nest operator, 2) abandon operator, and 3) GA operation. CSGA starts with CS operations and proceeds thereafter to genetic operations. Thus, the initial population of GA is not generated randomly but it uses the results of CS. After the genetic operations are completed, the algorithm will start over. Figure 3.4 shows the pseudocode of the proposed Algorithm: Begin: Input an image Define GA parameters Define fitness function Generate initial population P0 Evaluate population P0 While (stopping GA criteria not satisfied) Repeat {Calculate fitness for each member Reproduction Crossover Mutation Evaluation (muted chromosomes)} End 171 SEMANTIC IMAGE SEGMENTATION USING A HYBRID… Copyright ©2023 ASSA. Adv. in Systems Science and Appl. (2023) Fig. 3.4. Pseudocode of the proposed Algorithm The definition of Fitness function is based on the application being used. For Image segmentation, it is defined as shown in Figure 3.5 [13]: Fig. 3.5. Fitness function for image segmentation Begin Input: Objective function )(f , Image to be segmented; Initialize the population of n host nests (cities)) xi ,i=1;2;···;n; Optimize initial solutions and saved in the bulletin board. Evaluate the fitness of solutions Fi; While (t