# COVID-19 Detection Using Deep Convolutional Neural Networks and Binary Differential Algorithm-Based Feature Selection from X-Ray Images

Authors: Mohammad Saber Iraji; Mohammad-Reza Feizi-Derakhshi; Jafar Tanha
Journal: Complexity
 (2021)

---

## Abstract

The new COVID-19 is rapidly spreading and has already claimed the lives of numerous people. The virus is highly destructive to the human lungs, and early detection is critical. As a result, this paper presents a hybrid approach based on deep convolutional neural networks that are very effective tools for image classification. The feature vectors were extracted from the images using a deep convolutional neural network, and the binary differential metaheuristic algorithm was used to select the most valuable features. The SVM classifier was then given these optimized features. For the study, a database containing images from three categories, including COVID-19, pneumonia, and a healthy category, included 1092 X-ray samples, was used. The proposed method achieved a 99.43% accuracy, a 99.16% sensitivity, and a 99.57% specificity. Our findings indicate that the proposed method outperformed recent studies on COVID-19 detection using X-ray images.


---

## Body

## 1. Introduction

COVID-19’s rapid spread has resulted in the death of numerous people worldwide. Muscle aches, cough, and fever are all symptoms of the virus, which can be detected through clinical trials and radiographic imaging. Medical imaging is critical for disease diagnosis, and disease X-rays and computed tomography (CT) scans can be used in the deep network to aid in the disease’s diagnosis.The process of classifying and diagnosing disease from an image using a neural network is divided into four steps: feature extraction, optimal feature selection, network training, and model performance test. The feature extraction step is divided into two types. In the first type, image processing techniques, algorithms, and filters extract the features. Among the features extracted from the images, the tissue shapes and textures are used to classify patients. In the second type, the original images and their actual output class are fed into the convolution network as input data, and the features are extracted automatically in the final flattened layer following the network training process and weight adjustment.Certain features extracted from the deep network may have a detrimental effect on classification accuracy [1]. As a result, effective feature selection methods are critical. There are three distinct types of feature selection methods. The filter method uses features’ intrinsic properties and statistical indicators such as the fisher score, information gain, chi-square, and correlation coefficient. The wrapper method employs a learning algorithm that searches the feature space for a subset of features that optimize the classification accuracy. To this end, wrapper approaches employ metaheuristic methods for selecting feature subsets and performing cross-validation. Finally, the hybrid method employs both filter and wrapper methods [2]. Metaheuristic methods outperform other feature selection methods in applications where many features are required.Classification performance is improved by analyzing extracted features from images and selecting the optimal features [3]. Numerous feature selection (FS) studies have been published in the field of medical imaging, including Robustness-Driven FS (RDFS) for lung CT images [4], Shearlet transform FS from brain MRI images [5], principal component analysis for lung X-ray images [6], genetic algorithm (GA) for lung nodules [7], bat algorithm (BA) versus particle swarm optimization (PSO) in lung X-ray images, and the flower pollination algorithm (FPA) from lung images [8].The studies above propose that machine vision combined with metaheuristic algorithms can classify patients using lung images. On the other hand, existing diagnostic methods for the COVID-19 virus using X-ray images require a large amount of memory, ample time, and a large number of features. As a result, an intelligent system appears necessary to assist doctors and treatment staff in accurately and rapidly classifying COVID-19 patients in reducing disease-related mortality. This research aims to develop an efficient procedure utilizing artificial intelligence methods to assist doctors and patients in accurately predicting COVID-19. The research is novel in that it employs a binary differential evolution algorithm to design a deep learning structure based on feature selection for COVID-19 diagnosis. The contributions of the study include the following:(1)
Using a deep convolutional neural network without a pretrained network to design an intelligent system based on lung X-ray images and extracting features with the least amount of memory required to create and train the network(2)
Selecting the optimal features of the differential metaheuristic method that improves performance indexes(3)
Increasing classification accuracy for multiclass problems, including patients with COVID-19, pneumonia, and the healthy groupThe study is structured as follows. Section2 reviews related works. Section 3 presents the proposed methodology and model for COVID-19 detection using deep convolution and binary differential algorithms. Section 4 contains the experimental results, and Section 5 discusses the method and compares this with prior works. Finally, the study concludes.


## 2. Related Works

