# A Framework for Interactive Medical Image Segmentation Using Optimized Swarm Intelligence with Convolutional Neural Networks

Authors: Chetna Kaushal; Md Khairul Islam; Sara A. Althubiti; Fayadh Alenezi; Romany F. Mansour
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

Recent improvements in current technology have had a significant impact on a wide range of image processing applications, including medical imaging. Classification, detection, and segmentation are all important aspects of medical imaging technology. An enormous need exists for the segmentation of diagnostic images, which can be applied to a wide variety of medical research applications. It is important to develop an effective segmentation technique based on deep learning algorithms for optimal identification of regions of interest and rapid segmentation. To cover this gap, a pipeline for image segmentation using traditional Convolutional Neural Network (CNN) as well as introduced Swarm Intelligence (SI) for optimal identification of the desired area has been proposed. Fuzzy C-means (FCM), K-means, and improvisation of FCM with Particle Swarm Optimization (PSO), improvisation of K-means with PSO, improvisation of FCM with CNN, and improvisation ofK-means with CNN are the six modules examined and evaluated. Experiments are carried out on various types of images such as Magnetic Resonance Imaging (MRI) for brain data analysis, dermoscopic for skin, microscopic for blood leukemia, and computed tomography (CT) scan images for lungs. After combining all of the datasets, we have constructed five subsets of data, each of which had a different number of images: 50, 100, 500, 1000, and 2000. Each of the models was executed and trained on the selected subset of the datasets. From the experimental analysis, it is observed that the performance of K-means with CNN is better than others and achieved 96.45% segmentation accuracy with an average time of 9.09 seconds.


---

## Body

## 1. Introduction

To advance the efficiency and accuracy of the medical diagnostic system, especially those that are distributed in complex areas (e.g., brain, skin, lung, and blood cancer classification), several live line diagnostic models (Bengio et al. [1]; Tiwari et al. [2]; Bhatt et al. [3]) work with image processing. The effectiveness of the detection and accuracy of the multidisciplinary medical data diagnostic system depends largely on the quality of the included images captured by a few techniques (Cetin et al. [4]) such as Magnetic Resonance Imaging (MRI) for brain data analysis, dermoscopic for skin, microscopic for blood leukemia, computed tomography (CT) scan images for lungs, etc. However, due to the uncontrollable lighting conditions and lots of noise availability during capturing, the illumination distributed on the surface of the medical images remains uneven, especially when backlight or fixed lighting conditions affect the diagnostic model (Bonabeau et al. [5]; Banks et al. [6]; Siva Raja and Rani [7]). It also leads to a comparison of the global low and local image and weak data in the black region and each aspect of the image plays a significant function in the examination of medical data. Therefore, preliminary processing is an important part of medical image classification because it plays an important role in computer-assisted medical diagnostic programs in different systems. Due to the position variability of the targeted regions, traditional hybrid segmentation technique such as Fuzzy Competitive Learning based Counter Propagation Network (FCPN) still works better than soft computing techniques [8]. Moreover, image classification is considered the most important process for medical imaging as it extracts the region of interest (ROI) from various data by semiautomatic or automatic process (Kennedy and Eberhart [9]). It classifies the image in areas based on a specific definition, such as the segmentation of damaged body parts or tissues in the local medical diagnostic system and the acquisition of boundaries and classification. There are some samples of medical image segmentations shown in Figure 1.Figure 1
Medical image segmentation.For medical experts and researchers alike, performing good medical image segmentation is a difficult undertaking (Karaboga [10]). Many researchers, on the other hand, have previously attempted to create an effective algorithm for medical image segmentation in order to aid in the identification of various disorders and diseases. Therefore, in this research work, we present a comparative medical image segmentation framework using swarm intelligence with Convolutional Neural Networks (CNN). Mainly, three different medical image segmentation mechanisms are considered and studied, namely, Traditional Segmentation (Fuzzy C-means (FCM) and K-means), Swarm Intelligence (Particle Swam Optimization (PSO)), and CNN-based segmentation with traditional approaches, as shown in Figure 2 with subclasses of architectures.Figure 2
Proposed segmentation architectures.Used traditional segmentation techniques are the type of unsupervised machine learning and useful to find out groups or different patterns in medical data. In general terms, it’s an unsupervised activity that divides unstructured data into several groups based on their similarity and dissimilarity (Yang, 2009 [11]). The motivation behind the proposed scenario is given in further sections.


### 1.1. Motivation

Unsupervised clustering-based medical image segmentation is a default method that aims to collect a set of objects or pixels into subsets or collections by the background and front of the image. The goal is to create clusters or parts that fit inside but are very different from each other. In simple terms, pixels in the same category should be as similar as possible, and objects in the same category should be very different from those in another cluster. Some challenging factors given that gave us the motivation are as follows:(i)
The number of research articles available was large but lack of appropriate comparisons of Traditional medical image Segmentation, SI, and CNN-based segmentation.(ii)
Medical data or image segmentation is a challenging task and still lots of improvements are needed to develop a better diagnosis system.(iii)
Existing CNN-based models need a lengthy system-training period.(iv)
Suffering from the over-fitting problems and need to solve such kind of problem regarding the medical diagnosis system that helps to detect the diseases in early stage. The overfitting problem in deep learning usually occurs when the image count is small in the target.(v)
The existing system had to be developed and updated in real-time scenarios.(vi)
There are no studies that have established a single standard segmentation model for distinct picture types from various organs.


### 1.2. Contributions

Nowadays, medical image segmentation using clustering is a basic requirement for lots of purposes like abnormal region detection, automatic extraction, data organization, etc. In the segmentation of medical data, high-quality clustering techniques are critical. Thus, in this research, we proposed a comparative framework for medical image segmentation with SI as well as CNN technique and the main contributions are as follows:(i)
To study the existing medical image segmentation approaches with different algorithms.(ii)
Develop a novel pre-processing for medical images like image quality enactment, hair removal from dermoscopic images, and blast nucleus improvement for microscopic images.(iii)
To segment medical images, FCM andK-means are used as unsupervised machine learning approaches with PSO as swarm intelligence and CNN as a deep learning mechanism. A novel fitness function is presented here that replaces pixels to increase segmentation quality.(iv)
To validate the proposed framework, performance parameters such as Precision, Recall, F-measure, Accuracy, Error, Matthews’s Correlation Coefficient (MCC), Dice coefficient (DC), Jaccard Coefficient (JC), and time being calculated and related with existing works.This research article deals with a comparative study for medical image segmentation and the rest of the article is systematized into different sections. Section2 illustrates the survey of related work, and the methodology of the proposed mechanism is described in Section 3. In Section 4, results and discussion based on the performance parameters are illustrated, and Section 5 concludes with recommendations for the future.


## 1.1. Motivation

Unsupervised clustering-based medical image segmentation is a default method that aims to collect a set of objects or pixels into subsets or collections by the background and front of the image. The goal is to create clusters or parts that fit inside but are very different from each other. In simple terms, pixels in the same category should be as similar as possible, and objects in the same category should be very different from those in another cluster. Some challenging factors given that gave us the motivation are as follows:(i)
The number of research articles available was large but lack of appropriate comparisons of Traditional medical image Segmentation, SI, and CNN-based segmentation.(ii)
Medical data or image segmentation is a challenging task and still lots of improvements are needed to develop a better diagnosis system.(iii)
Existing CNN-based models need a lengthy system-training period.(iv)
Suffering from the over-fitting problems and need to solve such kind of problem regarding the medical diagnosis system that helps to detect the diseases in early stage. The overfitting problem in deep learning usually occurs when the image count is small in the target.(v)
The existing system had to be developed and updated in real-time scenarios.(vi)
There are no studies that have established a single standard segmentation model for distinct picture types from various organs.


## 1.2. Contributions

Nowadays, medical image segmentation using clustering is a basic requirement for lots of purposes like abnormal region detection, automatic extraction, data organization, etc. In the segmentation of medical data, high-quality clustering techniques are critical. Thus, in this research, we proposed a comparative framework for medical image segmentation with SI as well as CNN technique and the main contributions are as follows:(i)
To study the existing medical image segmentation approaches with different algorithms.(ii)
Develop a novel pre-processing for medical images like image quality enactment, hair removal from dermoscopic images, and blast nucleus improvement for microscopic images.(iii)
To segment medical images, FCM andK-means are used as unsupervised machine learning approaches with PSO as swarm intelligence and CNN as a deep learning mechanism. A novel fitness function is presented here that replaces pixels to increase segmentation quality.(iv)
To validate the proposed framework, performance parameters such as Precision, Recall, F-measure, Accuracy, Error, Matthews’s Correlation Coefficient (MCC), Dice coefficient (DC), Jaccard Coefficient (JC), and time being calculated and related with existing works.This research article deals with a comparative study for medical image segmentation and the rest of the article is systematized into different sections. Section2 illustrates the survey of related work, and the methodology of the proposed mechanism is described in Section 3. In Section 4, results and discussion based on the performance parameters are illustrated, and Section 5 concludes with recommendations for the future.


