# Efficient COVID-19 CT Scan Image Segmentation by Automatic Clustering Algorithm

Authors: Basu Dev Shivahare; S. K. Gupta
Journal: Journal of Healthcare Engineering
 (2022)

---

## Abstract

This article addresses automated segmentation and classification of COVID-19 and normal chest CT scan images. Segmentation is the preprocessing step for classification, and 12 DWT-PCA-based texture features extracted from the segmented image are utilized as input for the random forest machine-learning algorithm to classify COVID-19/non-COVID-19 disease. Diagnosing COVID-19 disease through an RT-PCR test is a time-consuming process. Sometimes, the RT-PCR test result is not accurate; that is, it has a false negative, which can cause a threat to the person’s life due to delay in starting the specified treatment. At this moment, there is an urgent need to develop a reliable automatic COVID-19 detection tool that can detect COVID-19 disease from chest CT scan images within a shorter period and can help doctors to start COVID-19 treatment at the earliest. In this article, a variant of the whale optimization algorithm named improved whale optimization algorithm (IWOA) is introduced. The efficiency of the IWOA is tested for unimodal (F1–F7), multimodal (F8–F13), and fixed-dimension multimodal (F14–F23) benchmark functions and is compared with the whale optimization algorithm (WOA), salp swarm optimization (SSA), and sine cosine algorithm (SCA). The experiment is carried out in 30 trials and population size, and iterations are set as 30 and 100 under each trial. IWOA achieves faster convergence than WOA, SSA, and SCA and enhances the exploitation and exploration phases of WOA, avoiding local entrapment. IWOA, WOA, SSA, and SCA utilized Otsu’s maximum between-class variance criteria as fitness function to compute optimal threshold values for multilevel medical CT scan image segmentation. Evaluation measures such as accuracy, specificity, precision, recall,Gmean, F_measure, SSIM, and 12 DWT-PCA-based texture features are computed. The experiment showed that the IWOA is efficient and achieved better segmentation evaluation measures and better segmentation mask in comparison with other methods. DWT-PCA-based texture features extracted from each of the 160 IWOA-, WOA-, SSA-, and SCA-based segmented images are fed into random forest for training, and random forest is tested with DWT-PCA-based texture features extracted from each of the 40 IWOA-, WOA-, SSA-, and SCA-based segmented images. Random forest has reported a promising classification accuracy of 97.49% for the DWT-PCA-based texture features, which are extracted from IWOA-based segmented images.


---

## Body

## 1. Introduction

Image segmentation is the preprocessing step for analyzing a medical image and is utilized in classification applications. Important features such as texture and shape-based features are extracted from the segmented image. COVID-19 is highly contagious and spreads through contact and respiratory illness [1, 2]. It is a challenging task to determine COVID-19 disease in humans accurately through RT-PCR [3, 4] and rapid antigen kit. People who are affected by coronavirus may feel symptoms such as trouble in breathing, chest pain, belly pain, and pressure in the chest. Diagnosing COVID-19 disease via RT-PCR is a time-consuming process, and when coronavirus cases were at the peak, the RT-PCR test results were available 48 hours after the sample collection. Since treatment can only be started after obtaining the result, people have to wait till the disease reach studies its worst level, significantly increasing the chances of death. Sometimes, the RT-PCR test is not accurate; that is, has a false result, then it may be a threat to a person’s life due to the late start of specified treatment. As per the above scenario, there is an urgent need to develop a reliable automatic COVID-19 detection tool that detects COVID-19 disease from chest CT scan images within a shorter time and may help doctors to start COVID-19 treatment at the earliest. Chiranji Lal et al. [5] discussed various medical imaging modalities and surveyed various segmentation techniques. Manual medical image segmentation by a medicinal professional is a time-consuming process, and the diagnosis might be erroneous. Sonam Aggarwal et al. [6] have made comparative analysis among various pretrained DL models for detection and classification of COVID-19 from normal and pneumonia images. Shiv Naresh et al. [7] applied the region-based active contour method and convex hull approach to segment and detect brain tumours from the BRATS 2015 dataset. The average sensitivity, PPV, and DSC were 92% for a complete brain tumour, 83% for an enhanced brain tumour, and 81% for brain tumour core. Adnan Saood et al. [8] utilized U-net and SegNet to segment COVID-19 lung CT scan images. SegNet achieved 95% mean accuracy in classifying infected/noninfected tissues. Arjun Sarkar et al. [9] used Vision Pro and Cognex DL software classified chest X-ray from the COVIDx dataset. Vision Pro achieved a 95.3% F-score on a segmented image and 94% on the entire image as ROI and performed better than COVID-Net. Nilesh Bhaskarrao Bahadure et al. [10] applied Berkeley wavelet transformation for brain tumour segmentation, and extracted features from the segmented images were utilized by SVM to classify into normal/abnormal tissue. Shaoqiong Huang et al. [11] applied DL-based attention Gabor network (Agnet) for lung segmentation, which achieved better segmentation accuracy in FMLCD and LiTS datasets than FCN, U-Net, U-Net++, and Attention U-Net. Saumya Ranjan et al. [12] utilized pretrained DL models to detect COVID-19/normal from chest X-ray images. The proposed method with various pretrained DL models accuracy varies between 92.50% and 98.33%. The proposed method with Res-net 34 achieved 98.33% accuracy. Armando Ugo Cavallo et al. [13] extracted 308 texture features per ROI from chest X-ray and analyzed pneumonia infection in COVID-19 patients using machine-learning models. Metaheuristic algorithms [14] are becoming more popular because they do not require gradient information, have ability to avoid entrapment into local optima, and are utilized to solve complex optimization problems efficiently. Mohamed Abd El Aziz et al. [15] presented Moth Flame optimization and WOA separately using the Otsu method for multilevel thresholding image segmentation. The best fitness result, time complexity, and segmentation quality metrics of PSNR, SSIM, and ANOVA tests were computed for WOA, MFO, and other swarm-based algorithms. WOA and MFO performed better than other algorithms. A.A.Ewees et al. [16] proposed the whale optimization algorithm (WOAMOP) with Otsu’s and Kapur’s entropy utilized as the fitness function to determine the optimal set of thresholds. The proposed method has been compared with WOA, FA, Social Spider Optimization (SSO), and FASSO. The average fitness result, CPU processing time, multilevel threshold values, SSIM, and PSNR were evaluated over 30 runs and 100 iterations for the proposed method along with other algorithms. WOAMOP achieved better segmentation quality metrics PSNR and SSIM for threshold number k = 2,3,4, and 5. Seyedali Mirjalili et al. [17] proposed salp swarm algorithm (SSA) and multiobjective problems are solved by multiobjective salp swarm algorithm. The SSA first explores the search space and then performs the exploit phase. In the SSA, the position of follower salps is updated to achieve the global position. The efficiency of the SSA is tested on F1–F19 benchmark functions for 30 trials, population size is set as 30 and 500 iterations in each run, and the statistical results such as standard deviation and mean are compared with PSO, GSA, BAT, flower pollination algorithm (FPA), SMS, firefly algorithm (FA), and genetic algorithm (GA). The SSA is able to explore the most promising area of problems and obtains better mean standard deviation values and outperforms in majority of unimodal, multimodal, and composite test functions. Seyedali Mirjalili [18] proposed a sine cosine algorithm (SCA) to solve optimization problems. The efficiency of the SCA is tested on F1–F19 benchmark functions for 30 trials, the population size is set as 30 and 500 iterations in each run, and the statistical results such as standard deviation and mean are compared with PSO, GA, BAT, and Flower Pollination Algorithm (FPA). The SCA establishes a balance between exploration and exploitation to find global optima and achieves fast convergence behavior than the other algorithms. BD Shivahare and S.K.Gupta [19] applied a randomized spiral phase-based whale optimization algorithm and evaluated multilevel optimal threshold and segmentation metrics such as PSNR, SSIM, MSE, and average difference. Kapil Kumar Gupta et al. [20] proposed hybrid K-means clustering and fuzzy C means algorithm for brain tumour segmentation and classification of benign/malignant brain tumours. V.Viswa Priya and Shobarani [21] proposed a contextual clustering algorithm to perform brain tumour segmentation. A. Renugambal and K. Selva Bhuvaneswari [22] applied hybrid water cycle moth flame optimization to obtain optimal thresholds for brain MR image segmentation. Otsu’s maximum between-class variance criteria are utilized as the objective function. WCMFO has achieved a fast convergence rate to compute optimal thresholds and has improved quantitative metrics such as PSNR, CPU time, and std. deviation. Mohammad Hashem Ryalat et al. [23] applied PSO, DPSO, and FODPSO algorithms on three brain tumour MR images, performed segmentation and volume reconstruction, and identified tumours that affected the head and neck. FODPSO has performed better than others in terms of speed, accuracy, and stability. Dilbag Singh et al. [24] proposed a MADE-based deep convolution neural network model to diagnose COVID-19 disease from chest X-rays. Multiobjective adaptive differential evolution (MADE) is used to overcome hyperparameters tuning issues of the deep convolution neural network. The accuracy of the proposed model ranges between 93% and 97%. El abbadi, Nidhal & Faisal, Zahraa [25] proposed a method to segment brain tumour and classification. The authors used 3-level DWT to extract features from tumour-detected region and utilized the PCA to reduce the dimensions of features. Twenty brain MRI images and 45 brain MRI images were used to train and test ANN, respectively. Thirteen statistical and texture features were used as input to ANN for classification. Abdalla Mostafa et al. [26] applied the whale optimization algorithm to compute various clusters and utilized statistical images for liver image segmentation. Maximum, minimum, and average quantitative metrics such as accuracy, SSIM, precision, and si are evaluated. Mohamed Abd Elaziz et al. [27] proposed density peak clustering with general extreme values (DPCGEVs) on 12 COVID-19 CT scan images to compute optimal thresholds. The proposed algorithm was compared with K-means and DPC and has performed better in terms of entropy, SSIM, and PSNR. Image Segmentation is a preprocessing step. The classification task is performed by a machine-learning model based on extracted features of the segmented image.To analyze and diagnose disease from medical imaging through manual segmentation is a time-consuming process. In the field of medical science, a huge number of medical images are generated by computer-aided devices every day; therefore, it is very difficult to analyze and diagnose these medical images efficiently with manual segmentation method. Deep learning (DL) approaches are widely used in the medical image segmentation field. DL models [27] require vast training using a huge number of images and may not report good accuracy due to a limited number of images, and unsupervised machine-learning approaches such as clustering algorithms do not require training for images and are suitable to compute thresholds for multilevel image segmentation [17–19]. DL models suffer from hyperparameters tuning setting and overfitting issues. To overcome these issues, Kaur et al. [28] proposed a metaheuristic-based DL model to diagnose COVID-19 disease.In this article, the authors propose a variant of the whale optimization algorithm named improved whale optimization algorithm (IWOA) utilizing the Otsu thresholding method as the fitness function to compute optimal thresholds for multilevel image segmentation. The efficiency of the proposed method, IWOA, has been compared with other nature-inspired metaheuristic algorithms such as whale optimization algorithm, salp swarm algorithm, and sine cosine algorithm on 23 benchmark functions as described in Section4.2. The IWOA achieves faster convergence than others, enhances the exploitation and exploration phase of WOA, and avoids local entrapment. Each of metaheuristic algorithms such as IWOA, WOA, SSA, and SCA utilized Otsu’s maximum between-class variance criteria as the objective function to compute optimal threshold values at threshold number k = 3 on 200 COVID-19 and normal chest CT scan images for multilevel image segmentation. Two-level DWT with the Haar wavelet filter is used to extract the features from the segmented image, and then, the PCA is used to reduce dimensions of features. Twelve DWT-PCA-based texture features are extracted from the segmented image and used as input into the random forest machine-learning algorithm for classification. The experiments have been conducted on 200 COVID-19 and normal chest CT scan images for image segmentation at threshold number k = 3, described in Section 4.3. Performance of the proposed image segmentation method and other algorithms has been analyzed using 21 parameters such as fitness score, optimal threshold values, and segmentation quality metrics such as structural similarity index (SSIM), accuracy, sensitivity, specificity, precision, F_measure, Gmean, and 12 DWT-PCA-based texture features (Algorithm 1).