Hemdan et al. used deep learning models to infer the positive or negative status of COVID-19 and reported that the VGG19 model performed better with an accuracy of 90% on 25 COVID-19 infected and 25 non-COVID-19 images [9]. Toğaçar et al. incorporated 295 COVID-19 images, 98 pneumonia images, and 65 normal images into MobileNet and SqueezeNet [10]. They extracted features from trained Net models and then used the SMO algorithm to select the features, with an overall accuracy of 99.27% reported for the SVM classifier. Zhang et al. investigated an 18-layer ResNet model for 100 COVID-19 and 1431 pneumonia images and reported an accuracy of 95.18% [11]. Apostolopoulos and Mpesiana pretrained VGG19 on 224 COVID-19, 700 pneumonia, and 504 normal images, where the results demonstrated a 98.75% accuracy [12]. The authors of [13] evaluated the DarkNet with 17 convolutional layers using 127 COVID-19, 500 pneumonia, and 500 normal images and reported an accuracy of 98.08%. In [14], the performance of CNN was improved via preprocessing image algorithms, resulting in a model with 94.5% accuracy.The authors of [1] developed a COVID-19 classification method based on two datasets that combined a CNN named Inception, a pretrained Imagenet as a feature extractor, the Marine Predators Algorithm as a feature selector, and a KNN as a classifier.The first dataset contained 200 positive COVID-19 images and 1675 negative images, whereas the second dataset contained 219 positive COVID-19 images and 1341 negative images. Accuracy was reported as 98.7% for dataset 1 and 99.6% for dataset 2. Canayaz validated a COVID-19 diagnosis model by combining VGG19, ResNet, AlexNet, and GoogLeNet with two metaheuristic algorithms titled “binary particle swarm optimization” and “binary gray wolf optimization.” The highest overall classification accuracy of 99.38% after binary gray wolf optimization was used to select features from 1092 X-ray images from the COVID-19, pneumonia, and healthy category records [15].One of the previous works’ limitations is their reliance on pretrained deep networks, which require a large amount of memory. Additionally, many input features plus a lengthy detection time are further drawbacks of these methods. In this study, a deep learning approach based on feature selection is proposed via the binary differential evolution algorithm to overcome these limitations and improve COVID-19 detection.


## 3. Methodology and Model

Figure1 depicts the proposed model. Initially, the convolutional neural network is fed with lung images. After training the network, features are extracted from suboptimal images. The heuristic method is then used to extract the optimal features. As a result, the three classes of COVID-19, pneumonia, and healthy are classified with higher accuracy.Figure 1
The proposed model for COVID-19.


### 3.1. Deep Convolution

Convolutional neural networks are used in machine learning as a feature extractor and classification method. The input to a convolutional network is the original data, such as images. The network extracts the features automatically using the convolution function. After learning, rather than manually extracting the feature, the matrixes serve as filters that slide over the main input image, and the convolution operation is carried out via equation (1). Finally, after training and mapping the input images to the output labels, several convolution layers extract the features [16].(1)IMG∗Cij=∑p=0c1−1∑q=0c2−1∑c=1tcCp,q,c⋅IMGi+p,j+q,c+bs,where IMG denotes the input image with height = H, width = W dimensions, and tc is the number of image channels, C is the filter matrix with c1∗c2 dimensions, and bs is a bias value for each filter C, i=0,…,Handj=0,…,W.Following convolution, the unwanted values are removed using the ReLU layer, and the input is then reduced using the pooling layer. The effective input vector is then passed to the fully connected layer, which functions similarly to the MLP. In the final section of the deep convolution layers, Softmax [17], classification layers perform classification using ADAM (adaptive moment optimizer) [18]; the lost function is shown in the following equation:(2)Lw,b=−1M∑m=1Mymlogy^m+1−ymlog1−y^m+Γ×∑r=1Mwr2,where M denotes the sample size, ym denotes the actual class for the mth sample, y^m denotes the predicted output class for the mth input data, and Γ denotes the regularization coefficient.ADAM is a gradient-based optimization algorithm that uses the exponential moving average of the gradient and the square of the gradient to update the neural network weights and solve deep network issues effectively. The deep neural network comprises numerous layers, each with its own set of learning parameters, namely, weights and biases. Applying the optimal feature selection algorithm to the ADAM optimizer increases the optimization’s speed and accuracy.


### 3.2. Binary Differential Evolution