## 2. Literature Survey

Segmentation is widely used in various sectors such as split geographical regions, fruit from trees, flood for damage reports, recognition of traffic signs, and road collapses. Chouhan et al. [12] surveyed Computational Intelligence (CI) techniques to demonstrate the application of segmentation in the interdisciplinary research area. They discussed well-known CI techniques such as neural network, fuzzy logic, and genetic algorithms as well as they have also proved that CI-based approaches are cost-effective, time-saver, higher-efficient, and applicable in various engineering sectors [12, 13]. In 2021, researchers introduced an Internet of Things (IoT) device for automatic plant disease (galls) detection using the Fuzzy Based Function Network (FBFN) segmentation technique [14]. Similarly, a web-based tool was developed to identify mango leaf diseases such as Anthracnose using the RBF segmentation method. Thus, the segmentation techniques are universally implemented for different image-based detection techniques [15].However, image segmentation is extensively used in human disease detection and diagnosis. For precise detection of the disease, initially, it requires identifying the region of interest from the captured images. In this study, a comprehensive description of the most important state-of-the-art medical image segmentation techniques is given. Here, we consider a mixed survey of segmentation for different types of medical data.IMV-FCM, an enhanced multiscreen FCM clustering method, introduces a weighted adaptive learning technology to increase the flexibility of coordinating from diverse viewpoints. The algorithms might be able to learn from each view in an adaptive way that helps them better group brain tissue and deal with a noise like partial dimension distortions and grayscale that does not match up [16]. In 2018, Karegowda et al. [17] conducted research on the segmentation of brain tumor regions from MRI data. The authors conducted a comparative examination of FCM, Adaptive Regularized Kernel-based FCM approaches, PSO, and K-means and concluded that using PSO as swarm intelligence is a useful step. The results of the experiments showed that PSO-based segmentation is more accurate than FCM, Adaptive Regularized Kernel FCM, and K-means [17]. Arun Kumar et al. [18] created an improved automated approach for segmenting brain tumor regions and identifying them using K-means for the same objective. The goal of the authors was to improve the imaging enhancement at the pre-processing stage for precise brain tumor prediction [18]. Chander et al. [19] developed a framework for the segmentation of MRI images using K-means with Support Vector Machine (SVM) as the machine learning approach, and the overall accuracy was increased over earlier work [19]. In [20], the authors have discussed various methods such as traditional segmentation (Threshold, Fuzzy Theory, Region and edge detection), machine learning approach (KNN, Random Forest, SVM, Dictionary learning), and deep learning methods (CNN, FCM, Encoder/decoder). Although their analysis depicts that deep learning-based techniques such as FCM are superior to other traditional methods, they also include a supervised method that demands for manual labeling which required domain-specific knowledge [20].In one of our previous studies, we have developed an IoT-based data collection system for skin lesions where we classified various skin lesions using deep learning-based ensemble algorithms [21]. For skin lesion segmentation, Yuan et al. [22] used the notion of Deep Fully Convolutional Neural Networks (DFCNN) with Jaccard distance. They employed the 19-DFCNN layer for self-training and the function of the new loss based on the Jaccard scale created by the researchers to re-measure using cross entropy to distinguish the lesion from the skin lesions. The findings of the studies imply that the upgraded classification approach outperforms conventional state algorithms, but that it requires more pre- and post-processing stages for greater accuracy [22]. Using CNN, Xie et al. [23] devised a reliable approach for extracting skin lesion bounds in the existence of distortions in digital images. Due to the use of a basic segmentation strategy, detecting the boundary of a skin lesion zone is slow, but this can be solved by utilizing a semantic segmentation technique [23]. In 2022, the authors trained a feature adaptive transformers network (FAT-Net) and managed to handle blurred boundary issues associated with lesions image. Yet FAT-Net may effectively extract local features and global true label whereas CNN are not capable of learning global true labels sufficiently [24]. Similarly, a neural network-based Multi-scale Residual Encoding and Decoding network (Ms RED) is used to handle blurred boundaries [25]. Thapar et al. [26] employed a segmentation framework using swarm intelligence with Grasshopper Optimization Algorithm (GOA) for feature extraction and successfully obtained 98.42% classification accuracy. Nevertheless, they only trained the model on three skin lesions images [26].The existence of the nucleus in blood cells is used in determining Leukemia. In 2021, Daud et al. [27] used conventional algorithms such as watershed distance transform and Sobel edge detection algorithm for segmenting nuclei from microscopic images [27]. In another research, authors deployed a Global Local Entropy Histogram Equalization (GLEHE) based segmentation technique to identify Leukemia in blood cells [28]. Dhal et al. [29] provided a method for segmenting blood images for leukemia using the Stochastic Fractal Search (SFS) algorithm, which provides non-false positive segmented results. For image segmentation, the notion of K-means-based clustering is studied. The proposed scheme was compared to a previous clustering method, and the findings showed that the system’s performance was better in terms of efficiency, computational burden, and quality attributes [29].Senthil Kumar et al. [30] used five algorithms to extract a plant region from very small lung images, including PSO, inertia-weighted PSO, guaranteed convergence PSO (GCPSO), K-means, and K-median. The flexible median filter outperformed the central filters, intermediate variables, and standard pre-processing stage, proving that it is best suited for medical CT imaging. In addition, employing the changing histogram balance improves the image brightness. Four algorithms are used to determine the quality of pre-processed images with improved quality. GCPSO has a high accuracy of 95.89 percent when visual results were confirmed with 20 lung sample images using MATLAB [30]. In 2021, van De Worp et al. [31] introduced deep learning-based two-step U-Net architecture for lung cancer segmentation from CT images. Although they performed the task only on 60 CT images [31]. The authors in [32] deployed 2-D Discrete Wavelet Transform (DWT) on the “LOTUS dataset” of lung tumor (CT images) and achieved a dice coefficient of 0.8472.We give a quick summary of the literature review and the following aspects highlighted as limitations based on the preceding analysis:(i)
The primary flaw with present clustering-based segmentation methods is that the foreground and background are overlapping.(ii)
Bio-inspired algorithms are commonly utilized in optimization-based techniques, which require longer to complete the segmentation process due to the unknown high number of clusters (Kaushal et al. [33]).(iii)
Because of the image quality, enormous segmentation tasks have suffered from difficulties in segmentation of complex images in cases of computed tomography scans, MRI, microscopic, and dermoscopic image modalities (Kaushal et al. [34]). It is necessary to focus on quality improvisation.(iv)
Researchers encounter a pixel-mixing difficulty due to frequent pixel value changes in the region.In this study, we are going to make it an intuitive and easy-to-understand framework for medical image segmentation.


## 3. Methodology

This section of the research article includes the procedural and working steps of the proposed model for Medical Image Segmentation using the Traditional Segmentation, SI, and CNN mechanisms. We focused on introducing a modified medical image segmentation approach using CNN as a deep learning and three distinct proposed architectures, which are as given in further sections.


### 3.1. Traditional Segmentation

In this phase, we evaluate the two clustering-based segmentation approaches such as FCM andK-means because it has many applications in medical research.


#### 3.1.1. FCM-Based Segmentation