## 2. Materials and Methods

### 2.1. Problem Formulation

The aim of multilevel thresholding is to find bestk threshold values, which are computed by Otsu’s maximum between-class variance criteria. The Otsu method is used as fitness function and popular image thresholding method to determine multiple threshold values. Therefore, for tk, k = 1, 2, 3, …, k {t1, t2, t3, …, tk} thresholds, the image is segmented into k + 1 classes or levels. The range of each class is described as follows:Class1 = {I (x, y) ε G | 0 ≤ G (x, y) ≤ t1}Class2 = {I (x, y) ε G |t1 + 1 ≤ G (x, y) ≤ t2}..…Classk+1 = {I (x, y) ε G | tk + 1 ≤ G (x, y) ≤ L − 1}Here,I (x, y) represents the intensity of pixel (x, y) of gray-level image G and L is gray levels L ε [0,255].Best threshold values are computed by maximizing the following equation:(1)t1∗,t2∗,…,tT∗=maximizet1,t2,…,tTFitnesst1,t2,…,tT,where Fitness (t1,t2,…,tT) is formulated as the following equation:(2)Fitnesst1,t2,…,tT=∑i=t1tTwiµi−µT2,where wi and µi represent the weight and mean of ith class, respectively, and µT represents the total mean of the class. The weight of the ith class is given as follows:(3)wi=∑j=titi+1−1pj.Here,pj represents the probability of the jth class and defined as follows:(4)pj=hjH.Here,h (j) is the frequency of j gray level and H represents the total number of pixels.The class meansµi and µT are represented in the following equations, respectively:(5)µi=∑j=titi+1−1ipjwj,(6)µT=∑j=0L−1jpj.The following conditions must be satisfied:(7)∑i=1k+1wiµi=µT,∑i=1k+1wi=1.


### 2.2. Whale Optimization Algorithm

Mirjalili et al. [14] introduced the whale optimization algorithm (WOA), which is widely used to solve global optimization problem by emulating the humpback behavior. The WOA is gradient-free, avoids entrapment into local optima, and has ability to obtain optimal solution. Generally, these whales first encircle the target prey by forming bubbles of circular path or a path shaped like “9.” The WOA establishes the balance between exploration and exploitation phases. The exploration and exploitation phases performed by the WOA is described in Sections 2.2.1 and 2.2.2, respectively.


#### 2.2.1. Exploration Phase

In the exploration phase, whale is randomly selected from search space to obtain towards global or best position to obtain the close location of target prey. The position of whale is updated using the random position of whaleX⟶rand for | A|⟶ ≥ 1. The updated position of whale under the exploration phase is presented in the following equation:(8)D1⟶=C⟶.X⟶rand−Xt⟶,P⟶i+1=X⟶rand−A⟶.D1⟶,where D1⟶ is distance between current search agent Xt⟶ and randomly selected whale or search agent X⟶rand from search space.


#### 2.2.2. Exploitation Phase

In the WOA, the exploitation phase is performed by bubble net foraging behavior. Bubble creation behavior by humpback whale is done in two phases.(a) Shrinking Encircling Prey. In this phase, the value of a is shrinking linearly from 2 to 0 over the successive iterations (t) and vector A⟶ has a random value between [−1, 1] over the course of iterations. The encircling phase is expressed using the following equation:(9)P⟶i+1=X⟶bi−A⟶.D⟶,where P⟶ (i + 1) represents the updated position of the search agent in n dimension at iteration t and X⟶b is the positions of best search agent. Coefficient vector A⟶ is mathematically defined in the following equation:(10)A=2a⟶·r−a⟶.D denotes distance from the best agent, which is defined as follows:(11)D=C⟶.X⟶bt∼X⟶t.Here,X⟶t represents the positions of the search agent in search space at iteration t. Adjustment factor C⟶ helps the search agents to exploit the local areas in search space and is defined as(12)C⟶=2·r.Here,r is a randomly generated number r ε (0, 1) and a⟶ represents the vector.(b) Spiral Updating Position. The updated position of search agents or whales under the spiral formation phase is mathematically expressed as(13)P⟶i+1=D′.ebℓ.cos2πl+X⟶bt,where ℓ controls a2 parameter, b deﬁnes spiral shape, and (D′) represents the distance between search agent and target prey as deﬁned in the following equation:(14)D′=X→bt−X→t.ℓ is mathematically expressed in the following equation:(15)ℓ=a2–1∗rand+1,where “a2” is decreasing linearly from −1 to −2 over the successive iterations t and expressed as the following equation:(16)a2=–1+t∗–1Itermax.The exploitation phase of the WOA is implemented with equal probabilities using the following equation:(17)P⟶i+1=Encircling phase9,p<0.5,Spiral phase13,p≥0.5,where pε (0, 1) is randomly generated number.Algorithm 1: Whale optimization algorithm (WOA) [14].
(1)
Input: initialize randomly generated Population (Pi) in search space, i:  = 1, 2, …, n(2)
Output:G∗ (global position of best whale)(3)
while (iteration < MaxIteration) do(4)
Compute the ﬁtness of each whale and position of prey (G∗)(5)
for each whale do(6)
Updateℓ, a⟶p, A⟶, C⟶(7)
check (p<0.5)(8)
if |A| < 1(9)
Update the whale’s positions using encircling phase(10)
else if |A| ≥ 1(11)
Compute (Xrand) and update the whale’s position under exploration phase(12)
end if(13)
otherwise (p≥0.5)(14)
update the whale’s positions under spiral phase(15)
end step 8(16)
end step 5(17)
Limit the boundary of whales(18)
compute ﬁtness of each whale and prey (G∗)(19)
next iteration(20)
end step 3(21)
Return the optimized solutionG∗


## 2.1. Problem Formulation

The aim of multilevel thresholding is to find bestk threshold values, which are computed by Otsu’s maximum between-class variance criteria. The Otsu method is used as fitness function and popular image thresholding method to determine multiple threshold values. Therefore, for tk, k = 1, 2, 3, …, k {t1, t2, t3, …, tk} thresholds, the image is segmented into k + 1 classes or levels. The range of each class is described as follows:Class1 = {I (x, y) ε G | 0 ≤ G (x, y) ≤ t1}Class2 = {I (x, y) ε G |t1 + 1 ≤ G (x, y) ≤ t2}..…Classk+1 = {I (x, y) ε G | tk + 1 ≤ G (x, y) ≤ L − 1}Here,I (x, y) represents the intensity of pixel (x, y) of gray-level image G and L is gray levels L ε [0,255].Best threshold values are computed by maximizing the following equation:(1)t1∗,t2∗,…,tT∗=maximizet1,t2,…,tTFitnesst1,t2,…,tT,where Fitness (t1,t2,…,tT) is formulated as the following equation:(2)Fitnesst1,t2,…,tT=∑i=t1tTwiµi−µT2,where wi and µi represent the weight and mean of ith class, respectively, and µT represents the total mean of the class. The weight of the ith class is given as follows:(3)wi=∑j=titi+1−1pj.Here,pj represents the probability of the jth class and defined as follows:(4)pj=hjH.Here,h (j) is the frequency of j gray level and H represents the total number of pixels.The class meansµi and µT are represented in the following equations, respectively:(5)µi=∑j=titi+1−1ipjwj,(6)µT=∑j=0L−1jpj.The following conditions must be satisfied:(7)∑i=1k+1wiµi=µT,∑i=1k+1wi=1.


## 2.2. Whale Optimization Algorithm

Mirjalili et al. [14] introduced the whale optimization algorithm (WOA), which is widely used to solve global optimization problem by emulating the humpback behavior. The WOA is gradient-free, avoids entrapment into local optima, and has ability to obtain optimal solution. Generally, these whales first encircle the target prey by forming bubbles of circular path or a path shaped like “9.” The WOA establishes the balance between exploration and exploitation phases. The exploration and exploitation phases performed by the WOA is described in Sections 2.2.1 and 2.2.2, respectively.