Differential evolution (DE) [19] is a heuristic evolutionary method for minimizing the continuous problem. The concept of binary differential evolution (BDE) [20] is extended to address issues of feature selection. It is composed of three distinct builders, including mutation, crossover, and selection. Initially, dimensions D are used to generate the initial population, where D is the number of features to optimize. For the mutation operation, three random vectors pu1, pu2, and pu3 are selected for vector pk such that u1≠u2≠u3≠k, where k is a population vector arrangement.If thedth dimensions of vectors pu1 and pu2 are equal, the dth feature of the difference vector (Equation (3)) is zero; otherwise, it has the same value as vector pu1:(3)differencevectorkd=0,pu1d=pu2d,pu1,other.Afterward, the mutation and crossover operations are executed, as shown in the following equations:(4)mutevectorkd=1,if differencevectorkd=1,pu3d,other,(5)Wkd=mutevectorkd,ifγ≤CRd=drandom,pkd,other,where W represents the try vector, CRε0,1 represents the crossover amount, and γε0,1 represents a random number. In the selection procedure, if the fitness value of the try vector Wk is greater than that of the current vector pk, it will be replaced. Otherwise, the current vector pk is stored for the next generation.


## 3.1. Deep Convolution

Convolutional neural networks are used in machine learning as a feature extractor and classification method. The input to a convolutional network is the original data, such as images. The network extracts the features automatically using the convolution function. After learning, rather than manually extracting the feature, the matrixes serve as filters that slide over the main input image, and the convolution operation is carried out via equation (1). Finally, after training and mapping the input images to the output labels, several convolution layers extract the features [16].(1)IMG∗Cij=∑p=0c1−1∑q=0c2−1∑c=1tcCp,q,c⋅IMGi+p,j+q,c+bs,where IMG denotes the input image with height = H, width = W dimensions, and tc is the number of image channels, C is the filter matrix with c1∗c2 dimensions, and bs is a bias value for each filter C, i=0,…,Handj=0,…,W.Following convolution, the unwanted values are removed using the ReLU layer, and the input is then reduced using the pooling layer. The effective input vector is then passed to the fully connected layer, which functions similarly to the MLP. In the final section of the deep convolution layers, Softmax [17], classification layers perform classification using ADAM (adaptive moment optimizer) [18]; the lost function is shown in the following equation:(2)Lw,b=−1M∑m=1Mymlogy^m+1−ymlog1−y^m+Γ×∑r=1Mwr2,where M denotes the sample size, ym denotes the actual class for the mth sample, y^m denotes the predicted output class for the mth input data, and Γ denotes the regularization coefficient.ADAM is a gradient-based optimization algorithm that uses the exponential moving average of the gradient and the square of the gradient to update the neural network weights and solve deep network issues effectively. The deep neural network comprises numerous layers, each with its own set of learning parameters, namely, weights and biases. Applying the optimal feature selection algorithm to the ADAM optimizer increases the optimization’s speed and accuracy.


## 3.2. Binary Differential Evolution

Differential evolution (DE) [19] is a heuristic evolutionary method for minimizing the continuous problem. The concept of binary differential evolution (BDE) [20] is extended to address issues of feature selection. It is composed of three distinct builders, including mutation, crossover, and selection. Initially, dimensions D are used to generate the initial population, where D is the number of features to optimize. For the mutation operation, three random vectors pu1, pu2, and pu3 are selected for vector pk such that u1≠u2≠u3≠k, where k is a population vector arrangement.If thedth dimensions of vectors pu1 and pu2 are equal, the dth feature of the difference vector (Equation (3)) is zero; otherwise, it has the same value as vector pu1:(3)differencevectorkd=0,pu1d=pu2d,pu1,other.Afterward, the mutation and crossover operations are executed, as shown in the following equations:(4)mutevectorkd=1,if differencevectorkd=1,pu3d,other,(5)Wkd=mutevectorkd,ifγ≤CRd=drandom,pkd,other,where W represents the try vector, CRε0,1 represents the crossover amount, and γε0,1 represents a random number. In the selection procedure, if the fitness value of the try vector Wk is greater than that of the current vector pk, it will be replaced. Otherwise, the current vector pk is stored for the next generation.


## 4. Experimental Results

### 4.1. Description of Data