This scenario presents medical image segmentation using the concept of FCM as an unsupervised process. After segmentation, two parts of an image are formed known as the background and foreground part where the foreground is the ROI of any medical data such as MRI, microscopic, dermoscopic, CT-scan, etc. Here, we use some common pre-processing steps in the entire six scenarios of the proposed framework for comparative analysis, first is the color conversion using(1)GImage=0.3×+0.59×+0.11×,where GImage is the grey level image that obtained after the color conversion from the color images (RGB ⟶ Red, Green, and Blue plane). After that, grey level mapping is initiated on the clipped region of the image for quality enhancement using the given equation:(2)XAVERAGE=Xregion−xaxis×Xregion−xaxisGImage.Equation (2) defines the average number of pixels in the medical image. Where Xregion−xaxis is the total number of medical image pixels in a clipped region (XCLIP). The clip limit (XCL) of medical image enhancement is calculated using equation 3 then we apply the image enhancement of the further processing using the written Algorithm 1:Algorithm 1: Enhancement of medical images.
Input: M ⟶ Medical-ImageOutput: EM ⟶ Enhanced Medical ImageStart enhancement processSet clip limit, XCL = XCLIP − XAVERAGE[Row, Col., and Plane] = Size (M)If Plane > 1//Means image is colorCM = RGB to Grey (M)ElseCM =M//No need of conversionEnd-IfFor I = 1 > XCLEM = Intensity (M (I), XCL)End-ForReturn: EM as an enhanced medical imageEnd-AlgorithmAfter medical image enhancement in pre-processing phase, we move toward the segmentation using the FCM and the FCM algorithm written as below in Algorithm2.Algorithm 2: FCM-based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart FCMDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2 /Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidG using given Algorithm 2Gmn=Repeat and define FCM membership using given Algorithm 2G1,G2=∑1ndGm2/dGn21/m−1−1End-ForEnd-ForEnd-WhileReturn: BM and ROIEnd–AlgorithmThe concept of FCM is dependent on the idea of consistently acquiring cluster centers by adjusting their positions using mean values that are given in equation 4 and allows clusters that are more flexible by introducing the possibility of partial memberships. The error function of FCM is written in the following equation:(3)ErrorFCM=∑i−1m∑j=1nμijkXij−Cj2,where fuzzy membership is denoted by μij of Xi (image’s pixel) and the cluster identified by its center CJ, and here, k is a constant that defines the fuzziness of the resulting partitions.(4)μij=1∑m=1CXj−Cj/Xj−Cm2/k−1.The steps involved in the algorithm of FCM-based segmentation areFCM 1: recruit Ci as the cluster centers and IterationN = 0FCM 2: call FCM membership functionsμij according to equation 7FCM 3: letN = N + 1 and assign new Ci as new centersFCM 4: until the best convergence is not found, repeat steps 2 to 3.Using this algorithm, we segment the ROI from the medical images and after segmentation of medical images; the obtained segmented result with original images shown in Figure3.Figure 3
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM.


#### 3.1.2.K-Means Based Segmentation

This is the second scenario and we usedK-means as a segmentation technique instead of FCM because K-means helps to provide better segmentation results as compared to the FCM that is shown in Figure 4. By utilizing the concept of K-means as a medical image segmentation technique, appropriate ROI from the medical images could be segmented but also K-means faced mix-up issues, and the algorithm of K-means is written in Algorithm 3.Figure 4
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image usingK-means.Algorithm 3:K-means based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart K-meansDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust Centroid C using their meanG = Average (BM, ROI) using the given Algorithm 3Gmn=∑m=1Row∑n=1ColG1mn+G2mn/2End-ForEnd-ForEnd-WhileReturn: BM and ROIEnd-AlgorithmBased on the above writtenK-means algorithm in the ASBT system, we obtained better-segmented result as compared to the FCM-based ASBT system, and the results with the original MRI image are shown in Figure 4.


### 3.2. SI-Based Segmentation

In this scenario, we the concept of PSO as a SI approach because it is the most well-known optimization technique that helps to optimize the pixel-mixing problem faced by the FCM. Here, we present two different hybrid mechanisms named FCM and K-means with PSO for medical image segmentation.


#### 3.2.1. FCM with PSO-Based Segmentation

In this scenario, we utilize the concept of PSO along with the FCM as a medical image hybrid segmentation. PSO is a powerful meta-heuristic technique that is favored by birds, mammals, and other insects that live or move in swarms. The best example of PSO inspiration is a flock of birds or a school of tiny fish that helps to reduce the pixel-mixing problem faced by the FCM during medical image segmentation by having very similar neighborhood pixel values. This hybrid segmentation method is based on the participation of individuals of each particle from many fields that are participating in the searching mechanism of a threshold value to minimize the mixed pixels. To solve a medical image segmentation problem, each particle modifies its threshold value based on its own and its neighbors’ experiences. Formally, each PSO particlePI has a position PI (t) at the time t instances in the search space, which change at time t + 1 by a velocity VIt. In the PSO algorithm, VIt velocity is influenced by the best position VBESTt visited by itself and PALL (t) the best position visited by all particles (we termed it “global best”). Each particle’s position is determined by a unique fitness function (Fit (Fun)), which is dependent on the segmentation issue and space dimension D.(5)PIt=PI1,PI2,PI3,……PID,VIt=VI1,VI2,VI3,……VID,VBESTt=VBEST1,VBEST2,VBEST3,……VBESTD,PALLIt=PALL1,PALL2,PALL3,……PALLD.Kennedy and EberhaVrt, (1995) [9] established the PSO algorithm as an evolutionary image segmentation technique, and the algorithm of FCM with PSO segmentation is written below in Algorithm 4.Algorithm 4: FCM with PSO based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidG using given Algorithms 1 and 2End-ForEnd-ForEnd-WhileTo optimize the ROI, here we used PSO algorithm and then initialize using the following parameters such as:(i)
Iterations (T)(ii)
Population-size (S)(iii)
Lower-Limit (LB)(iv)
Upper-Limit (UB)(v)
Fitness function(vi)
Number of selection (N)Calculate size in terms ofT = Row × Col.Fitness function for the parameter optimization of PSO:fitfun=1ifpixelisless0otherwiseFor l = 1 ⟶ Tfs=EMRIlft=∑i=1PixelsEMRIl/LengthofEMRIPixelsfitfun = using Algorithm 4Thresholdvalue=PSOP,T,LB,UB,N,fitfunEnd-ForDefine optimization iterations, O-Rep =NWhile O-Rep ≠ N (until max iteration not achieved)Thr=ThresholdvalueMask = Binary (ROI, Thr)ROI Boundaries = Boundary (Mask)For k = 1 ⟶ DROI = EM × ROI BoundariesEnd-ForEnd-WhileReturn: BM and ROI as an improved background and foregroundEnd-AlgorithmBased on the above-written hybrid segmentation algorithm using FCM with PSO, we obtained better-segmented results as compared to the only FCM as well as K-means also and results with the original medical image shown in Figure5.Figure 5
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM with PSO.


#### 3.2.2.K-Means with PSO-Based Segmentation

The concept of PSO along with theK-means clustering algorithm used as a medical image hybrid segmentation and the algorithm of K-means with PSO segmentation is written below in Algorithm 5.Algorithm 5:K-means with PSO based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidC using their meanG = Average (BM, ROI) using the given Algorithm 5Gmn=∑m=1Row∑n=1ColG1mn+G2mn/2End-ForEnd-ForEnd-WhileTo optimize the ROI, here we used PSO algorithm and then initialize using following parameters such as:(i)
Iterations (T)(ii)
Population-size (S)(iii)
Lower-Limit (LB)(iv)
Upper-Limit (UB)(v)
Fitness function(vi)
Number of selection (N)Calculate size in terms ofT = Row × Col.Fitness function using Algorithm 4 for the parameter optimization of PSOFor l = 1 ⟶ Tfs=EMRIlft=∑i=1PixelsEMRIl/LengthofEMRIPixelsfitfun = using Algorithm 4Thresholdvalue=PSOP,T,LB,UB,N,fitfunEnd-ForDefine optimization iterations, O-Rep =NWhile O-Rep ≠ N (until max iteration not achieved)Thr=ThresholdvalueMask = Binary (ROI, Thr)ROI Boundaries = Boundary (Mask)For k = 1 ⟶ DROI = EM × ROI BoundariesEnd-ForEnd-WhileReturn: BM and ROI as an improved background and foreground of medical imageEnd-AlgorithmBased on the above-written hybrid segmentation algorithm using K-means with PSO, we obtained better-segmented results as compared to the FCM, K-means, and FCM with PSO also and results with the original medical image shown in Figure6.Figure 6
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using K-means with PSO.


### 3.3. CNN-Based Segmentation

This is the third module of implementation where we used again two different scenarios that are described below.


#### 3.3.1. FCM with CNN-Based Segmentation