### 2.2.1. Exploration Phase

In the exploration phase, whale is randomly selected from search space to obtain towards global or best position to obtain the close location of target prey. The position of whale is updated using the random position of whaleX⟶rand for | A|⟶ ≥ 1. The updated position of whale under the exploration phase is presented in the following equation:(8)D1⟶=C⟶.X⟶rand−Xt⟶,P⟶i+1=X⟶rand−A⟶.D1⟶,where D1⟶ is distance between current search agent Xt⟶ and randomly selected whale or search agent X⟶rand from search space.


### 2.2.2. Exploitation Phase

In the WOA, the exploitation phase is performed by bubble net foraging behavior. Bubble creation behavior by humpback whale is done in two phases.(a) Shrinking Encircling Prey. In this phase, the value of a is shrinking linearly from 2 to 0 over the successive iterations (t) and vector A⟶ has a random value between [−1, 1] over the course of iterations. The encircling phase is expressed using the following equation:(9)P⟶i+1=X⟶bi−A⟶.D⟶,where P⟶ (i + 1) represents the updated position of the search agent in n dimension at iteration t and X⟶b is the positions of best search agent. Coefficient vector A⟶ is mathematically defined in the following equation:(10)A=2a⟶·r−a⟶.D denotes distance from the best agent, which is defined as follows:(11)D=C⟶.X⟶bt∼X⟶t.Here,X⟶t represents the positions of the search agent in search space at iteration t. Adjustment factor C⟶ helps the search agents to exploit the local areas in search space and is defined as(12)C⟶=2·r.Here,r is a randomly generated number r ε (0, 1) and a⟶ represents the vector.(b) Spiral Updating Position. The updated position of search agents or whales under the spiral formation phase is mathematically expressed as(13)P⟶i+1=D′.ebℓ.cos2πl+X⟶bt,where ℓ controls a2 parameter, b deﬁnes spiral shape, and (D′) represents the distance between search agent and target prey as deﬁned in the following equation:(14)D′=X→bt−X→t.ℓ is mathematically expressed in the following equation:(15)ℓ=a2–1∗rand+1,where “a2” is decreasing linearly from −1 to −2 over the successive iterations t and expressed as the following equation:(16)a2=–1+t∗–1Itermax.The exploitation phase of the WOA is implemented with equal probabilities using the following equation:(17)P⟶i+1=Encircling phase9,p<0.5,Spiral phase13,p≥0.5,where pε (0, 1) is randomly generated number.Algorithm 1: Whale optimization algorithm (WOA) [14].
(1)
Input: initialize randomly generated Population (Pi) in search space, i:  = 1, 2, …, n(2)
Output:G∗ (global position of best whale)(3)
while (iteration < MaxIteration) do(4)
Compute the ﬁtness of each whale and position of prey (G∗)(5)
for each whale do(6)
Updateℓ, a⟶p, A⟶, C⟶(7)
check (p<0.5)(8)
if |A| < 1(9)
Update the whale’s positions using encircling phase(10)
else if |A| ≥ 1(11)
Compute (Xrand) and update the whale’s position under exploration phase(12)
end if(13)
otherwise (p≥0.5)(14)
update the whale’s positions under spiral phase(15)
end step 8(16)
end step 5(17)
Limit the boundary of whales(18)
compute ﬁtness of each whale and prey (G∗)(19)
next iteration(20)
end step 3(21)
Return the optimized solutionG∗


## 2.2.1. Exploration Phase

In the exploration phase, whale is randomly selected from search space to obtain towards global or best position to obtain the close location of target prey. The position of whale is updated using the random position of whaleX⟶rand for | A|⟶ ≥ 1. The updated position of whale under the exploration phase is presented in the following equation:(8)D1⟶=C⟶.X⟶rand−Xt⟶,P⟶i+1=X⟶rand−A⟶.D1⟶,where D1⟶ is distance between current search agent Xt⟶ and randomly selected whale or search agent X⟶rand from search space.


## 2.2.2. Exploitation Phase

In the WOA, the exploitation phase is performed by bubble net foraging behavior. Bubble creation behavior by humpback whale is done in two phases.(a) Shrinking Encircling Prey. In this phase, the value of a is shrinking linearly from 2 to 0 over the successive iterations (t) and vector A⟶ has a random value between [−1, 1] over the course of iterations. The encircling phase is expressed using the following equation:(9)P⟶i+1=X⟶bi−A⟶.D⟶,where P⟶ (i + 1) represents the updated position of the search agent in n dimension at iteration t and X⟶b is the positions of best search agent. Coefficient vector A⟶ is mathematically defined in the following equation:(10)A=2a⟶·r−a⟶.D denotes distance from the best agent, which is defined as follows:(11)D=C⟶.X⟶bt∼X⟶t.Here,X⟶t represents the positions of the search agent in search space at iteration t. Adjustment factor C⟶ helps the search agents to exploit the local areas in search space and is defined as(12)C⟶=2·r.Here,r is a randomly generated number r ε (0, 1) and a⟶ represents the vector.(b) Spiral Updating Position. The updated position of search agents or whales under the spiral formation phase is mathematically expressed as(13)P⟶i+1=D′.ebℓ.cos2πl+X⟶bt,where ℓ controls a2 parameter, b deﬁnes spiral shape, and (D′) represents the distance between search agent and target prey as deﬁned in the following equation:(14)D′=X→bt−X→t.ℓ is mathematically expressed in the following equation:(15)ℓ=a2–1∗rand+1,where “a2” is decreasing linearly from −1 to −2 over the successive iterations t and expressed as the following equation:(16)a2=–1+t∗–1Itermax.The exploitation phase of the WOA is implemented with equal probabilities using the following equation:(17)P⟶i+1=Encircling phase9,p<0.5,Spiral phase13,p≥0.5,where pε (0, 1) is randomly generated number.Algorithm 1: Whale optimization algorithm (WOA) [14].
(1)
Input: initialize randomly generated Population (Pi) in search space, i:  = 1, 2, …, n(2)
Output:G∗ (global position of best whale)(3)
while (iteration < MaxIteration) do(4)
Compute the ﬁtness of each whale and position of prey (G∗)(5)
for each whale do(6)
Updateℓ, a⟶p, A⟶, C⟶(7)
check (p<0.5)(8)
if |A| < 1(9)
Update the whale’s positions using encircling phase(10)
else if |A| ≥ 1(11)
Compute (Xrand) and update the whale’s position under exploration phase(12)
end if(13)
otherwise (p≥0.5)(14)
update the whale’s positions under spiral phase(15)
end step 8(16)
end step 5(17)
Limit the boundary of whales(18)
compute ﬁtness of each whale and prey (G∗)(19)
next iteration(20)
end step 3(21)
Return the optimized solutionG∗


## 3. Proposed Methodology

Step 1. Input Gray ImageStep 2. Preprocessing(a)
Apply median filter.(b)
Image resizing 256 × 256 pixels.Step 3. Each clustering algorithm IWOA, WOA, SSA, SCA utilize otsu’s maximum between variance criteria as fitness function to compute multilevel threshold values.Step 4. Image segmentation is performed by multilevel threshold values obtained by each algorithm.Step 5. Predicted segmentation mask and segmentation accuracy is obtained for each clustering method based segmented imageStep 6. Extract DWT-PCA based texture features to train random forest machine learning algorithmStep 7. Classify COVID-19/Non-COVID-19 disease by random forest algorithmIn Step 6, 2-level DWT with the Haar wavelet filter is used to extract features from the segmented image and then the PCA is applied to reduce the dimensions of features. Twelve DWT-PCA-based texture features extracted from each of the 160 IWOA, WOA, SSA, and SCA-based segmented images are fed into random forest for training, and random forest is tested with DWT-PCA-based texture features of each 40 IWOA, WOA, SSA, and SCA-based segmented images.In Step 7, 12 DWT-PCA-based texture features are used as input for random forest to classify COVID-19/non-COVID-19 status of patients.The flowchart of the proposed methodology is illustrated in Figure1.Figure 1
Flowchart of the proposed methodology.


### 3.1. The Proposed Metaheuristic Algorithm (IWOA)

In this section, a variant of the WOA, the improved whale optimization algorithm (IWOA) is proposed to determine the optimal thresholds for multilevel image segmentation utilizing the maximum between-class variance criteria of the Otsu method as defined in equation (2). The flowchart of the proposed algorithm, IWOA, is illustrated in Figure 2(b). In the flowchart, E1 refers to equation (21), E2 refers to equation (9), and E3 refers to equations (18) and (19). In spiral updating position, which was discussed in Section 2.2, the WOA may trap into local optima if the best search agent or whale is far away from global solution (X∗).Figure 2
(a) Variation ina2 parameter. (b) Flowchart of the proposed metaheuristic clustering algorithm (IWOA).
(a)(b)To avoid entrapment into local optima,(a)
Search agent’s position step in the WOA for |A| ≥ 1(exploration phase) and p≥0.5 (spiral phase) is modified.Updated positions of search agents for |A ≥ 1 under the exploration phase are mathematically modelled in the following equations:(18)D⟶=P⟶rand−Ps⟶wno,j.C,(19)P⟶t+1=P⟶rand−A⟶D⟶.Here,Ps⟶w_no represents the sorted position of whale number w_no at current iteration t and mathematically modelled in (20).(20)wno=roundpop−t∗pop−1T,Here, pop is population size of the search agent andT is maximum iteration.Updated positions of search agents forp≥0.5 is mathematically modelled in the following equation:(21)X⟶t+1=D′·ebl.cos2πl+Xs⟶t,whereXs⟶t represents the sorted position of whale, b deﬁnes the spiral shape, X⟶bt is the leader or global position of whale, and (D′) represents the distance between the best search agent and target prey as deﬁned in the following equation:(22)D′=X→bt−X→St.Generally,ℓ parameter is controlled by a2 parameter, and the modification step in a2 parameter is discussed as follows.(b)
In the whale optimization algorithm (WOA), exploitation is implemented using either the encircling phase or the spiral phase. The WOA follows the best whale to converge towards global optimal solution. The WOA may trap into local optima if the best whale is far away from global solution. To avoid entrapment into local optima, randomness is introduced in the spiral phase of the WOA. Generally,ℓ parameter is controlled by a2 parameter as described in (15). The value of a2 parameter is dynamically selected and lies between (−1, −2); that is, the value of a2 parameter is randomly selected in the range between [−1, −2] and may obtain a random value close to −2 at starting iterations (t) rather than linearly decreasing (−1 to −2) over the course of iterations. a2 parameter is mathematically modelled in the following equation:(23)a2=−1+−2+1∗rand.Now,ℓ parameter follows randomization in selection of its value in the spiral phase and avoids the possibility of trapping into local optima, premature convergence during the exploitation phase of the WOA.The efficacy of the proposed algorithm is described in Section4.2 and found that the exploration and exploitation capability of the WOA could be enhanced and chances to obtain global positions of the search agent are high over successive iterations.The flowchart of the proposed metaheuristic clustering algorithm (IWOA) is illustrated in Figure2(b).