Canayaz developed a COVID-19 X-ray data set that included three subgroups of patients, including those with COVID-19, those with pneumonia, and those who were healthy [15]. By combining data from this database, a total of 364 images for each of the three categories were obtained as a balanced dataset [21–23]. The total number of images is equal to the number of classes multiplied by the number of class instances =  3∗3941092, with a 224 × 224 dimension. The same data are used in this study to predict COVID-19 disease using a convolutional neural network and to select optimal features using the binary differential metaheuristic algorithm. Figure 2 illustrates a representative sample of three output classifications: COVID-19, pneumonia, and healthy.Figure 2
Chest X-ray images of the different conditions: (a) COVID-19; (b) pneumonia; (c) healthy.
(a)(b)(c)


### 4.2. Performance Evaluation

The proposed model was run in MATLAB version 9.1.0.441655 (R2018b) on a laptop computer equipped with a 1.8 GHz processor and 4 Gigabytes of RAM. After training in the application phase, the proposed method took an average of 29 seconds per patient, which can be reduced by improving the hardware technology used. The COVID-19 prediction model was evaluated using the accuracy, sensitivity, specificity, geometric mean, and area under the curve (AUC-ROC) [24, 25] performance metrics (Equations (6)–(9)), where accuracy refers to the correctness of the classification. The proportion of correctly distinguished negative cases is referred to as “specificity,” while the proportion of correctly distinguished positive cases is referred to as “sensitivity.” The geometric mean is the second root of the sensitivity and specificity products. Higher values of the area under the curve (AUC) within the receiver operating characteristics indicate improved classification performance.(6)Accuracy=TP+TNTP+TN+FP+FN,whereTP means true positives which is the number of samples that are correctly labeled as positiveFP means false positives which is the number of samples that are wrongly labeled as positiveTN means true negatives which is the number of samples that are correctly labeled as negativeFN means false negatives which is the number of samples that are wrongly labeled as negative(7)Sensitivity=TPTP+FN,(8)Specificity=TNFP+TN,(9)Geometric mean=sensitivity∗specificity2.


### 4.3. Model Parameters

Figure3 illustrates the network structure of a deep convolutional neural network. Firstly, the image input layer dimensions were 224∗224, and the convolution operator used eight 3-by-3 filters. After processing the first block of the network layers, i.e., image input, convolution, Batch Normalize, ReLU, max-pooling layers, fully connected layer 400, ReLU, and Drop out, the local features were automatically extracted. Finally, the second network block categorized the input images into three output classes by utilizing three fully connected layers, softmax, and classification. After 200 epochs, the validation accuracy was 97.25% when using the ADAM optimizer, and the minibatch size was 64 (Figure 4). Due to the neural network’s regularization and barricade overfitting, batch normalization and dropout were used.Figure 3
The proposed model layers’ structure.Figure 4
Accuracy and loss measurements for convolutional neural networks used for training and validation data.Convolutional networks are used to transform data into feature vectors. Given that some network features may degrade the model’s performance [1], after extracting 400 features in the first fully connected layer, the binary differential metaheuristic algorithm was used to select the optimal feature subset and eliminate unnecessary features. The binary differential algorithm’s parameters were population = 20, iteration = 100 (Figure 5), and a crossover rate of 1. The amount (1-(geometric mean)) of the SVM classifier [26] was regarded as the population’s fitness values (Figure 5). Following the binary differential algorithm’s execution, 340 optimal features were selected.Figure 5
Fitness curve for the binary differential algorithm.


### 4.4. Performance Comparison