In this scenario, we utilize the concept of CNN as a deep learning mechanism along with the FCM as a medical image hybrid segmentation. This hybrid method is currently used in most of the existing medical image segmentation research. First, we train the model using lots of already segmented images in terms of background and foreground images having 3 dimensions (RGB). Usually, segmented medical images, which are fed into the neural network, are reduced in data dimensions, reduce the system processing time as well as complexity and help to reduce the over-fitting problems and hybrid CNN mechanism shown in Figure7.Figure 7
FCM with CNN for segmentation.Figure7 illustrated the process of medical image segmentation using the hybridization of FCM with CNN and the algorithm of K-means with PSO segmentation written below in Algorithm 6.Algorithm 6: FCM with CNN based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationApply FCM and create BM and ROITo optimize the ROI, here we used CNN and firstly we need to initialize using Epochs, Iterations, and Neurons (N) etc.For I = 1 ⟶ T = Row × Col.If EM (I) belongs to BMGroup (1) = BackgroundElse//EM belongs to ROIGroup (2) = ForegroundEnd-IfEnd-ForCall pattern net CNN for training of system using BM and ROI dataFCM-CNN = Pattern-net (Neurons)FCM-CNN = Train (FCM-CNN, EM, Group)ROI = Sim (FCM-CNN, ROI data)If ROI (Pixel) = ROIROI = EMElseBM = EMEnd-IfReturn: BM and ROI as an improved segmented background and foreground of medical imageEnd–AlgorithmWe obtained better-segmented results for the proposed hybrid mechanism of FCM with CNN as compared to the FCM,K-means, and improvisation in FCM with PSO, improvisation in K-means with PSO and results with the original medical image shown in Figure 8.Figure 8
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM with CNN.


#### 3.3.2.K-Means with CNN-Based Segmentation

The concept of CNN as a deep learning mechanism along with theK-means used in this scenario and similar to algorithm 6, a hybrid CNN mechanism with K-means is shown in Figure 9.Figure 9
K-means with CNN for segmentation.Figure9 illustrated the process of medical image segmentation using hybridization of FCM with CNN and the algorithm of K-means with PSO segmentation written below in Algorithm 7.Algorithm 7:K-means with CNN based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationApplyK-means and create BM and ROITo optimize the ROI, here we used CNN, and first, we need to initialize using Epochs, Iterations, Neurons (N) etc.For I = 1 ⟶ T = Row × Col.If EM (I) belongs to BMGroup (1) = BackgroundElse//EM belongs to ROIGroup (2) = ForegroundEnd-IfEnd-ForCall pattern net CNN for training of system using BM and ROI dataFCM-CNN = Pattern-net (Neurons)FCM-CNN = Train (FCM-CNN, EM, Group)ROI = Sim (FCM-CNN, ROI data)If ROI (Pixel) = ROIROI = EMElseBM = EMEnd-IfReturn: BM and ROI as an improved segmented background and foreground of medical imageEnd–AlgorithmIn comparison to FCM,K-means, FCM with PSO, CNN, and K-means with PSO, we achieved better-segmented results for the proposed hybrid mechanism of K-means with CNN, and results with the original medical image are displayed in Figure 10.Figure 10
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image usingK-means with CNN.Finally, performance parameters for different types of datasets are calculated and compared using a comparison framework simulation in terms of Precision, Recall,F-measure, Accuracy, Error, MCC, DC, JC, and time.


### 3.4. Collected Dataset

#### 3.4.1. Brain Tumor Segmentation (BraTS) Dataset

The sample images of the BraTS dataset are shown in Figure11, it is a standard dataset obtained from “https://www.med.upenn.edu/sbia/brats2018/data.html” having MRI images [35]. For the simulation of the model, 50 DICOM files were converted into JPG format that is representing multi-frame superimposed brain images.Figure 11
BraTS dataset.


#### 3.4.2. Acute Lymphoblastic Leukaemia Image Database (ALL-IDB) Dataset

The dataset contains 2008 images that were collected in September 2005 in the Image Processing Department of Computer Science-UniversitàdegliStudi di Milano” [36]. The ALL-IDB dataset of microscopic images is freely available for scientific research purposes from “https://homes.di.unimi.it/scotti/all/” and the sample of ALL-IDB dataset images is shown in Figure 12.Figure 12
ALL-IDB dataset.The used dataset contains approximately 39,000 blood counts, and oncologists labeled the lymphocytes. We resize the original microscopic images of blood samples into a size of 256 × 256 and a total of 2000 images were used in this research work.


#### 3.4.3. ISIC-2018 Dataset

It contains the human lesion analysis toward melanoma detection and the dataset is in the form of dermoscopic images. The dataset is available fromhttps://challenge2018.isic-archive.com/task1/training/ [37]. To capture images, the dermoscopic process is used which is an imaging technique to eliminate the surface reflection of human skin. It provides improved diagnostic accuracy and the sample of the ISIC-2018 dataset is shown in Figure 13.Figure 13
ISIC dataset.


#### 3.4.4. CT-Scan Dataset

The database currently consists of an image set of 50 lung CT scans for research purposes which is publicly available from “http://www.via.cornell.edu/lungdb.html” [38]. A sample of dataset CT-scan images is shown in Figure 14.Figure 14
Sample of dataset CT-scan images.After executing the methodology’s outlined steps, the performance has been evaluated in terms of several parameters, as discussed in the result and discussion section.


### 3.5. Evaluation Metric

In this part, we have outlined the assessment measures used to verify the effectiveness of the suggested techniques. First of all, we have observed quantitative metrics such as Accuracy. In most cases, the efficiency of a models is measured in terms of its accuracy. However, in medical image segmentation, the model’s accuracy is insufficient to provide a precise understanding of the model. Therefore, there are several additional measures, such as precision, recall, Error, andF1 score, to assess segmentation quality. In order to analyze and comprehend the ability of the models, we have made use of each of these measures.Moreover, we have considered similarity metrics such as Matthews’s Correlation Coefficient (MCC), Dice coefficient (DC), and Jaccard Coefficient (JC). Each similar metric has a few special characteristics to evaluate the true performance of the selected segmentation techniques. If all of the probabilistic methods, including true positives, true negatives, false negatives, and false positives, provide a high score, then the MCC algorithm will generate a higher score [39]. Similarly, DC deals with the missing data in image segmentation-related problems [40]. Both quantitative and similar metrics are considered in our study, which provides more robust comparisons and preferences of the specified segmentation techniques [41].


## 3.1. Traditional Segmentation

In this phase, we evaluate the two clustering-based segmentation approaches such as FCM andK-means because it has many applications in medical research.


### 3.1.1. FCM-Based Segmentation

This scenario presents medical image segmentation using the concept of FCM as an unsupervised process. After segmentation, two parts of an image are formed known as the background and foreground part where the foreground is the ROI of any medical data such as MRI, microscopic, dermoscopic, CT-scan, etc. Here, we use some common pre-processing steps in the entire six scenarios of the proposed framework for comparative analysis, first is the color conversion using(1)GImage=0.3×+0.59×+0.11×,where GImage is the grey level image that obtained after the color conversion from the color images (RGB ⟶ Red, Green, and Blue plane). After that, grey level mapping is initiated on the clipped region of the image for quality enhancement using the given equation:(2)XAVERAGE=Xregion−xaxis×Xregion−xaxisGImage.Equation (2) defines the average number of pixels in the medical image. Where Xregion−xaxis is the total number of medical image pixels in a clipped region (XCLIP). The clip limit (XCL) of medical image enhancement is calculated using equation 3 then we apply the image enhancement of the further processing using the written Algorithm 1:Algorithm 1: Enhancement of medical images.
Input: M ⟶ Medical-ImageOutput: EM ⟶ Enhanced Medical ImageStart enhancement processSet clip limit, XCL = XCLIP − XAVERAGE[Row, Col., and Plane] = Size (M)If Plane > 1//Means image is colorCM = RGB to Grey (M)ElseCM =M//No need of conversionEnd-IfFor I = 1 > XCLEM = Intensity (M (I), XCL)End-ForReturn: EM as an enhanced medical imageEnd-AlgorithmAfter medical image enhancement in pre-processing phase, we move toward the segmentation using the FCM and the FCM algorithm written as below in Algorithm2.Algorithm 2: FCM-based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart FCMDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2 /Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidG using given Algorithm 2Gmn=Repeat and define FCM membership using given Algorithm 2G1,G2=∑1ndGm2/dGn21/m−1−1End-ForEnd-ForEnd-WhileReturn: BM and ROIEnd–AlgorithmThe concept of FCM is dependent on the idea of consistently acquiring cluster centers by adjusting their positions using mean values that are given in equation 4 and allows clusters that are more flexible by introducing the possibility of partial memberships. The error function of FCM is written in the following equation:(3)ErrorFCM=∑i−1m∑j=1nμijkXij−Cj2,where fuzzy membership is denoted by μij of Xi (image’s pixel) and the cluster identified by its center CJ, and here, k is a constant that defines the fuzziness of the resulting partitions.(4)μij=1∑m=1CXj−Cj/Xj−Cm2/k−1.The steps involved in the algorithm of FCM-based segmentation areFCM 1: recruit Ci as the cluster centers and IterationN = 0FCM 2: call FCM membership functionsμij according to equation 7FCM 3: letN = N + 1 and assign new Ci as new centersFCM 4: until the best convergence is not found, repeat steps 2 to 3.Using this algorithm, we segment the ROI from the medical images and after segmentation of medical images; the obtained segmented result with original images shown in Figure3.Figure 3
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM.