## 3.1. The Proposed Metaheuristic Algorithm (IWOA)

In this section, a variant of the WOA, the improved whale optimization algorithm (IWOA) is proposed to determine the optimal thresholds for multilevel image segmentation utilizing the maximum between-class variance criteria of the Otsu method as defined in equation (2). The flowchart of the proposed algorithm, IWOA, is illustrated in Figure 2(b). In the flowchart, E1 refers to equation (21), E2 refers to equation (9), and E3 refers to equations (18) and (19). In spiral updating position, which was discussed in Section 2.2, the WOA may trap into local optima if the best search agent or whale is far away from global solution (X∗).Figure 2
(a) Variation ina2 parameter. (b) Flowchart of the proposed metaheuristic clustering algorithm (IWOA).
(a)(b)To avoid entrapment into local optima,(a)
Search agent’s position step in the WOA for |A| ≥ 1(exploration phase) and p≥0.5 (spiral phase) is modified.Updated positions of search agents for |A ≥ 1 under the exploration phase are mathematically modelled in the following equations:(18)D⟶=P⟶rand−Ps⟶wno,j.C,(19)P⟶t+1=P⟶rand−A⟶D⟶.Here,Ps⟶w_no represents the sorted position of whale number w_no at current iteration t and mathematically modelled in (20).(20)wno=roundpop−t∗pop−1T,Here, pop is population size of the search agent andT is maximum iteration.Updated positions of search agents forp≥0.5 is mathematically modelled in the following equation:(21)X⟶t+1=D′·ebl.cos2πl+Xs⟶t,whereXs⟶t represents the sorted position of whale, b deﬁnes the spiral shape, X⟶bt is the leader or global position of whale, and (D′) represents the distance between the best search agent and target prey as deﬁned in the following equation:(22)D′=X→bt−X→St.Generally,ℓ parameter is controlled by a2 parameter, and the modification step in a2 parameter is discussed as follows.(b)
In the whale optimization algorithm (WOA), exploitation is implemented using either the encircling phase or the spiral phase. The WOA follows the best whale to converge towards global optimal solution. The WOA may trap into local optima if the best whale is far away from global solution. To avoid entrapment into local optima, randomness is introduced in the spiral phase of the WOA. Generally,ℓ parameter is controlled by a2 parameter as described in (15). The value of a2 parameter is dynamically selected and lies between (−1, −2); that is, the value of a2 parameter is randomly selected in the range between [−1, −2] and may obtain a random value close to −2 at starting iterations (t) rather than linearly decreasing (−1 to −2) over the course of iterations. a2 parameter is mathematically modelled in the following equation:(23)a2=−1+−2+1∗rand.Now,ℓ parameter follows randomization in selection of its value in the spiral phase and avoids the possibility of trapping into local optima, premature convergence during the exploitation phase of the WOA.The efficacy of the proposed algorithm is described in Section4.2 and found that the exploration and exploitation capability of the WOA could be enhanced and chances to obtain global positions of the search agent are high over successive iterations.The flowchart of the proposed metaheuristic clustering algorithm (IWOA) is illustrated in Figure2(b).


## 4. Experiments and Discussion

### 4.1. Experimental Setting

The efficiency of the proposed method, IWOA, is compared with WOA, SSA, and SCA and discussed in Section4.2. Optimal thresholds are computed by the proposed methods, IWOA, WOA, SSA, and SCA, for multilevel chest CT scan image segmentation, which is presented in Section 4.3. All algorithms are programmed in “MATLAB 2019 a” and implemented in Windows 8 64-bit computer having Intel Core i3 @ 2 GHz, 4 GB RAM. Objective function’s best score, worst score, best threshold values, and segmentation measures of the proposed algorithm (IWOA) are compared with the other three algorithms, WOA [14], SSA [17], and SCA [18]. Each algorithm is tested on every image over 30 runs. For each run, whale/search agent population size and maximum iterations are set as 30 and 100, respectively, for threshold number k = 3. Algorithm parameters are listed in Table 1.Table 1
Parameters of each algorithm.
Algorithm/methodParametersValueImproved whale optimization algorithm (IWOA)a12 to 0a2[−1, −2]b1ℓ[−1, 1]Whale optimization algorithm (WOA)a12 to 0a2−1 to −2B1ℓ[−1, 1]Salp swarm algorithm (SSA)c12 to 0Sine cosine algorithm (SCA)A2r1, r2, r3, r4[0, 1]Dim (Threshold number)k3Upper bound XmaxUB255Lower bound XminLB0


### 4.2. Performance of IWOA on Standard Benchmark Problems

The efficacy of the IWOA is validated on twenty-three benchmark functions; that is, unimodal (F1–F7), multimodal (F8–F13), and fixed-dimension multimodal (F14–F23), and the results are compared with other nature-inspired algorithms, namely WOA [14], SSA [17], and SCA [18].The computation complexity of IWOA, WOA, SSA, and SCA is defined asO (N × Itermax) where Itermax and N represent the maximum number of iterations and swarm population size, respectively.In the literature, the WOA [14] has outperformed PSO, DE, FEP, and gravitational search algorithm (GSA). The SSA [17] has outperformed PSO, GSA, FPA, FA, BAT, SMS, and GA. The SCA [18] has outperformed PSO, GA, FPA, and BAT. Therefore, the computation results of PSO, DE, GSA, GA, FPA, BAT, and firefly (FA) are not included in this article.Table2 presents the best and worst fitness score obtained by executing each algorithm over 30 runs and 100 iterations under each run. Table 2 indicates that the IWOA and WOA both obtained similar fitness score and attained a maximum value for unimodal functions F1–F7 and multimodal F11–F13, but the IWOA achieved fast convergence and takes less number of iterations to obtain better fitness score than WOA, SSA, and SCA. The IWOA has achieved fast convergence behavior for F1–F6. SCA performed better for F7 followed by SSA, IWOA, and WOA. The IWOA obtained the best fitness score and fast convergence for F8, F9, and F10 fitness functions followed by WOA, SSA, and SCA, as shown in Figures 3–5.Table 2
The best and worst fitness values over 30 runs.
WOAIWOASSASCABestWorstBestWorstBestWorstBestWorstF13.0E + 053.0E + 053.0E + 053.0E + 052.71E + 052.48E + 052.75E + 052.52E + 05F21.0E + 301.0E + 301.0E + 301.0E + 303.41E + 291.09E + 292.01E + 280.703E + 28F39.45E + 079.45E + 079.45E + 079.45E + 077.64E + 076.04E + 074.73E + 073.20E + 07F4100100100100100100100100F52.50E + 092.50E + 092.50E + 092.50E + 091.92E + 091.80E + 092.07E + 091.89E + 09F63.03E + 052.97E + 053.03E + 053.03E + 052.60E + 052.48E + 052.62E + 052.50E + 05F712491249124912492332160525431660F880417701877886007156573843342898F91199107212041193972880848832F1022.0921.9022.3121.9821.9221.8321.5721.47F1127012701270127012331216324202266F127.68E + 097.68E + 097.68E + 097.68E + 096.06E + 095.55E + 096.67E + 095.85E + 09F131.23E + 101.23E + 101.23E + 101.23E + 101.09E + 100.98E + 101.01E + 100.94E + 10F14499.99499.99499.99499.99499.99499.99499.99499.99F15InfInfInfInfInfInfInfInfF1664006400640064006400640064006400F17308308308308505308308308F181.01e + 061.01e + 061.01e + 061.01e + 061.01e + 061.01e + 061.01e + 061.01e + 06F19−0.068−0.068−0.068−0.068−0.37E − 04−0.37E − 04−0.068−0.068F20−0.0051−0.0051−0.0051−0.0051−0.27E − 07−0.27E − 07−0.0051−0.0051F21−0.0412−0.0412−0.0412−0.0412−0.0377−0.0377−0.0377−0.0377F22−0.0504−0.0504−0.0504−0.0504−0.0504−0.0504−0.0504−0.0504F23−0.0784−0.0784−0.0784−0.0784−0.0784−0.0784−0.0784−0.0784Bold entries represent the best value.Figure 3
Convergence behavior of fitness function F2.Figure 4
Convergence behavior of fitness function F9.Figure 5
Convergence behavior of fitness function F6.Fitness functions F4, F14, F16, and F18 have similar fitness score for all algorithms over 30 runs. Overall, the IWOA achieved fast convergence and best score 11 times for F1, F2, F3, F5, F6, and F8–F13. For fitness functions F2, F3, and F13, the IWOA comes at first rank followed by the WOA at the second rank, SSA, and SCA. For fitness functions F1, F5, F6, F11, and F12, the IWOA achieved the first rank followed by the WOA (second rank), and SCA and SSA on the basis of fast convergence and best fitness score, respectively. SSA achieved fast convergence, best score, and first rank 6 times for fitness functions (F17, F19 to F23). For F19 and F20, SSA achieved first rank followed by IWOA, WOA, and SCA. For F21 to F23, SSA achieved first rank followed by SCA, IWOA, and WOA. SCA achieved the first rank twice for F7 due to the best score and fast convergence and for F18 due to fast convergence behavior.The IWOA achieved fast convergence and best score and attains first rank for 11 fitness functions (F1–F3, F5, F6, and F8–F13) followed by the WOA as second rank. The IWOA attains the second rank 3 times for fitness functions F18, F19, and F20. Exploitation and exploration capability of all algorithms have been evaluated with unimodal (F1–F7) and multimodal (F8–F23) functions, respectively. It can be seen from Table2 that the IWOA is a competitive and efficient optimizer for unimodal and multimodal functions and at least second in most cases.Thus, it can be said that the proposed method, IWOA, has better exploitation and exploration capability and could avoid entrapment into local optima as compared to the considered methods. The convergence behavior of F2, F9, F6, F10, F8, and F21 is shown in Figure3 to Figure 8 respectively, for IWOA, WOA, SSA, and SCA.Figure 6
Convergence behavior of fitness function F10.Figure 7
Convergence behavior of fitness function F8.Figure 8
Convergence behavior of fitness function F21.