The conventional validation (CV) method, which employs random sampling, is one of the training and testing protocols used to determine the model’s accuracy and validate the estimation results. According to the CV method, 70% of data were used for training, 15% for validation, and 15% for testing [27, 28]. The proposed method was applied to the data, and 100 runs were performed to prevent overfitting [29]. The optimally selected features from the differential algorithm and the initial extracted features from the deep convolutional neural network were entered into the SVM classifier.The confusion matrix for the SVM classifier’s original and optimized features is demonstrated in Table1 using training, testing, validation, and total data.Table 1
Confusion matrix average after 100 runs with 3 classes using the (a) optimized features and (b) original features based on the training, test, validation, and total data.
(a) Optimized featuresOptimized features testPredictedCOVID-19NormalPneumoniaActualCOVID-1951/7500/2Normal0/1554/90/1Pneumonia0/40/5555/95Optimized features validationPredictedCOVID-19NormalPneumoniaActualCOVID-1955/050/050/45Normal0/0554/40/3Pneumonia0/4152/3Optimized features trainingPredictedCOVID-19NormalPneumoniaActualCOVID-19256/500Normal0254/10Pneumonia00253/4Optimized features totalPredictedCOVID-19NormalPneumoniaActualCOVID-19363/30/050/65Normal0/2363/40/4Pneumonia0/81/55361/65(b) Original featuresOriginal features testPredictedCOVID-19NormalPneumoniaActualCOVID-1951/6500/3Normal0/2554/650/25Pneumonia0/50/9555/45Original features validationPredictedCOVID-19NormalPneumoniaActualCOVID-1954/8500/7Normal0/1554/20/4Pneumonia0/551/251/95Original features trainingPredictedCOVID-19NormalPneumoniaActualCOVID-19256/4500/05Normal0254/10Pneumonia00253/4Original features totalPredictedCOVID-19NormalPneumoniaActualCOVID-19362/9501/05Normal0/4362/950/65Pneumonia1/052/15360/8Table1 depicts the confusion matrix using training, testing, validation, and total data for the SVM classifier’s original features and optimized features. The TP, TN, FP, FN, accuracy, sensitivity, specificity, geometric mean, and AUC metrics for each of the three output classes plus each type of testing, training, validation, and total data were computed (Table 2).Table 2
Comparison of indicators (TP, TN, FP, FN, accuracy, the area under curve, sensitivity, specificity, and geometric mean) for any output class based on (a) optimized features and (b) original features.
(a) Optimized featuresOptimized features-totalCOVID-19NormalPneumoniaTP363/30363/40361/65TN727/00726/40726/95FP1/001/601/05FN0/700/602/35Accuracy99/8499/8099/69Sensitivity99/8199/8499/35Specificity99/8699/7899/86Geometric mean99/8499/8199/60Area under curve0/99840/99810/9961Optimized features-trainingCOVID-19NormalPneumoniaTP256/50254/10253/40TN507/50509/90510/60FP0/000/000/00FN0/000/000/00Accuracy100/00100/00100/00Sensitivity100/00100/00100/00Specificity100/00100/00100/00Geometric mean100/00100/00100/00Area under curve1/00001/00001/0000Optimized features-testCOVID-19NormalPneumoniaTP51/7554/9055/95TN111/50108/30106/80FP0/550/550/30FN0/200/250/95Accuracy99/5499/5199/24Sensitivity99/6299/5598/33Specificity99/5199/4999/72Geometric mean99/5699/5299/02Area under curve0/99560/99520/9903Optimized features-validationCOVID-19NormalPneumoniaTP55/0554/4052/30TN108/00108/20109/55FP0/451/050/75FN0/500/351/40Accuracy99/4299/1598/69Sensitivity99/1099/3697/39Specificity99/5999/0499/32Geometric mean99/3499/2098/35Area under curve0/99340/99200/9840(b) Original featuresOriginal features-totalCOVID-19NormalPneumoniaTP362/95362/95360/80TN726/55725/85726/30FP1/452/151/70FN1/051/053/20Accuracy99/7799/7199/55Sensitivity99/7199/7199/12Specificity99/8099/7099/77Geometric mean99/7699/7199/44Area under curve0/99760/99710/9944Original features-trainingCOVID-19NormalPneumoniaTP256/45254/10253/40TN507/50509/90510/55FP0/000/000/05FN0/050/000/00Accuracy99/99100/0099/99Sensitivity99/98100/00100/00Specificity100/00100/0099/99Geometric mean99/99100/00100/00Area under curve0/99991/00001/0000Original features-testCOVID-19NormalPneumoniaTP51/6554/6555/45TN111/30107/90106/55FP0/750/950/55FN0/300/501/45Accuracy99/3699/1298/78Sensitivity99/4299/0997/45Specificity99/3399/1399/49Geometric mean99/3899/1198/46Area under curve0/99370/99100/9847Original features-validCOVID-19NormalPneumoniaTP54/8554/2051/95TN107/75108/05109/20FP0/701/201/10FN0/700/551/75Accuracy99/1598/9398/26Sensitivity98/7499/0096/74Specificity99/3598/9099/00Geometric mean99/0598/9597/87Area under curve0/99040/98950/9789