### 3.1.2.K-Means Based Segmentation

This is the second scenario and we usedK-means as a segmentation technique instead of FCM because K-means helps to provide better segmentation results as compared to the FCM that is shown in Figure 4. By utilizing the concept of K-means as a medical image segmentation technique, appropriate ROI from the medical images could be segmented but also K-means faced mix-up issues, and the algorithm of K-means is written in Algorithm 3.Figure 4
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image usingK-means.Algorithm 3:K-means based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart K-meansDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust Centroid C using their meanG = Average (BM, ROI) using the given Algorithm 3Gmn=∑m=1Row∑n=1ColG1mn+G2mn/2End-ForEnd-ForEnd-WhileReturn: BM and ROIEnd-AlgorithmBased on the above writtenK-means algorithm in the ASBT system, we obtained better-segmented result as compared to the FCM-based ASBT system, and the results with the original MRI image are shown in Figure 4.


## 3.1.1. FCM-Based Segmentation

This scenario presents medical image segmentation using the concept of FCM as an unsupervised process. After segmentation, two parts of an image are formed known as the background and foreground part where the foreground is the ROI of any medical data such as MRI, microscopic, dermoscopic, CT-scan, etc. Here, we use some common pre-processing steps in the entire six scenarios of the proposed framework for comparative analysis, first is the color conversion using(1)GImage=0.3×+0.59×+0.11×,where GImage is the grey level image that obtained after the color conversion from the color images (RGB ⟶ Red, Green, and Blue plane). After that, grey level mapping is initiated on the clipped region of the image for quality enhancement using the given equation:(2)XAVERAGE=Xregion−xaxis×Xregion−xaxisGImage.Equation (2) defines the average number of pixels in the medical image. Where Xregion−xaxis is the total number of medical image pixels in a clipped region (XCLIP). The clip limit (XCL) of medical image enhancement is calculated using equation 3 then we apply the image enhancement of the further processing using the written Algorithm 1:Algorithm 1: Enhancement of medical images.
Input: M ⟶ Medical-ImageOutput: EM ⟶ Enhanced Medical ImageStart enhancement processSet clip limit, XCL = XCLIP − XAVERAGE[Row, Col., and Plane] = Size (M)If Plane > 1//Means image is colorCM = RGB to Grey (M)ElseCM =M//No need of conversionEnd-IfFor I = 1 > XCLEM = Intensity (M (I), XCL)End-ForReturn: EM as an enhanced medical imageEnd-AlgorithmAfter medical image enhancement in pre-processing phase, we move toward the segmentation using the FCM and the FCM algorithm written as below in Algorithm2.Algorithm 2: FCM-based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart FCMDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2 /Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidG using given Algorithm 2Gmn=Repeat and define FCM membership using given Algorithm 2G1,G2=∑1ndGm2/dGn21/m−1−1End-ForEnd-ForEnd-WhileReturn: BM and ROIEnd–AlgorithmThe concept of FCM is dependent on the idea of consistently acquiring cluster centers by adjusting their positions using mean values that are given in equation 4 and allows clusters that are more flexible by introducing the possibility of partial memberships. The error function of FCM is written in the following equation:(3)ErrorFCM=∑i−1m∑j=1nμijkXij−Cj2,where fuzzy membership is denoted by μij of Xi (image’s pixel) and the cluster identified by its center CJ, and here, k is a constant that defines the fuzziness of the resulting partitions.(4)μij=1∑m=1CXj−Cj/Xj−Cm2/k−1.The steps involved in the algorithm of FCM-based segmentation areFCM 1: recruit Ci as the cluster centers and IterationN = 0FCM 2: call FCM membership functionsμij according to equation 7FCM 3: letN = N + 1 and assign new Ci as new centersFCM 4: until the best convergence is not found, repeat steps 2 to 3.Using this algorithm, we segment the ROI from the medical images and after segmentation of medical images; the obtained segmented result with original images shown in Figure3.Figure 3
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM.


## 3.1.2.K-Means Based Segmentation

This is the second scenario and we usedK-means as a segmentation technique instead of FCM because K-means helps to provide better segmentation results as compared to the FCM that is shown in Figure 4. By utilizing the concept of K-means as a medical image segmentation technique, appropriate ROI from the medical images could be segmented but also K-means faced mix-up issues, and the algorithm of K-means is written in Algorithm 3.Figure 4
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image usingK-means.Algorithm 3:K-means based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart K-meansDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust Centroid C using their meanG = Average (BM, ROI) using the given Algorithm 3Gmn=∑m=1Row∑n=1ColG1mn+G2mn/2End-ForEnd-ForEnd-WhileReturn: BM and ROIEnd-AlgorithmBased on the above writtenK-means algorithm in the ASBT system, we obtained better-segmented result as compared to the FCM-based ASBT system, and the results with the original MRI image are shown in Figure 4.


## 3.2. SI-Based Segmentation

In this scenario, we the concept of PSO as a SI approach because it is the most well-known optimization technique that helps to optimize the pixel-mixing problem faced by the FCM. Here, we present two different hybrid mechanisms named FCM and K-means with PSO for medical image segmentation.


### 3.2.1. FCM with PSO-Based Segmentation

In this scenario, we utilize the concept of PSO along with the FCM as a medical image hybrid segmentation. PSO is a powerful meta-heuristic technique that is favored by birds, mammals, and other insects that live or move in swarms. The best example of PSO inspiration is a flock of birds or a school of tiny fish that helps to reduce the pixel-mixing problem faced by the FCM during medical image segmentation by having very similar neighborhood pixel values. This hybrid segmentation method is based on the participation of individuals of each particle from many fields that are participating in the searching mechanism of a threshold value to minimize the mixed pixels. To solve a medical image segmentation problem, each particle modifies its threshold value based on its own and its neighbors’ experiences. Formally, each PSO particlePI has a position PI (t) at the time t instances in the search space, which change at time t + 1 by a velocity VIt. In the PSO algorithm, VIt velocity is influenced by the best position VBESTt visited by itself and PALL (t) the best position visited by all particles (we termed it “global best”). Each particle’s position is determined by a unique fitness function (Fit (Fun)), which is dependent on the segmentation issue and space dimension D.(5)PIt=PI1,PI2,PI3,……PID,VIt=VI1,VI2,VI3,……VID,VBESTt=VBEST1,VBEST2,VBEST3,……VBESTD,PALLIt=PALL1,PALL2,PALL3,……PALLD.Kennedy and EberhaVrt, (1995) [9] established the PSO algorithm as an evolutionary image segmentation technique, and the algorithm of FCM with PSO segmentation is written below in Algorithm 4.Algorithm 4: FCM with PSO based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidG using given Algorithms 1 and 2End-ForEnd-ForEnd-WhileTo optimize the ROI, here we used PSO algorithm and then initialize using the following parameters such as:(i)
Iterations (T)(ii)
Population-size (S)(iii)
Lower-Limit (LB)(iv)
Upper-Limit (UB)(v)
Fitness function(vi)
Number of selection (N)Calculate size in terms ofT = Row × Col.Fitness function for the parameter optimization of PSO:fitfun=1ifpixelisless0otherwiseFor l = 1 ⟶ Tfs=EMRIlft=∑i=1PixelsEMRIl/LengthofEMRIPixelsfitfun = using Algorithm 4Thresholdvalue=PSOP,T,LB,UB,N,fitfunEnd-ForDefine optimization iterations, O-Rep =NWhile O-Rep ≠ N (until max iteration not achieved)Thr=ThresholdvalueMask = Binary (ROI, Thr)ROI Boundaries = Boundary (Mask)For k = 1 ⟶ DROI = EM × ROI BoundariesEnd-ForEnd-WhileReturn: BM and ROI as an improved background and foregroundEnd-AlgorithmBased on the above-written hybrid segmentation algorithm using FCM with PSO, we obtained better-segmented results as compared to the only FCM as well as K-means also and results with the original medical image shown in Figure5.Figure 5
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM with PSO.


### 3.2.2.K-Means with PSO-Based Segmentation