### 4.3. Benchmark Images

Performance of the proposed method (IWOA) and other methods (WOA, SSA, and SCA) utilized Otsu’s maximum between variance criteria as fitness function for COVID-19 and normal chest CT scan image segmentation at threshold numberk = 3 is evaluated on 200 randomly selected images from dataset1 [29] and dataset2 [30]. Each image has binary segmentation mask for dataset1. The image of dataset2 is resized to 256 × 256, and a binary segmentation mask is generated by simple linear iterative clustering (SLIC). Segmentation metrics from ground truths are computed.Some sample of gray scale images (Img001.png, Img008.png, Img023.png, Img050.png, Img056.png, Img061.png, Img072.png, Img075.png, Img080.png, Img091.png) from dataset1 [29] and sample of gray images (NonCovid4.png, NonCovid31.png, NonCovid79.png, NonCovid96.png, NonCovid109.png from dataset2 [30], named SImg 1 to SImg 15, respectively, are shown in Figure 9.Figure 9
Samples of gray scale images from SImg1 to SImg15.


### 4.4. Experimental Results and Discussion

Best fitness score (maximum fitness) and worst fitness score (minimum fitness) computed by the proposed method, IWOA, along with WOA, SSA, and SCA utilizing Otsu’s maximum between variance criteria for every image at threshold numberk = 3 are computed over 30 independent runs, and 100 iterations under each run are set for each algorithm, and the computation result of sample image is illustrated in Table 3.Table 3
Best and worst fitness scores of various algorithms.
ImagesBest fitness valuesWorst fitness valuesWOAIWOASSASCAWOAIWOASSASCASImg 127232725272327212723272427212712SImg 234623462346234593460346234623454SImg 333303332333233283329333433323325SImg 441654165416541624163416541654158SImg 5600605603596600602601562SImg 627722778277427722770277327722770SImg 715681575157215681566157315731566SImg 822342238223622332229223422322229SImg 913781384138413771374138213821374SImg 1011861190118911851181118811881180SImg 1119451948194619451943194719451943SImg 1223722384238023722370238223762369SImg 1316821689168816811679168416841678SImg 1421652170217021632163216821682163SImg 1517441749174717431741174617451741Multilevel optimal threshold value is computed by each method at threshold numberk = 3 of each image over 30 runs and optimal threshold values of sample image is illustrated in Table 4.Table 4
Best threshold values of various segmentation methods.
ImageIWOAWOASSASCASImg 135,50,6625,36,22775,192,24270,188,234SImg 2124,139,1988,27,3622,68,25445,133,194SImg 355,143,21831,52,12157,94,25465,143,213SImg 420,133,238102,109,13318,50,25439,156,211SImg 531,235,24440,114,16431,58,17445,174,198SImg 618,35,179137,162,25365,200,23456,124,189SImg 760,205,24985,152,24967,110,25470,137,221SImg 881,171,249135,184,20861,185,24258,134,197SImg 930,125,22417,170,18112,34,14360,124,168SImg 103,21,928,33,2044,27,15410,65,188SImg 11122,224,246101,178,18610,183,23439,126,254SImg 12143,151,214118,138,21144,113,19410,138,214SImg 13122,143,252141,216,2494,81,20125,127,214SImg 14116,135,196104,200,2164,78,15742,59,187SImg 15148,168,234172,182,23126,153,17947,145,254Quantitative metrics such as accuracy, sensitivity, specificity, precision, F_measure,Gmean, and SSIM are computed between segmented images by each method (IWOA, WOA, SSA, and SCA), and the respective ground truth/segmentation mask under each run and segmentation metrics for each image is computed by each method. Segmentation metrics for 15 sample images computed by each method is listed in Tables 5–8 as an average of 30 runs and further average segmentation metrics of 15 images are computed.Table 5
Quantitative metrics by the IWOA.
ImageAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.98040.89340.99560.97280.93140.94310.9509SImg 20.96660.90320.99130.97580.9380.94620.8701SImg 30.97320.9282110.96270.96340.9111SImg 40.98650.65880.99590.82460.73240.810.9344SImg 50.93990.7860.99190.97050.86850.8830.8037SImg 60.91140.76720.97730.93920.84450.86590.7109SImg 70.95080.68750.9850.86320.76530.82310.8028SImg 80.99240.72590.99640.75970.74240.85050.9662SImg 90.940.78530.99240.97240.86880.88280.8402SImg 100.96420.64480.99210.87720.74320.79980.8303SImg 110.99540.9875110.99370.99370.8003SImg 120.990610.98320.97940.98960.99160.8920SImg 130.99260.9886110.99430.99430.9227SImg 140.97420.9528110.97580.97610.9517SImg 150.984010.96730.96990.98470.98350.8504Avg.0.96950.84720.99120.94030.88900.91380.8691Bold entries represent the average value of 15 images.Table 6
Quantitative metrics by WOA.
ImageAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.93240.90060.93550.56870.69710.91780.8286SImg 20.91490.90760.91690.74810.82010.91220.6945SImg 30.88150.48350.99980.86270.61970.69530.9568SImg 40.98620.67050.99260.67800.67420.81580.9120SImg 50.88660.60690.90120.54250.57290.73950.7699SImg 60.75780.70170.60260.56630.62680.65030.6104SImg 70.90460.43960.91410.79500.56610.63390.7440SImg 80.96930.82070.99030.33430.47510.90150.9582SImg 90.92750.92310.90510.59760.72550.91400.7470SImg 100.96280.78930.96960.50440.61540.87480.8359SImg 110.97050.9246110.96080.96150.7500SImg 120.99050.9796110.98970.98970.7900SImg 130.989410.97150.98340.99160.98560.9037SImg 140.91720.8627110.92630.92880.8163SImg 150.972010.94390.94710.97280.97150.6242Avg,0.93090.80070.93620.74190.74890.85950.7961Bold entries represent the average value of 15 images.Table 7
Quantitative metrics by SSA.
ImagesAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.86920.88390.87220.77970.82850.87800.8077SImg 20.96350.90620.98520.95870.93170.94490.8267SImg 30.98620.98750.77700.52990.68970.87590.9560SImg 40.95460.32190.99820.92700.47790.56690.9103SImg 50.91060.58720.99040.93810.72230.76260.7976SImg 60.80970.78750.86700.42990.55620.82630.5781SImg 70.85900.65530.99710.97600.78410.80830.8133SImg 80.98930.82070.99030.33430.47510.90150.9581SImg 90.94000.97020.93230.78660.86880.95110.7280SImg 100.91850.41440.99500.92770.57290.64220.8300SImg 110.971510.95730.92130.9590.97810.8976SImg 120.967010.94310.92710.96210.97110.7480SImg 130.93390.8967110.94550.94690.6987SImg 140.974210.94900.95040.97460.97410.8765SImg 150.980910.96110.96400.98160.98030.8996Avg.0.93520.81540.94770.82340.78200.86720.8217Bold entries represent the average value of 15 images.Table 8
Quantitative metrics by SCA.
ImagesAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.87100.71160.87400.63270.66980.78860.80772SImg 20.75100.84230.74960.90580.87290.79460.6578SImg 30.97210.62710.78650.81230.70780.70230.9515SImg 40.95320.31560.99830.93310.47120.56130.9097SImg 50.92450.63490.98790.91990.75130.79190.8000SImg 60.73310.74790.74160.57840.65230.74480.5862SImg 70.94460.55050.98750.43960.48880.73730.8133SImg 80.94930.82070.99030.33430.47510.90150.9582SImg 90.79590.64700.79620.55740.59890.71770.7279SImg 100.96280.78930.96960.50440.61540.87480.8359SImg 110.99840.9957110.99780.99780.9893SImg 120.993510.98830.98570.99270.99410.6969SImg 130.765310.60550.63320.77540.77810.6184SImg 140.94260.8897110.94160.94320.7043SImg 150.96710.9415110.96980.97030.7456Avg.0.90160.76760.89830.74910.73200.81990.7868Bold entries represent the average value of 15 images.It is clear from Tables5–8 that the average segmentation metrics computed for 15 IWOA-based sample segmented images are better than those of the segmented images computed based on the other methods. Segmentation metrics such as accuracy, sensitivity, specificity, precision, F_measure, and Gmean are computed between binary segmentation image mask (predicted binary mask) and binary segmentation mask (ground truth) of the corresponding image from the dataset. SSIM is computed between gray-level segmentation image mask (predicted binary mask) and gray-level segmentation mask (ground truth) of the corresponding image from the dataset. Average segmentation metrics computed for 15 IWOA-, WOA-, SSA-, SCA-based segmentation images are compared and listed in Table 9 and shown in Figure 10. It is clear from Table 9 that the IWOA has achieved 1st rank in segmentation measures followed by SSA (2nd rank), WOA, (3rd rank), and SCA (4th rank).Table 9
Comparison of average segmentation metrics of IWOA, WOA, SSA, and SCA.
Segmentation measuresMethodsIWOAWOASSASCAAccuracy0.96950.93090.93520.9016Specificity0.99120.93620.94770.8983Precision0.94030.74190.82340.7491Sensitivity0.84720.80070.81540.7676F_measure0.88900.74890.78200.7320Gmean0.91380.85950.86720.8199SSIM0.86910.79610.82170.7868Bold entries represent the best value.Figure 10
Comparison of average segmentation metrics of IWOA, WOA, SSA, and SCA.Discrete wavelet transform (DWT) and principal component analysis (PCA) are applied on each of the 200 IWOA-, WOA-, SSA-, and SCA-based segmented images over 30 runs to extract the first-order and second-order texture features. Two-level DWT with the Haar wavelet filter is used to extract features from the segmented image, and then, PCA is applied to reduce the dimensions of features. PCA selects the important ordered feature set. Twelve DWT-PCA-based texture features extracted from each 15 IWOA-based segmented images (SegImg1 to SegImg15) are listed in Table10 as an average of 30 runs, and further average texture features are computed. Second-order texture features [31] such as correlation, contrast, homogeneity, and energy are computed by the GLCM pattern. Twelve DWT-PCA-based texture features extracted from each of the 160 IWOA-, WOA-, SSA-, and SCA-based segmented images are fed into random forest [32] for training. Random forest is tested with DWT-PCA-based texture features of each of 40 IWOA-, WOA-, SSA-, and SCA-based segmented images. Twelve DWT-PCA-based texture features are used as input for random forest to classify COVID-19/Non-COVID-19 status of patients. Random forest has achieved promising 97.49% classification accuracy for DWT-PCA-based texture features of IWOA-based segmented image.Table 10
DWT-PCA-based texture features of IWOA-based segmented image.
FeaturesImagesSegImg 1SegImg 2SegImg 3SegImg 4SegImg 5SegImg 6SegImg 7SegImg 8Contrast0.11970.10200.13870.12170.12020.09320.11720.1503Correlation0.97780.86470.96690.96600.66120.97360.88980.8059Homogeneity0.97330.97390.97400.97330.97460.97020.97160.9774Mean0.001510.000870.002520.002100.002020.001150.001780.0018Std. deviation0.060170.060180.060140.060150.060160.060180.060160.06016Variance0.0036210.0036220.0036230.003620.003620.0036190.0036210.003624Entropy2.1402.66201.52411.83402.30872.73672.38221.0632Energy0.90120.90180.90680.90010.90600.88550.89460.9204Smoothness0.96590.94240.97920.97520.97430.95570.97100.9714Kurtosis26.6523.5331.4627.6031.6217.1429.7943.02Skewness1.70831.36392.24881.75482.19020.96581.83192.5913IDM1.38411.7791−0.50521.4252.790−0.31631.24500.6260FeaturesSegImg 9SegImg 10SegImg 11SegImg 12SegImg 13SegImg 14SegImg 15Avg.Contrast0.11450.11120.07790.08270.08830.08250.08600.107073Correlation0.98530.95340.95430.95000.91860.93550.94540.91656Homogeneity0.97400.97260.97100.97100.97190.97110.97020.972673Mean0.000920.001510.000710.001220.000930.001370.001520.001462Std. deviation0.060180.060170.060190.060180.060180.060170.060170.060169Variance0.0036210.0036220.0036180.0036180.0036180.0036140.0036190.00362Entropy2.39722.12503.18213.04112.91073.23243.19002.448627Energy0.902910.898880.888430.888160.892140.890830.886840.897639Smoothness0.94540.96600.93060.95820.94590.96250.96620.96066Kurtosis24.3424.797.8010.3615.019.059.5822.116Skewness1.51561.50210.37490.56570.73290.62560.64901.37472IDM1.23701.7377−0.08990.64990.71301.2152−0.62990.884047The visual quality of the predicted segmentation mask, RGB-labelled segmented image, and segmented image for the best threshold value computed by the proposed method (IWOA) along with WOA, SSA, and SCA is shown in Figure11. The IWOA method achieves better segmentation accuracy and visual quality of predicted segmentation mask and segmented image than other methods.Figure 11
Predicted segmentation mask, labelled segmented image, and segmented image for the best threshold value computed by the proposed method (IWOA) and WOA, SSA, and SCA.
(a)(b)(c)Table11 indicates that the predicted segmentation mask generated by the IWOA method for SImg2, SImg3, SImg13, and SImg15 has achieved better segmentation accuracy compared to the predicted segmentation mask generated by other methods.Table 11
Segmentation accuracy of predicted segmentation mask.
ImagesIWOAWOASSASCASImg297.9893.2396.4974.59SImg398.3495.3996.6876.83SImg1398.5696.7895.5490.12SImg1597.5996.6396.8992.47Bold entries represent best value.From Table12, it is inferred that the random forest algorithm has achieved promising 97.49% classification accuracy for DWT-PCA-based texture features, which are extracted from IWOA-based segmented images. When the texture features are extracted from SSA-based segmented images, the random forest achieved 94.12% accuracy, which further decreased by 1% if the texture features are extracted from WOA-based segmented images. Random forest has given the least accuracy 90% for DWT-PCA-based texture features, which are extracted from SCA-based segmented images.Table 12
Comparative analysis of classification metric.
Method/ReferencesDescriptionClassification model/toolMetricIWOADWT-PCA texture features from the IWOA-based segmented imageRandom forestAccuracy: 97.49%WOADWT-PCA texture features from the WOA-based segmented imageRandom forestAccuracy: 93.26%SSADWT-PCA texture features from the SSA-based segmented imageRandom forestAccuracy: 94.12%SCADWT-PCA texture features from SCA-based segmented imageRandom forestAccuracy: 90%Reference [6]Fine-tuned DL architectures to detect COVID-19 from chest X-ray imagesDenseNet121Accuracy: 97%XceptionAccuracy: 96%MobileNetv2Accuracy: 95%ResNet50v2Accuracy: 94%VGG19Accuracy: 92%Inceptionv3Accuracy: 90%Reference [8]COVID-19 lung CT image segmentation to assess the diagnosis of COVID-19 patientsSegNetAccuracy: 95%U-NETAccuracy: 91%Reference [9]Identification of COVID-19 images from chest X-rays using DLCognex’s Vision Pro DL softwareF-Score: 94%Bold entries represent the best value.


## 4.1. Experimental Setting

The efficiency of the proposed method, IWOA, is compared with WOA, SSA, and SCA and discussed in Section4.2. Optimal thresholds are computed by the proposed methods, IWOA, WOA, SSA, and SCA, for multilevel chest CT scan image segmentation, which is presented in Section 4.3. All algorithms are programmed in “MATLAB 2019 a” and implemented in Windows 8 64-bit computer having Intel Core i3 @ 2 GHz, 4 GB RAM. Objective function’s best score, worst score, best threshold values, and segmentation measures of the proposed algorithm (IWOA) are compared with the other three algorithms, WOA [14], SSA [17], and SCA [18]. Each algorithm is tested on every image over 30 runs. For each run, whale/search agent population size and maximum iterations are set as 30 and 100, respectively, for threshold number k = 3. Algorithm parameters are listed in Table 1.Table 1
Parameters of each algorithm.
Algorithm/methodParametersValueImproved whale optimization algorithm (IWOA)a12 to 0a2[−1, −2]b1ℓ[−1, 1]Whale optimization algorithm (WOA)a12 to 0a2−1 to −2B1ℓ[−1, 1]Salp swarm algorithm (SSA)c12 to 0Sine cosine algorithm (SCA)A2r1, r2, r3, r4[0, 1]Dim (Threshold number)k3Upper bound XmaxUB255Lower bound XminLB0


## 4.2. Performance of IWOA on Standard Benchmark Problems

The efficacy of the IWOA is validated on twenty-three benchmark functions; that is, unimodal (F1–F7), multimodal (F8–F13), and fixed-dimension multimodal (F14–F23), and the results are compared with other nature-inspired algorithms, namely WOA [14], SSA [17], and SCA [18].The computation complexity of IWOA, WOA, SSA, and SCA is defined asO (N × Itermax) where Itermax and N represent the maximum number of iterations and swarm population size, respectively.In the literature, the WOA [14] has outperformed PSO, DE, FEP, and gravitational search algorithm (GSA). The SSA [17] has outperformed PSO, GSA, FPA, FA, BAT, SMS, and GA. The SCA [18] has outperformed PSO, GA, FPA, and BAT. Therefore, the computation results of PSO, DE, GSA, GA, FPA, BAT, and firefly (FA) are not included in this article.Table2 presents the best and worst fitness score obtained by executing each algorithm over 30 runs and 100 iterations under each run. Table 2 indicates that the IWOA and WOA both obtained similar fitness score and attained a maximum value for unimodal functions F1–F7 and multimodal F11–F13, but the IWOA achieved fast convergence and takes less number of iterations to obtain better fitness score than WOA, SSA, and SCA. The IWOA has achieved fast convergence behavior for F1–F6. SCA performed better for F7 followed by SSA, IWOA, and WOA. The IWOA obtained the best fitness score and fast convergence for F8, F9, and F10 fitness functions followed by WOA, SSA, and SCA, as shown in Figures 3–5.Table 2
The best and worst fitness values over 30 runs.
WOAIWOASSASCABestWorstBestWorstBestWorstBestWorstF13.0E + 053.0E + 053.0E + 053.0E + 052.71E + 052.48E + 052.75E + 052.52E + 05F21.0E + 301.0E + 301.0E + 301.0E + 303.41E + 291.09E + 292.01E + 280.703E + 28F39.45E + 079.45E + 079.45E + 079.45E + 077.64E + 076.04E + 074.73E + 073.20E + 07F4100100100100100100100100F52.50E + 092.50E + 092.50E + 092.50E + 091.92E + 091.80E + 092.07E + 091.89E + 09F63.03E + 052.97E + 053.03E + 053.03E + 052.60E + 052.48E + 052.62E + 052.50E + 05F712491249124912492332160525431660F880417701877886007156573843342898F91199107212041193972880848832F1022.0921.9022.3121.9821.9221.8321.5721.47F1127012701270127012331216324202266F127.68E + 097.68E + 097.68E + 097.68E + 096.06E + 095.55E + 096.67E + 095.85E + 09F131.23E + 101.23E + 101.23E + 101.23E + 101.09E + 100.98E + 101.01E + 100.94E + 10F14499.99499.99499.99499.99499.99499.99499.99499.99F15InfInfInfInfInfInfInfInfF1664006400640064006400640064006400F17308308308308505308308308F181.01e + 061.01e + 061.01e + 061.01e + 061.01e + 061.01e + 061.01e + 061.01e + 06F19−0.068−0.068−0.068−0.068−0.37E − 04−0.37E − 04−0.068−0.068F20−0.0051−0.0051−0.0051−0.0051−0.27E − 07−0.27E − 07−0.0051−0.0051F21−0.0412−0.0412−0.0412−0.0412−0.0377−0.0377−0.0377−0.0377F22−0.0504−0.0504−0.0504−0.0504−0.0504−0.0504−0.0504−0.0504F23−0.0784−0.0784−0.0784−0.0784−0.0784−0.0784−0.0784−0.0784Bold entries represent the best value.Figure 3
Convergence behavior of fitness function F2.Figure 4
Convergence behavior of fitness function F9.Figure 5
Convergence behavior of fitness function F6.Fitness functions F4, F14, F16, and F18 have similar fitness score for all algorithms over 30 runs. Overall, the IWOA achieved fast convergence and best score 11 times for F1, F2, F3, F5, F6, and F8–F13. For fitness functions F2, F3, and F13, the IWOA comes at first rank followed by the WOA at the second rank, SSA, and SCA. For fitness functions F1, F5, F6, F11, and F12, the IWOA achieved the first rank followed by the WOA (second rank), and SCA and SSA on the basis of fast convergence and best fitness score, respectively. SSA achieved fast convergence, best score, and first rank 6 times for fitness functions (F17, F19 to F23). For F19 and F20, SSA achieved first rank followed by IWOA, WOA, and SCA. For F21 to F23, SSA achieved first rank followed by SCA, IWOA, and WOA. SCA achieved the first rank twice for F7 due to the best score and fast convergence and for F18 due to fast convergence behavior.The IWOA achieved fast convergence and best score and attains first rank for 11 fitness functions (F1–F3, F5, F6, and F8–F13) followed by the WOA as second rank. The IWOA attains the second rank 3 times for fitness functions F18, F19, and F20. Exploitation and exploration capability of all algorithms have been evaluated with unimodal (F1–F7) and multimodal (F8–F23) functions, respectively. It can be seen from Table2 that the IWOA is a competitive and efficient optimizer for unimodal and multimodal functions and at least second in most cases.Thus, it can be said that the proposed method, IWOA, has better exploitation and exploration capability and could avoid entrapment into local optima as compared to the considered methods. The convergence behavior of F2, F9, F6, F10, F8, and F21 is shown in Figure3 to Figure 8 respectively, for IWOA, WOA, SSA, and SCA.Figure 6
Convergence behavior of fitness function F10.Figure 7
Convergence behavior of fitness function F8.Figure 8
Convergence behavior of fitness function F21.


## 4.3. Benchmark Images

Performance of the proposed method (IWOA) and other methods (WOA, SSA, and SCA) utilized Otsu’s maximum between variance criteria as fitness function for COVID-19 and normal chest CT scan image segmentation at threshold numberk = 3 is evaluated on 200 randomly selected images from dataset1 [29] and dataset2 [30]. Each image has binary segmentation mask for dataset1. The image of dataset2 is resized to 256 × 256, and a binary segmentation mask is generated by simple linear iterative clustering (SLIC). Segmentation metrics from ground truths are computed.Some sample of gray scale images (Img001.png, Img008.png, Img023.png, Img050.png, Img056.png, Img061.png, Img072.png, Img075.png, Img080.png, Img091.png) from dataset1 [29] and sample of gray images (NonCovid4.png, NonCovid31.png, NonCovid79.png, NonCovid96.png, NonCovid109.png from dataset2 [30], named SImg 1 to SImg 15, respectively, are shown in Figure 9.Figure 9
Samples of gray scale images from SImg1 to SImg15.


## 4.4. Experimental Results and Discussion

Best fitness score (maximum fitness) and worst fitness score (minimum fitness) computed by the proposed method, IWOA, along with WOA, SSA, and SCA utilizing Otsu’s maximum between variance criteria for every image at threshold numberk = 3 are computed over 30 independent runs, and 100 iterations under each run are set for each algorithm, and the computation result of sample image is illustrated in Table 3.Table 3
Best and worst fitness scores of various algorithms.
ImagesBest fitness valuesWorst fitness valuesWOAIWOASSASCAWOAIWOASSASCASImg 127232725272327212723272427212712SImg 234623462346234593460346234623454SImg 333303332333233283329333433323325SImg 441654165416541624163416541654158SImg 5600605603596600602601562SImg 627722778277427722770277327722770SImg 715681575157215681566157315731566SImg 822342238223622332229223422322229SImg 913781384138413771374138213821374SImg 1011861190118911851181118811881180SImg 1119451948194619451943194719451943SImg 1223722384238023722370238223762369SImg 1316821689168816811679168416841678SImg 1421652170217021632163216821682163SImg 1517441749174717431741174617451741Multilevel optimal threshold value is computed by each method at threshold numberk = 3 of each image over 30 runs and optimal threshold values of sample image is illustrated in Table 4.Table 4
Best threshold values of various segmentation methods.
ImageIWOAWOASSASCASImg 135,50,6625,36,22775,192,24270,188,234SImg 2124,139,1988,27,3622,68,25445,133,194SImg 355,143,21831,52,12157,94,25465,143,213SImg 420,133,238102,109,13318,50,25439,156,211SImg 531,235,24440,114,16431,58,17445,174,198SImg 618,35,179137,162,25365,200,23456,124,189SImg 760,205,24985,152,24967,110,25470,137,221SImg 881,171,249135,184,20861,185,24258,134,197SImg 930,125,22417,170,18112,34,14360,124,168SImg 103,21,928,33,2044,27,15410,65,188SImg 11122,224,246101,178,18610,183,23439,126,254SImg 12143,151,214118,138,21144,113,19410,138,214SImg 13122,143,252141,216,2494,81,20125,127,214SImg 14116,135,196104,200,2164,78,15742,59,187SImg 15148,168,234172,182,23126,153,17947,145,254Quantitative metrics such as accuracy, sensitivity, specificity, precision, F_measure,Gmean, and SSIM are computed between segmented images by each method (IWOA, WOA, SSA, and SCA), and the respective ground truth/segmentation mask under each run and segmentation metrics for each image is computed by each method. Segmentation metrics for 15 sample images computed by each method is listed in Tables 5–8 as an average of 30 runs and further average segmentation metrics of 15 images are computed.Table 5
Quantitative metrics by the IWOA.
ImageAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.98040.89340.99560.97280.93140.94310.9509SImg 20.96660.90320.99130.97580.9380.94620.8701SImg 30.97320.9282110.96270.96340.9111SImg 40.98650.65880.99590.82460.73240.810.9344SImg 50.93990.7860.99190.97050.86850.8830.8037SImg 60.91140.76720.97730.93920.84450.86590.7109SImg 70.95080.68750.9850.86320.76530.82310.8028SImg 80.99240.72590.99640.75970.74240.85050.9662SImg 90.940.78530.99240.97240.86880.88280.8402SImg 100.96420.64480.99210.87720.74320.79980.8303SImg 110.99540.9875110.99370.99370.8003SImg 120.990610.98320.97940.98960.99160.8920SImg 130.99260.9886110.99430.99430.9227SImg 140.97420.9528110.97580.97610.9517SImg 150.984010.96730.96990.98470.98350.8504Avg.0.96950.84720.99120.94030.88900.91380.8691Bold entries represent the average value of 15 images.Table 6
Quantitative metrics by WOA.
ImageAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.93240.90060.93550.56870.69710.91780.8286SImg 20.91490.90760.91690.74810.82010.91220.6945SImg 30.88150.48350.99980.86270.61970.69530.9568SImg 40.98620.67050.99260.67800.67420.81580.9120SImg 50.88660.60690.90120.54250.57290.73950.7699SImg 60.75780.70170.60260.56630.62680.65030.6104SImg 70.90460.43960.91410.79500.56610.63390.7440SImg 80.96930.82070.99030.33430.47510.90150.9582SImg 90.92750.92310.90510.59760.72550.91400.7470SImg 100.96280.78930.96960.50440.61540.87480.8359SImg 110.97050.9246110.96080.96150.7500SImg 120.99050.9796110.98970.98970.7900SImg 130.989410.97150.98340.99160.98560.9037SImg 140.91720.8627110.92630.92880.8163SImg 150.972010.94390.94710.97280.97150.6242Avg,0.93090.80070.93620.74190.74890.85950.7961Bold entries represent the average value of 15 images.Table 7
Quantitative metrics by SSA.
ImagesAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.86920.88390.87220.77970.82850.87800.8077SImg 20.96350.90620.98520.95870.93170.94490.8267SImg 30.98620.98750.77700.52990.68970.87590.9560SImg 40.95460.32190.99820.92700.47790.56690.9103SImg 50.91060.58720.99040.93810.72230.76260.7976SImg 60.80970.78750.86700.42990.55620.82630.5781SImg 70.85900.65530.99710.97600.78410.80830.8133SImg 80.98930.82070.99030.33430.47510.90150.9581SImg 90.94000.97020.93230.78660.86880.95110.7280SImg 100.91850.41440.99500.92770.57290.64220.8300SImg 110.971510.95730.92130.9590.97810.8976SImg 120.967010.94310.92710.96210.97110.7480SImg 130.93390.8967110.94550.94690.6987SImg 140.974210.94900.95040.97460.97410.8765SImg 150.980910.96110.96400.98160.98030.8996Avg.0.93520.81540.94770.82340.78200.86720.8217Bold entries represent the average value of 15 images.Table 8
Quantitative metrics by SCA.
ImagesAccuracySensitivitySpecificityPrecisionF_measureGmeanSSIMSImg 10.87100.71160.87400.63270.66980.78860.80772SImg 20.75100.84230.74960.90580.87290.79460.6578SImg 30.97210.62710.78650.81230.70780.70230.9515SImg 40.95320.31560.99830.93310.47120.56130.9097SImg 50.92450.63490.98790.91990.75130.79190.8000SImg 60.73310.74790.74160.57840.65230.74480.5862SImg 70.94460.55050.98750.43960.48880.73730.8133SImg 80.94930.82070.99030.33430.47510.90150.9582SImg 90.79590.64700.79620.55740.59890.71770.7279SImg 100.96280.78930.96960.50440.61540.87480.8359SImg 110.99840.9957110.99780.99780.9893SImg 120.993510.98830.98570.99270.99410.6969SImg 130.765310.60550.63320.77540.77810.6184SImg 140.94260.8897110.94160.94320.7043SImg 150.96710.9415110.96980.97030.7456Avg.0.90160.76760.89830.74910.73200.81990.7868Bold entries represent the average value of 15 images.It is clear from Tables5–8 that the average segmentation metrics computed for 15 IWOA-based sample segmented images are better than those of the segmented images computed based on the other methods. Segmentation metrics such as accuracy, sensitivity, specificity, precision, F_measure, and Gmean are computed between binary segmentation image mask (predicted binary mask) and binary segmentation mask (ground truth) of the corresponding image from the dataset. SSIM is computed between gray-level segmentation image mask (predicted binary mask) and gray-level segmentation mask (ground truth) of the corresponding image from the dataset. Average segmentation metrics computed for 15 IWOA-, WOA-, SSA-, SCA-based segmentation images are compared and listed in Table 9 and shown in Figure 10. It is clear from Table 9 that the IWOA has achieved 1st rank in segmentation measures followed by SSA (2nd rank), WOA, (3rd rank), and SCA (4th rank).Table 9
Comparison of average segmentation metrics of IWOA, WOA, SSA, and SCA.
Segmentation measuresMethodsIWOAWOASSASCAAccuracy0.96950.93090.93520.9016Specificity0.99120.93620.94770.8983Precision0.94030.74190.82340.7491Sensitivity0.84720.80070.81540.7676F_measure0.88900.74890.78200.7320Gmean0.91380.85950.86720.8199SSIM0.86910.79610.82170.7868Bold entries represent the best value.Figure 10
Comparison of average segmentation metrics of IWOA, WOA, SSA, and SCA.Discrete wavelet transform (DWT) and principal component analysis (PCA) are applied on each of the 200 IWOA-, WOA-, SSA-, and SCA-based segmented images over 30 runs to extract the first-order and second-order texture features. Two-level DWT with the Haar wavelet filter is used to extract features from the segmented image, and then, PCA is applied to reduce the dimensions of features. PCA selects the important ordered feature set. Twelve DWT-PCA-based texture features extracted from each 15 IWOA-based segmented images (SegImg1 to SegImg15) are listed in Table10 as an average of 30 runs, and further average texture features are computed. Second-order texture features [31] such as correlation, contrast, homogeneity, and energy are computed by the GLCM pattern. Twelve DWT-PCA-based texture features extracted from each of the 160 IWOA-, WOA-, SSA-, and SCA-based segmented images are fed into random forest [32] for training. Random forest is tested with DWT-PCA-based texture features of each of 40 IWOA-, WOA-, SSA-, and SCA-based segmented images. Twelve DWT-PCA-based texture features are used as input for random forest to classify COVID-19/Non-COVID-19 status of patients. Random forest has achieved promising 97.49% classification accuracy for DWT-PCA-based texture features of IWOA-based segmented image.Table 10
DWT-PCA-based texture features of IWOA-based segmented image.
FeaturesImagesSegImg 1SegImg 2SegImg 3SegImg 4SegImg 5SegImg 6SegImg 7SegImg 8Contrast0.11970.10200.13870.12170.12020.09320.11720.1503Correlation0.97780.86470.96690.96600.66120.97360.88980.8059Homogeneity0.97330.97390.97400.97330.97460.97020.97160.9774Mean0.001510.000870.002520.002100.002020.001150.001780.0018Std. deviation0.060170.060180.060140.060150.060160.060180.060160.06016Variance0.0036210.0036220.0036230.003620.003620.0036190.0036210.003624Entropy2.1402.66201.52411.83402.30872.73672.38221.0632Energy0.90120.90180.90680.90010.90600.88550.89460.9204Smoothness0.96590.94240.97920.97520.97430.95570.97100.9714Kurtosis26.6523.5331.4627.6031.6217.1429.7943.02Skewness1.70831.36392.24881.75482.19020.96581.83192.5913IDM1.38411.7791−0.50521.4252.790−0.31631.24500.6260FeaturesSegImg 9SegImg 10SegImg 11SegImg 12SegImg 13SegImg 14SegImg 15Avg.Contrast0.11450.11120.07790.08270.08830.08250.08600.107073Correlation0.98530.95340.95430.95000.91860.93550.94540.91656Homogeneity0.97400.97260.97100.97100.97190.97110.97020.972673Mean0.000920.001510.000710.001220.000930.001370.001520.001462Std. deviation0.060180.060170.060190.060180.060180.060170.060170.060169Variance0.0036210.0036220.0036180.0036180.0036180.0036140.0036190.00362Entropy2.39722.12503.18213.04112.91073.23243.19002.448627Energy0.902910.898880.888430.888160.892140.890830.886840.897639Smoothness0.94540.96600.93060.95820.94590.96250.96620.96066Kurtosis24.3424.797.8010.3615.019.059.5822.116Skewness1.51561.50210.37490.56570.73290.62560.64901.37472IDM1.23701.7377−0.08990.64990.71301.2152−0.62990.884047The visual quality of the predicted segmentation mask, RGB-labelled segmented image, and segmented image for the best threshold value computed by the proposed method (IWOA) along with WOA, SSA, and SCA is shown in Figure11. The IWOA method achieves better segmentation accuracy and visual quality of predicted segmentation mask and segmented image than other methods.Figure 11
Predicted segmentation mask, labelled segmented image, and segmented image for the best threshold value computed by the proposed method (IWOA) and WOA, SSA, and SCA.
(a)(b)(c)Table11 indicates that the predicted segmentation mask generated by the IWOA method for SImg2, SImg3, SImg13, and SImg15 has achieved better segmentation accuracy compared to the predicted segmentation mask generated by other methods.Table 11
Segmentation accuracy of predicted segmentation mask.
ImagesIWOAWOASSASCASImg297.9893.2396.4974.59SImg398.3495.3996.6876.83SImg1398.5696.7895.5490.12SImg1597.5996.6396.8992.47Bold entries represent best value.From Table12, it is inferred that the random forest algorithm has achieved promising 97.49% classification accuracy for DWT-PCA-based texture features, which are extracted from IWOA-based segmented images. When the texture features are extracted from SSA-based segmented images, the random forest achieved 94.12% accuracy, which further decreased by 1% if the texture features are extracted from WOA-based segmented images. Random forest has given the least accuracy 90% for DWT-PCA-based texture features, which are extracted from SCA-based segmented images.Table 12
Comparative analysis of classification metric.
Method/ReferencesDescriptionClassification model/toolMetricIWOADWT-PCA texture features from the IWOA-based segmented imageRandom forestAccuracy: 97.49%WOADWT-PCA texture features from the WOA-based segmented imageRandom forestAccuracy: 93.26%SSADWT-PCA texture features from the SSA-based segmented imageRandom forestAccuracy: 94.12%SCADWT-PCA texture features from SCA-based segmented imageRandom forestAccuracy: 90%Reference [6]Fine-tuned DL architectures to detect COVID-19 from chest X-ray imagesDenseNet121Accuracy: 97%XceptionAccuracy: 96%MobileNetv2Accuracy: 95%ResNet50v2Accuracy: 94%VGG19Accuracy: 92%Inceptionv3Accuracy: 90%Reference [8]COVID-19 lung CT image segmentation to assess the diagnosis of COVID-19 patientsSegNetAccuracy: 95%U-NETAccuracy: 91%Reference [9]Identification of COVID-19 images from chest X-rays using DLCognex’s Vision Pro DL softwareF-Score: 94%Bold entries represent the best value.


## 5. Conclusion

Diagnosing COVID-19 disease through an RT-PCR test is a time-consuming process, and sometimes, the RT-PCR test has a false-negative result, which can cause a threat to the person’s life due to delay in starting the specified treatment. At this moment, there is an urgent need to develop an automatic COVID-19 detection tool that can detect the COVID-19 disease from chest CT scan images within a shorter span of time. In this article, a variant of the existing whale optimization algorithm named improved whale optimization algorithm (IWOA) is introduced to compute optimal threshold values. The efficiency of the IWOA is tested using 23 benchmark optimization functions, and it was proven that the IWOA achieved better convergence behavior, and improved the exploitation and exploration ability of WOA and bypass local optima. The proposed method (IWOA) and WOA, SSA, and SCA as clustering methods utilize Otsu’s maximum between-class variance criteria to compute the optimal threshold. Automated segmentation is performed with optimal threshold values (k = 3). The IWOA method has achieved a better fitness score, segmentation accuracy, visual quality of predicted segmentation mask, and segmented image than other methods. The IWOA-based segmentation method grips the 1st rank to evaluate segmentation metrics. Two-level DWT with the Haar wavelet filter is used to extract the features from the segmented image, and then, PCA is applied to reduce dimensions of features. Twelve DWT-PCA texture features extracted from the segmented image are utilized as input to the random forest machine-learning algorithm for the classification of COVID-19/Non-COVID disease. The random forest algorithm has reported a promising classification accuracy of 97.49% for DWT-PCA-based texture features, which are extracted from IWOA-based segmented images. In the future, DWT-PCA-based texture features extracted from the proposed method will be fed as input to various machine-learning and pretrained deep learning models to detect tumour from brain MRI images and classification metrics comparison will be carried out.



---

*Source: 9009406-2022-03-30.xml*