## 4.1. Description of Data

Canayaz developed a COVID-19 X-ray data set that included three subgroups of patients, including those with COVID-19, those with pneumonia, and those who were healthy [15]. By combining data from this database, a total of 364 images for each of the three categories were obtained as a balanced dataset [21–23]. The total number of images is equal to the number of classes multiplied by the number of class instances =  3∗3941092, with a 224 × 224 dimension. The same data are used in this study to predict COVID-19 disease using a convolutional neural network and to select optimal features using the binary differential metaheuristic algorithm. Figure 2 illustrates a representative sample of three output classifications: COVID-19, pneumonia, and healthy.Figure 2
Chest X-ray images of the different conditions: (a) COVID-19; (b) pneumonia; (c) healthy.
(a)(b)(c)


## 4.2. Performance Evaluation

The proposed model was run in MATLAB version 9.1.0.441655 (R2018b) on a laptop computer equipped with a 1.8 GHz processor and 4 Gigabytes of RAM. After training in the application phase, the proposed method took an average of 29 seconds per patient, which can be reduced by improving the hardware technology used. The COVID-19 prediction model was evaluated using the accuracy, sensitivity, specificity, geometric mean, and area under the curve (AUC-ROC) [24, 25] performance metrics (Equations (6)–(9)), where accuracy refers to the correctness of the classification. The proportion of correctly distinguished negative cases is referred to as “specificity,” while the proportion of correctly distinguished positive cases is referred to as “sensitivity.” The geometric mean is the second root of the sensitivity and specificity products. Higher values of the area under the curve (AUC) within the receiver operating characteristics indicate improved classification performance.(6)Accuracy=TP+TNTP+TN+FP+FN,whereTP means true positives which is the number of samples that are correctly labeled as positiveFP means false positives which is the number of samples that are wrongly labeled as positiveTN means true negatives which is the number of samples that are correctly labeled as negativeFN means false negatives which is the number of samples that are wrongly labeled as negative(7)Sensitivity=TPTP+FN,(8)Specificity=TNFP+TN,(9)Geometric mean=sensitivity∗specificity2.


## 4.3. Model Parameters

Figure3 illustrates the network structure of a deep convolutional neural network. Firstly, the image input layer dimensions were 224∗224, and the convolution operator used eight 3-by-3 filters. After processing the first block of the network layers, i.e., image input, convolution, Batch Normalize, ReLU, max-pooling layers, fully connected layer 400, ReLU, and Drop out, the local features were automatically extracted. Finally, the second network block categorized the input images into three output classes by utilizing three fully connected layers, softmax, and classification. After 200 epochs, the validation accuracy was 97.25% when using the ADAM optimizer, and the minibatch size was 64 (Figure 4). Due to the neural network’s regularization and barricade overfitting, batch normalization and dropout were used.Figure 3
The proposed model layers’ structure.Figure 4
Accuracy and loss measurements for convolutional neural networks used for training and validation data.Convolutional networks are used to transform data into feature vectors. Given that some network features may degrade the model’s performance [1], after extracting 400 features in the first fully connected layer, the binary differential metaheuristic algorithm was used to select the optimal feature subset and eliminate unnecessary features. The binary differential algorithm’s parameters were population = 20, iteration = 100 (Figure 5), and a crossover rate of 1. The amount (1-(geometric mean)) of the SVM classifier [26] was regarded as the population’s fitness values (Figure 5). Following the binary differential algorithm’s execution, 340 optimal features were selected.Figure 5
Fitness curve for the binary differential algorithm.


## 4.4. Performance Comparison