The concept of PSO along with theK-means clustering algorithm used as a medical image hybrid segmentation and the algorithm of K-means with PSO segmentation is written below in Algorithm 5.Algorithm 5:K-means with PSO based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidC using their meanG = Average (BM, ROI) using the given Algorithm 5Gmn=∑m=1Row∑n=1ColG1mn+G2mn/2End-ForEnd-ForEnd-WhileTo optimize the ROI, here we used PSO algorithm and then initialize using following parameters such as:(i)
Iterations (T)(ii)
Population-size (S)(iii)
Lower-Limit (LB)(iv)
Upper-Limit (UB)(v)
Fitness function(vi)
Number of selection (N)Calculate size in terms ofT = Row × Col.Fitness function using Algorithm 4 for the parameter optimization of PSOFor l = 1 ⟶ Tfs=EMRIlft=∑i=1PixelsEMRIl/LengthofEMRIPixelsfitfun = using Algorithm 4Thresholdvalue=PSOP,T,LB,UB,N,fitfunEnd-ForDefine optimization iterations, O-Rep =NWhile O-Rep ≠ N (until max iteration not achieved)Thr=ThresholdvalueMask = Binary (ROI, Thr)ROI Boundaries = Boundary (Mask)For k = 1 ⟶ DROI = EM × ROI BoundariesEnd-ForEnd-WhileReturn: BM and ROI as an improved background and foreground of medical imageEnd-AlgorithmBased on the above-written hybrid segmentation algorithm using K-means with PSO, we obtained better-segmented results as compared to the FCM, K-means, and FCM with PSO also and results with the original medical image shown in Figure6.Figure 6
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using K-means with PSO.


## 3.2.1. FCM with PSO-Based Segmentation

In this scenario, we utilize the concept of PSO along with the FCM as a medical image hybrid segmentation. PSO is a powerful meta-heuristic technique that is favored by birds, mammals, and other insects that live or move in swarms. The best example of PSO inspiration is a flock of birds or a school of tiny fish that helps to reduce the pixel-mixing problem faced by the FCM during medical image segmentation by having very similar neighborhood pixel values. This hybrid segmentation method is based on the participation of individuals of each particle from many fields that are participating in the searching mechanism of a threshold value to minimize the mixed pixels. To solve a medical image segmentation problem, each particle modifies its threshold value based on its own and its neighbors’ experiences. Formally, each PSO particlePI has a position PI (t) at the time t instances in the search space, which change at time t + 1 by a velocity VIt. In the PSO algorithm, VIt velocity is influenced by the best position VBESTt visited by itself and PALL (t) the best position visited by all particles (we termed it “global best”). Each particle’s position is determined by a unique fitness function (Fit (Fun)), which is dependent on the segmentation issue and space dimension D.(5)PIt=PI1,PI2,PI3,……PID,VIt=VI1,VI2,VI3,……VID,VBESTt=VBEST1,VBEST2,VBEST3,……VBESTD,PALLIt=PALL1,PALL2,PALL3,……PALLD.Kennedy and EberhaVrt, (1995) [9] established the PSO algorithm as an evolutionary image segmentation technique, and the algorithm of FCM with PSO segmentation is written below in Algorithm 4.Algorithm 4: FCM with PSO based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidG using given Algorithms 1 and 2End-ForEnd-ForEnd-WhileTo optimize the ROI, here we used PSO algorithm and then initialize using the following parameters such as:(i)
Iterations (T)(ii)
Population-size (S)(iii)
Lower-Limit (LB)(iv)
Upper-Limit (UB)(v)
Fitness function(vi)
Number of selection (N)Calculate size in terms ofT = Row × Col.Fitness function for the parameter optimization of PSO:fitfun=1ifpixelisless0otherwiseFor l = 1 ⟶ Tfs=EMRIlft=∑i=1PixelsEMRIl/LengthofEMRIPixelsfitfun = using Algorithm 4Thresholdvalue=PSOP,T,LB,UB,N,fitfunEnd-ForDefine optimization iterations, O-Rep =NWhile O-Rep ≠ N (until max iteration not achieved)Thr=ThresholdvalueMask = Binary (ROI, Thr)ROI Boundaries = Boundary (Mask)For k = 1 ⟶ DROI = EM × ROI BoundariesEnd-ForEnd-WhileReturn: BM and ROI as an improved background and foregroundEnd-AlgorithmBased on the above-written hybrid segmentation algorithm using FCM with PSO, we obtained better-segmented results as compared to the only FCM as well as K-means also and results with the original medical image shown in Figure5.Figure 5
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM with PSO.


## 3.2.2.K-Means with PSO-Based Segmentation

The concept of PSO along with theK-means clustering algorithm used as a medical image hybrid segmentation and the algorithm of K-means with PSO segmentation is written below in Algorithm 5.Algorithm 5:K-means with PSO based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationDefine cluster numberG=2[Row, Col.] = Size (EM)SegregateG=G1&G2//Where G1 for BM and G2 for ROIRep =N//Define number of iterations for clusteringWhile Rep ≠ N (until max iteration not achieved)For P = 1 ⟶ RowFor Q = 1 ⟶ ColIf EM (P, Q) = = G1BM (P, Q) = EM (P, Q)Else if EM (m, n) = = G2ROI (P, Q) = EM (P, Q)End-IfAdjust CentroidC using their meanG = Average (BM, ROI) using the given Algorithm 5Gmn=∑m=1Row∑n=1ColG1mn+G2mn/2End-ForEnd-ForEnd-WhileTo optimize the ROI, here we used PSO algorithm and then initialize using following parameters such as:(i)
Iterations (T)(ii)
Population-size (S)(iii)
Lower-Limit (LB)(iv)
Upper-Limit (UB)(v)
Fitness function(vi)
Number of selection (N)Calculate size in terms ofT = Row × Col.Fitness function using Algorithm 4 for the parameter optimization of PSOFor l = 1 ⟶ Tfs=EMRIlft=∑i=1PixelsEMRIl/LengthofEMRIPixelsfitfun = using Algorithm 4Thresholdvalue=PSOP,T,LB,UB,N,fitfunEnd-ForDefine optimization iterations, O-Rep =NWhile O-Rep ≠ N (until max iteration not achieved)Thr=ThresholdvalueMask = Binary (ROI, Thr)ROI Boundaries = Boundary (Mask)For k = 1 ⟶ DROI = EM × ROI BoundariesEnd-ForEnd-WhileReturn: BM and ROI as an improved background and foreground of medical imageEnd-AlgorithmBased on the above-written hybrid segmentation algorithm using K-means with PSO, we obtained better-segmented results as compared to the FCM, K-means, and FCM with PSO also and results with the original medical image shown in Figure6.Figure 6
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using K-means with PSO.


## 3.3. CNN-Based Segmentation

This is the third module of implementation where we used again two different scenarios that are described below.


### 3.3.1. FCM with CNN-Based Segmentation

In this scenario, we utilize the concept of CNN as a deep learning mechanism along with the FCM as a medical image hybrid segmentation. This hybrid method is currently used in most of the existing medical image segmentation research. First, we train the model using lots of already segmented images in terms of background and foreground images having 3 dimensions (RGB). Usually, segmented medical images, which are fed into the neural network, are reduced in data dimensions, reduce the system processing time as well as complexity and help to reduce the over-fitting problems and hybrid CNN mechanism shown in Figure7.Figure 7
FCM with CNN for segmentation.Figure7 illustrated the process of medical image segmentation using the hybridization of FCM with CNN and the algorithm of K-means with PSO segmentation written below in Algorithm 6.Algorithm 6: FCM with CNN based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationApply FCM and create BM and ROITo optimize the ROI, here we used CNN and firstly we need to initialize using Epochs, Iterations, and Neurons (N) etc.For I = 1 ⟶ T = Row × Col.If EM (I) belongs to BMGroup (1) = BackgroundElse//EM belongs to ROIGroup (2) = ForegroundEnd-IfEnd-ForCall pattern net CNN for training of system using BM and ROI dataFCM-CNN = Pattern-net (Neurons)FCM-CNN = Train (FCM-CNN, EM, Group)ROI = Sim (FCM-CNN, ROI data)If ROI (Pixel) = ROIROI = EMElseBM = EMEnd-IfReturn: BM and ROI as an improved segmented background and foreground of medical imageEnd–AlgorithmWe obtained better-segmented results for the proposed hybrid mechanism of FCM with CNN as compared to the FCM,K-means, and improvisation in FCM with PSO, improvisation in K-means with PSO and results with the original medical image shown in Figure 8.Figure 8
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM with CNN.


### 3.3.2.K-Means with CNN-Based Segmentation

The concept of CNN as a deep learning mechanism along with theK-means used in this scenario and similar to algorithm 6, a hybrid CNN mechanism with K-means is shown in Figure 9.Figure 9
K-means with CNN for segmentation.Figure9 illustrated the process of medical image segmentation using hybridization of FCM with CNN and the algorithm of K-means with PSO segmentation written below in Algorithm 7.Algorithm 7:K-means with CNN based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationApplyK-means and create BM and ROITo optimize the ROI, here we used CNN, and first, we need to initialize using Epochs, Iterations, Neurons (N) etc.For I = 1 ⟶ T = Row × Col.If EM (I) belongs to BMGroup (1) = BackgroundElse//EM belongs to ROIGroup (2) = ForegroundEnd-IfEnd-ForCall pattern net CNN for training of system using BM and ROI dataFCM-CNN = Pattern-net (Neurons)FCM-CNN = Train (FCM-CNN, EM, Group)ROI = Sim (FCM-CNN, ROI data)If ROI (Pixel) = ROIROI = EMElseBM = EMEnd-IfReturn: BM and ROI as an improved segmented background and foreground of medical imageEnd–AlgorithmIn comparison to FCM,K-means, FCM with PSO, CNN, and K-means with PSO, we achieved better-segmented results for the proposed hybrid mechanism of K-means with CNN, and results with the original medical image are displayed in Figure 10.Figure 10
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image usingK-means with CNN.Finally, performance parameters for different types of datasets are calculated and compared using a comparison framework simulation in terms of Precision, Recall,F-measure, Accuracy, Error, MCC, DC, JC, and time.


## 3.3.1. FCM with CNN-Based Segmentation

In this scenario, we utilize the concept of CNN as a deep learning mechanism along with the FCM as a medical image hybrid segmentation. This hybrid method is currently used in most of the existing medical image segmentation research. First, we train the model using lots of already segmented images in terms of background and foreground images having 3 dimensions (RGB). Usually, segmented medical images, which are fed into the neural network, are reduced in data dimensions, reduce the system processing time as well as complexity and help to reduce the over-fitting problems and hybrid CNN mechanism shown in Figure7.Figure 7
FCM with CNN for segmentation.Figure7 illustrated the process of medical image segmentation using the hybridization of FCM with CNN and the algorithm of K-means with PSO segmentation written below in Algorithm 6.Algorithm 6: FCM with CNN based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationApply FCM and create BM and ROITo optimize the ROI, here we used CNN and firstly we need to initialize using Epochs, Iterations, and Neurons (N) etc.For I = 1 ⟶ T = Row × Col.If EM (I) belongs to BMGroup (1) = BackgroundElse//EM belongs to ROIGroup (2) = ForegroundEnd-IfEnd-ForCall pattern net CNN for training of system using BM and ROI dataFCM-CNN = Pattern-net (Neurons)FCM-CNN = Train (FCM-CNN, EM, Group)ROI = Sim (FCM-CNN, ROI data)If ROI (Pixel) = ROIROI = EMElseBM = EMEnd-IfReturn: BM and ROI as an improved segmented background and foreground of medical imageEnd–AlgorithmWe obtained better-segmented results for the proposed hybrid mechanism of FCM with CNN as compared to the FCM,K-means, and improvisation in FCM with PSO, improvisation in K-means with PSO and results with the original medical image shown in Figure 8.Figure 8
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image using FCM with CNN.


## 3.3.2.K-Means with CNN-Based Segmentation

The concept of CNN as a deep learning mechanism along with theK-means used in this scenario and similar to algorithm 6, a hybrid CNN mechanism with K-means is shown in Figure 9.Figure 9
K-means with CNN for segmentation.Figure9 illustrated the process of medical image segmentation using hybridization of FCM with CNN and the algorithm of K-means with PSO segmentation written below in Algorithm 7.Algorithm 7:K-means with CNN based Segmentation.
Input: EM ⟶ Enhanced Medical ImageOutput: BM and FM (ROI) ⟶ Background and ForegroundStart HybridisationApplyK-means and create BM and ROITo optimize the ROI, here we used CNN, and first, we need to initialize using Epochs, Iterations, Neurons (N) etc.For I = 1 ⟶ T = Row × Col.If EM (I) belongs to BMGroup (1) = BackgroundElse//EM belongs to ROIGroup (2) = ForegroundEnd-IfEnd-ForCall pattern net CNN for training of system using BM and ROI dataFCM-CNN = Pattern-net (Neurons)FCM-CNN = Train (FCM-CNN, EM, Group)ROI = Sim (FCM-CNN, ROI data)If ROI (Pixel) = ROIROI = EMElseBM = EMEnd-IfReturn: BM and ROI as an improved segmented background and foreground of medical imageEnd–AlgorithmIn comparison to FCM,K-means, FCM with PSO, CNN, and K-means with PSO, we achieved better-segmented results for the proposed hybrid mechanism of K-means with CNN, and results with the original medical image are displayed in Figure 10.Figure 10
(a) Original. (b) Pre-processed. (c) Mask. (d) ROI. (e) Segmented image usingK-means with CNN.Finally, performance parameters for different types of datasets are calculated and compared using a comparison framework simulation in terms of Precision, Recall,F-measure, Accuracy, Error, MCC, DC, JC, and time.


## 3.4. Collected Dataset

### 3.4.1. Brain Tumor Segmentation (BraTS) Dataset

The sample images of the BraTS dataset are shown in Figure11, it is a standard dataset obtained from “https://www.med.upenn.edu/sbia/brats2018/data.html” having MRI images [35]. For the simulation of the model, 50 DICOM files were converted into JPG format that is representing multi-frame superimposed brain images.Figure 11
BraTS dataset.


### 3.4.2. Acute Lymphoblastic Leukaemia Image Database (ALL-IDB) Dataset

The dataset contains 2008 images that were collected in September 2005 in the Image Processing Department of Computer Science-UniversitàdegliStudi di Milano” [36]. The ALL-IDB dataset of microscopic images is freely available for scientific research purposes from “https://homes.di.unimi.it/scotti/all/” and the sample of ALL-IDB dataset images is shown in Figure 12.Figure 12
ALL-IDB dataset.The used dataset contains approximately 39,000 blood counts, and oncologists labeled the lymphocytes. We resize the original microscopic images of blood samples into a size of 256 × 256 and a total of 2000 images were used in this research work.


### 3.4.3. ISIC-2018 Dataset

It contains the human lesion analysis toward melanoma detection and the dataset is in the form of dermoscopic images. The dataset is available fromhttps://challenge2018.isic-archive.com/task1/training/ [37]. To capture images, the dermoscopic process is used which is an imaging technique to eliminate the surface reflection of human skin. It provides improved diagnostic accuracy and the sample of the ISIC-2018 dataset is shown in Figure 13.Figure 13
ISIC dataset.


### 3.4.4. CT-Scan Dataset

The database currently consists of an image set of 50 lung CT scans for research purposes which is publicly available from “http://www.via.cornell.edu/lungdb.html” [38]. A sample of dataset CT-scan images is shown in Figure 14.Figure 14
Sample of dataset CT-scan images.After executing the methodology’s outlined steps, the performance has been evaluated in terms of several parameters, as discussed in the result and discussion section.


## 3.4.1. Brain Tumor Segmentation (BraTS) Dataset

The sample images of the BraTS dataset are shown in Figure11, it is a standard dataset obtained from “https://www.med.upenn.edu/sbia/brats2018/data.html” having MRI images [35]. For the simulation of the model, 50 DICOM files were converted into JPG format that is representing multi-frame superimposed brain images.Figure 11
BraTS dataset.


## 3.4.2. Acute Lymphoblastic Leukaemia Image Database (ALL-IDB) Dataset

The dataset contains 2008 images that were collected in September 2005 in the Image Processing Department of Computer Science-UniversitàdegliStudi di Milano” [36]. The ALL-IDB dataset of microscopic images is freely available for scientific research purposes from “https://homes.di.unimi.it/scotti/all/” and the sample of ALL-IDB dataset images is shown in Figure 12.Figure 12
ALL-IDB dataset.The used dataset contains approximately 39,000 blood counts, and oncologists labeled the lymphocytes. We resize the original microscopic images of blood samples into a size of 256 × 256 and a total of 2000 images were used in this research work.


## 3.4.3. ISIC-2018 Dataset

It contains the human lesion analysis toward melanoma detection and the dataset is in the form of dermoscopic images. The dataset is available fromhttps://challenge2018.isic-archive.com/task1/training/ [37]. To capture images, the dermoscopic process is used which is an imaging technique to eliminate the surface reflection of human skin. It provides improved diagnostic accuracy and the sample of the ISIC-2018 dataset is shown in Figure 13.Figure 13
ISIC dataset.


## 3.4.4. CT-Scan Dataset

The database currently consists of an image set of 50 lung CT scans for research purposes which is publicly available from “http://www.via.cornell.edu/lungdb.html” [38]. A sample of dataset CT-scan images is shown in Figure 14.Figure 14
Sample of dataset CT-scan images.After executing the methodology’s outlined steps, the performance has been evaluated in terms of several parameters, as discussed in the result and discussion section.