The conventional validation (CV) method, which employs random sampling, is one of the training and testing protocols used to determine the model’s accuracy and validate the estimation results. According to the CV method, 70% of data were used for training, 15% for validation, and 15% for testing [27, 28]. The proposed method was applied to the data, and 100 runs were performed to prevent overfitting [29]. The optimally selected features from the differential algorithm and the initial extracted features from the deep convolutional neural network were entered into the SVM classifier.The confusion matrix for the SVM classifier’s original and optimized features is demonstrated in Table1 using training, testing, validation, and total data.Table 1
Confusion matrix average after 100 runs with 3 classes using the (a) optimized features and (b) original features based on the training, test, validation, and total data.
(a) Optimized featuresOptimized features testPredictedCOVID-19NormalPneumoniaActualCOVID-1951/7500/2Normal0/1554/90/1Pneumonia0/40/5555/95Optimized features validationPredictedCOVID-19NormalPneumoniaActualCOVID-1955/050/050/45Normal0/0554/40/3Pneumonia0/4152/3Optimized features trainingPredictedCOVID-19NormalPneumoniaActualCOVID-19256/500Normal0254/10Pneumonia00253/4Optimized features totalPredictedCOVID-19NormalPneumoniaActualCOVID-19363/30/050/65Normal0/2363/40/4Pneumonia0/81/55361/65(b) Original featuresOriginal features testPredictedCOVID-19NormalPneumoniaActualCOVID-1951/6500/3Normal0/2554/650/25Pneumonia0/50/9555/45Original features validationPredictedCOVID-19NormalPneumoniaActualCOVID-1954/8500/7Normal0/1554/20/4Pneumonia0/551/251/95Original features trainingPredictedCOVID-19NormalPneumoniaActualCOVID-19256/4500/05Normal0254/10Pneumonia00253/4Original features totalPredictedCOVID-19NormalPneumoniaActualCOVID-19362/9501/05Normal0/4362/950/65Pneumonia1/052/15360/8Table1 depicts the confusion matrix using training, testing, validation, and total data for the SVM classifier’s original features and optimized features. The TP, TN, FP, FN, accuracy, sensitivity, specificity, geometric mean, and AUC metrics for each of the three output classes plus each type of testing, training, validation, and total data were computed (Table 2).Table 2
Comparison of indicators (TP, TN, FP, FN, accuracy, the area under curve, sensitivity, specificity, and geometric mean) for any output class based on (a) optimized features and (b) original features.
(a) Optimized featuresOptimized features-totalCOVID-19NormalPneumoniaTP363/30363/40361/65TN727/00726/40726/95FP1/001/601/05FN0/700/602/35Accuracy99/8499/8099/69Sensitivity99/8199/8499/35Specificity99/8699/7899/86Geometric mean99/8499/8199/60Area under curve0/99840/99810/9961Optimized features-trainingCOVID-19NormalPneumoniaTP256/50254/10253/40TN507/50509/90510/60FP0/000/000/00FN0/000/000/00Accuracy100/00100/00100/00Sensitivity100/00100/00100/00Specificity100/00100/00100/00Geometric mean100/00100/00100/00Area under curve1/00001/00001/0000Optimized features-testCOVID-19NormalPneumoniaTP51/7554/9055/95TN111/50108/30106/80FP0/550/550/30FN0/200/250/95Accuracy99/5499/5199/24Sensitivity99/6299/5598/33Specificity99/5199/4999/72Geometric mean99/5699/5299/02Area under curve0/99560/99520/9903Optimized features-validationCOVID-19NormalPneumoniaTP55/0554/4052/30TN108/00108/20109/55FP0/451/050/75FN0/500/351/40Accuracy99/4299/1598/69Sensitivity99/1099/3697/39Specificity99/5999/0499/32Geometric mean99/3499/2098/35Area under curve0/99340/99200/9840(b) Original featuresOriginal features-totalCOVID-19NormalPneumoniaTP362/95362/95360/80TN726/55725/85726/30FP1/452/151/70FN1/051/053/20Accuracy99/7799/7199/55Sensitivity99/7199/7199/12Specificity99/8099/7099/77Geometric mean99/7699/7199/44Area under curve0/99760/99710/9944Original features-trainingCOVID-19NormalPneumoniaTP256/45254/10253/40TN507/50509/90510/55FP0/000/000/05FN0/050/000/00Accuracy99/99100/0099/99Sensitivity99/98100/00100/00Specificity100/00100/0099/99Geometric mean99/99100/00100/00Area under curve0/99991/00001/0000Original features-testCOVID-19NormalPneumoniaTP51/6554/6555/45TN111/30107/90106/55FP0/750/950/55FN0/300/501/45Accuracy99/3699/1298/78Sensitivity99/4299/0997/45Specificity99/3399/1399/49Geometric mean99/3899/1198/46Area under curve0/99370/99100/9847Original features-validCOVID-19NormalPneumoniaTP54/8554/2051/95TN107/75108/05109/20FP0/701/201/10FN0/700/551/75Accuracy99/1598/9398/26Sensitivity98/7499/0096/74Specificity99/3598/9099/00Geometric mean99/0598/9597/87Area under curve0/99040/98950/9789


## 5. Discussion

Predicting a disease can be accomplished by combining images with a deep neural network, where a deep neural network can be used as a feature extractor. The large size and volume of images applied to the deep neural network result in numerous feature formations that increase the training and decision times of the predictive model.The proposed model faced several design challenges, including collecting and improving lung images and the deep network architecture, in terms of the structure, number, and type of layers, plus the metaheuristic algorithm, the initial population, and the metaheuristic algorithm’s objective function type. The presence of inefficient features extracted from the deep network may reduce the predictive model’s accuracy and efficiency; thus, using the metaheuristic method to select the optimal features improved the model’s memory, time, and accuracy.According to Table3, the proposed model achieved an accuracy of 99.43%, a sensitivity of 99.16%, a specificity of 99.57%, a geometric mean of 99.37%, an AUC of 0.99, and a root mean square error (RMSE) of 0.1133 using features extracted from the X-ray image via the CNN and features optimized using the binary differential metaheuristic algorithm. The accuracy of the classification of the COVID-19 problem was calculated to be 99.43% in this study, and the number of relevant features was 304 (Table 4), whereas, in a previous study [15], these figures were reported to be 99.38% and 448 features, respectively, based on the same data.Table 3
Average of the confusion matrix components after 100 runs using original and optimized features.
MethodTPTNFPFNAccuracySensitivitySpecificityGeometric meanArea under curveRMSEOriginal features via deep convolutionTraining254/65509/320/020/021/00000/99991/00001/00000/99990/0036Testing53/92108/580/750/750/99090/98660/99310/98980/98980/1533Validation53/67108/331/001/000/98780/98160/99090/98620/98630/1905Total362/23726/231/771/770/99680/99510/99760/99640/99641/1543Optimized features via binary differentialTraining254/67509/330/000/001/00001/00001/00001/00001/00000/0000Testing54/20108/870/470/470/99430/99160/99570/99370/99370/1133Validation53/92108/580/750/750/99090/98620/99310/98960/98980/1592Total362/78726/781/221/220/99780/99670/99830/99750/99751/1543Table 4
A comparison of the proposed method with prior research.
ResearchMethodNumber of featuresAccuracyGeometric meanRAM (gigabyte)Max computation time (s)[15]Binary particle swarm optimization-VGG1944899.38-162500Proposed methodBinary differential-CNN30899.4399.3742300Transfer learning models are trained to classify 1,000 different types of object images and must be retrained to classify specific issues such as COVID-19 detection. Although the learning process is prompt in models like ResNet and SqueezeNet, they require preprocessing the input image, sizing the data set, and setting multiple parameters. The upper layers extract color and edge features, while the deeper layers extract complex features. Process time increases as the number of layers in transfer learning models increases. The trained transfer learning model’s feature map and activation layers must be customized for the specific COVID-19 problem, which requires a large amount of memory. After fine-tuning the pretrained model’s principal component analysis (PCA), the optimal feature can be selected using heuristic methods, automated encoders, or variance-based selectors. Finally, ensemble methods, such as a combination of SVMs or other classifiers, can be used to predict COVID-19 disease diagnosis accuracy. Using semisupervised self-learning methods may result in acceptable accuracy and reduced labeling time.In future work, a different feature selection algorithm and the application of additional learners may produce improved results. Along with the images, the parameters derived from clinical trials can create a new model with a novel combination of features for diagnosing the disease and possibly predicting mortality as a result.


## 6. Conclusion

The number of people infected with COVID-19 has risen rapidly. Machine vision techniques and artificial intelligence are critical in diagnosing and treating disease. The purpose of this paper was to propose a method for the “COVID-19” problem via a set of lung images that included three categories of pneumonia, COVID-19, and healthy.A deep convolutional neural network consisting of 11 layers was applied to extract the features. The binary differential metaheuristic method was used to select relevant features and eliminate unrelated features. Lung X-ray images were classified using an SVM classifier based on these optimal features. This study demonstrated that the accuracy indicator and the number of relevant extracted features outperformed previous methods using the same data. Based on a deep neural network and a metaheuristic feature selection algorithm, the proposed model can be used in various other medical applications.



---

*Source: 9973277-2021-10-05.xml*