## 3.5. Evaluation Metric

In this part, we have outlined the assessment measures used to verify the effectiveness of the suggested techniques. First of all, we have observed quantitative metrics such as Accuracy. In most cases, the efficiency of a models is measured in terms of its accuracy. However, in medical image segmentation, the model’s accuracy is insufficient to provide a precise understanding of the model. Therefore, there are several additional measures, such as precision, recall, Error, andF1 score, to assess segmentation quality. In order to analyze and comprehend the ability of the models, we have made use of each of these measures.Moreover, we have considered similarity metrics such as Matthews’s Correlation Coefficient (MCC), Dice coefficient (DC), and Jaccard Coefficient (JC). Each similar metric has a few special characteristics to evaluate the true performance of the selected segmentation techniques. If all of the probabilistic methods, including true positives, true negatives, false negatives, and false positives, provide a high score, then the MCC algorithm will generate a higher score [39]. Similarly, DC deals with the missing data in image segmentation-related problems [40]. Both quantitative and similar metrics are considered in our study, which provides more robust comparisons and preferences of the specified segmentation techniques [41].


## 4. Results and Discussion

In this research work, we proposed a comparative framework for the medical image segmentation from various types of images such as MRI, Dermoscopic, Microscopic, and CT-scan images using the six different scenarios such as FCM,K-means, and improvisation of FCM using PSO, improvisation of K-means with PSO, improvisation of FCM with CNN and improvisation of K-means with CNN. Simulation results of the offered scenario are shown in Table 1 based on the quantities parameters.Table 1
Comparison of simulation results based on quantities parameters.
ParametersFCMK-meansFCM + PSOK-means + PSOFCM + CNNK-means + CNNPrecisionNo. of images500.81980.82910.84220.84740.86270.86991000.81540.82610.82950.84220.84480.85915000.84690.85830.86670.86940.87650.919710000.89880.90520.91380.92370.92650.943120000.96470.97250.97290.97370.98210.9821RecallNo. of images500.80970.83070.84410.85750.85990.86111000.82680.82820.83920.84300.86510.87015000.86080.86420.87920.88950.89990.919010000.88640.88920.89240.90370.92320.942120000.96170.96610.96730.98030.98310.9851F-measureNo. of images500.81470.82980.83640.85240.86120.86541000.82110.82710.83250.84260.85480.86455000.85370.86120.86860.87930.88800.919310000.89250.89710.89870.91350.92480.942620000.96310.96920.96980.97690.98250.9835Accuracy (%)No. of images5078.830779.525680.384181.581687.834692.843210080.398981.423782.539384.349589.800795.103050085.023586.779889.032690.011790.115396.3699100088.335989.248989.637889.686294.760498.2569200096.056996.069096.110197.603598.550199.6902Error (%)No. of images5021.169320.474413.439319.61612.16547.156810019.601118.576310.360717.460710.19934.897050014.976513.22026.285810.96749.88473.6301100011.664110.75114.926910.36225.23961.743120003.94313.9312.44563.88991.44990.3098There are five separate sets of data that included a varied number of images considering 50, 100, 500, 1000, and 2000 images. We have considered an equal number of images from each dataset to produce five specified subsets. Then we applied various segmentation techniques to the subsets of data. The concluded result has been described using different metrics such as precision, recall, accuracy, and F-measure, as shown in Table1 and Figure 15.Figure 15
Comparison of simulation results based on quantities parameters. (a) Precision. (b) Recall. (c)F-measure. (d) Accuracy. (e) Error.
(a)(b)(c)(d)(e)From Table1 and Figure 15, we observed that the simulation results of proposed frameworks, and hybridization of the K-means with CNN is superior to other modules in terms of the quantities parameters. Improvements in quantities parameters are clearly visible in Figure 15 and average accuracy is 85.72%, 86.06%, 87.54%, 88.64%, 92.21%, and 96.45% for FCM, K-means, FCM with PSO, K-means with PSO, FCM with CNN, and K-means with CNN, respectively. So, we can say that the effect of CNN on K-means for medical image segmentation is far better than other combinations. However, we need to validate the model based on similar parameters such as MCC, DC, JC, and computational time.Therefore, the simulation results based on the similar values have been given in Table2. In terms of similarities parameters, also K-means with CNN is superior to other modules for all the similarities metrics such as MCC, JC, and CD. The required time for K-means with CNN is slightly higher than other models. However, the change is extremely minute and may safely be ignored as a result. FCM with CNN is the second most successful segmentation technique based on both quantitative and similarity metrics. Also, it is transparent that the CNN-based optimized segmentation techniques performed better than both swarm intelligence and traditional methods.Table 2
Comparison of simulation results based on similar parameters.
ParametersFCMK-meansFCM + PSOK-means + PSOFCM + CNNK-means + CNNMCCNo. of images500.77490.79170.80140.84470.88930.97061000.77920.79990.81080.86510.91570.97135000.80080.82160.81250.88580.93940.98410000.80220.83050.85870.88820.9450.985720000.81510.86560.87340.90230.94850.9979JCNo. of images500.76260.80850.80470.84180.89820.96681000.78530.81350.80920.86020.89930.97175000.78040.83240.84160.88340.91650.979310000.81840.84060.85620.89120.93630.986720000.82250.85620.87580.89570.94890.9871CDNo. of images500.78060.83490.84330.88970.89410.96081000.82400.84070.85280.89750.89860.96105000.82450.84310.86380.91580.90760.969510000.85460.84620.87770.92210.92150.986520000.86920.88790.87810.94730.92720.9888TimeNo. of images507.89868.171858.219998.258398.452258.54191008.12518.129818.133758.373628.509338.533675008.410278.478568.666528.792468.836699.1877710008.826378.900738.921929.012429.285759.404220009.601459.637019.696369.740119.767119.79502Achieving maximum accuracy is the goal of the proposed framework with a fast response to segmentation with pre-processing. The proposed framework offers an extremely self-configurable and standalone mechanism with lots of deep learning interfaces. In addition, our suggested framework generated robust models for segmenting the region of interest in various issues. So, it is a universal framework for medical image segmentation. However, to validate the efficiency of the system, we need to compare it with state-of-the-artwork based on their accuracy in Table3.Table 3
Comparison with existing works.
Previous worksAccuracy (%)ANN (artificial neural network) for brain tumor images [17]94.07K-means clustering with SVM classifier for brain tumor [18]93.00CNN for skin lesions [23]93.80Swarm-based PSO inertia-weighted PSO for lung cancer [30]95.81SVM classifier for skin lesions [42]94.00FFBPNN (feed forward back propagation neural networks) for lung cancer [43]92.60VGG-SegNet for lung nodules [44]99.68K-means for brain tumor [45]94.06Deep learning with auxiliary task for skin lesions [46]94.32U-net and attention U-net for skin lesions [47]0.913 and 0.913Semantic segmentation for leukaemia [48]99.10Proposed modelsAverage accuracy (%)FCM85.72K-means86.61FCM with PSO87.54K-means with PSO88.64FCM with CNN92.21K-means with CNN96.45It is clear that the previous study was conducted on a single issue such as skin lesions, brain tumors, lung cancer, or leukemia (as shown in Table3). However, our study aims to build a universal model for dealing with all the issues. In our case, we have found an average accuracy of 96.45 with K-means with CNN.


## 5. Conclusion

In this study, we have introduced a comparative framework for medical image segmentation with traditional, swarm intelligence and convolutional neural networks as a deep learning mechanism. This framework helps to design a real-time universal medical diagnosis system for various types of images such as MRI for brain data analysis, dermoscopic for skin, microscopic for blood leukemia, and CT-scan images for lungs. Here, we present a comparative study using six different scenarios such as FCM,K-means, improvisation of FCM using PSO, improvisation of K-means with PSO, improvisation of FCM with CNN, and improvisation of K-means with CNN. We proved the functionality of K-means with CNN is a powerful hybrid mechanism that achieves 96.45% accuracy whereas, other mechanisms achieve 85.72%, 86.61%, 87.54%, 88.64%, and 92.21% FCM, K-means, and improvisation of FCM using PSO, improvisation of K-means with PSO, improvisation of FCM with CNN and improvisation of K-means with CNN respectively. We also found that CNN-based optimized algorithms performed well compared to optimized swarm intelligence and/or traditional methods. We expect that in the future, it will aid in the transition of medical image segmentation from research laboratories to operational or real-time applications.



---

*Source: 7935346-2022-08-24.xml*