Skip to main content

COVIDetectioNet: COVID-19 diagnosis system based on X-ray images using features selected from pre-learned deep features ensemble


The recent novel coronavirus (also known as COVID-19) has rapidly spread worldwide, causing an infectious respiratory disease that has killed hundreds of thousands and infected millions. While test kits are used for diagnosis of the disease, the process takes time and the test kits are limited in their availability. However, the COVID-19 disease is also diagnosable using radiological images taken through lung X-rays. This process is known to be both faster and more reliable as a form of identification and diagnosis. In this regard, the current study proposes an expert-designed system called COVIDetectioNet model, which utilizes features selected from combination of deep features for diagnosis of COVID-19. For this purpose, a pretrained Convolutional Neural Network (CNN)-based AlexNet architecture that employed the transfer learning approach, was used. The effective features that were selected using the Relief feature selection algorithm from all layers of the architecture were then classified using the Support Vector Machine (SVM) method. To verify the validity of the model proposed, a total of 6092 X-ray images, classified as Normal (healthy), COVID-19, and Pneumonia, were obtained from a combination of public datasets. In the experimental results, an accuracy of 99.18% was achieved using the model proposed. The results demonstrate that the proposed COVIDetectioNet model achieved a superior level of success when compared to previous studies.


The rapid spread of the coronavirus infection, known as COVID-19 has resulted in an extensive health, financial, and personal impact on a global scale. The virus was first identified in Wuhan, China, in December 2019. Later, the COVID-19 virus has been found to be easily transmitted from person to person, resulting in a pandemic affecting almost all countries and territories worldwide. With each passing day, hundreds of deaths and thousands of new infections are being recorded in many different countries [1, 2], and at the time this paper was penned, the global total number of COVID-19 cases has stood at approximately 3.5 million confirmed cases and 224,300 fatalities across 205 countries [3].

Some of the people who have contracted the COVID-19 disease suffer medical complications such as acute respiratory disorders and secondary infections. In such severe cases, early treatment carried out following early diagnosis plays a critical role in reducing the likelihood of mortality. Currently, the main method used to detect COVID-19 disease is a reverse transcriptase-polymerase chain reaction (RT-PCR), which is a test conducted on swab samples taken from the respiratory tract. However, the RT-PCR test is a time consuming, laborious, and complicated manual process. In addition, test kits are only available in limited numbers worldwide. An automated system, which is both reliable and fast, is urgently needed for the detection of COVID-19. In addition to the RT-PCR method of testing, radiological imaging using X-rays is known to be an effective technique used in detection of COVID-19. For this purpose, artificial intelligence-based automated detection and diagnostic systems that are based on X-ray images have recently been developed, resulting in faster and more accurate Detection of COVID-19 [1, 2, 4,5,6] and they are becoming available as an alternative to manual testing.

In literature, there are numerous studies that have been published, which are based on machine learning and deep learning applied in the detection of COVID-19 using X-ray images. From these studies, Zhang et al. [1] presented a ResNet network model to detect COVID-19 from X-ray images. In their experimental study, a dataset that contained 1078 images from both COVID-19 diagnosed and healthy patients, was used. According to their results, values achieved for sensitivity, specificity, and AUC (Area Under the Curve) were 96.0%, 70.7%, and 95%, respectively. Wang et al. [4] developed a Convolutional Neural Network (CNN)-based architecture for the detection of COVID-19. In their experimental studies, X-ray images containing COVID-19, Normal, and Pneumonia classes were used. The authors achieved a test accuracy of 92.6% with images from all classes. Narin et al. [5] evaluated the performances of three different CNN-based models (ResNet50, InceptionV3, and InceptionResNetV2) for the detection of COVID-19 using chest X-rays. According to the performance results obtained, the pretrained ResNet50 model yielded the highest classification performance with 97%. Apostolopoulos et al. [6] calculated performances using transfer learning based on five different CNNs (VGG19, Inception, MobileNetV2, Xception, and InceptionResNetV2) for the detection of the COVID-19 viral disease. In their experimental studies, they used a total of 1427 X-ray images that included 224 images of COVID-19 disease, 700 images of bacterial pneumonia, and 504 images of normal (healthy) patients. According to these results, the best accuracy, sensitivity, and specificity scores obtained were 96.78%, 98.66%, and 96.46%, respectively. Ghoshal et al. [7] developed a Bayesian Convolutional Neural Network (BCNN) model for COVID-19 prediction using a publicly available COVID-19 chest X-ray dataset containing 70 lung X-ray images of patients. In their experimental results, the proposed Bayesian-based CNN model yielded an accuracy score of 92.9%. Ucar et al. [8] proposed a COVIDiagnosis-Net system based on a pretrained CNN-based SqueezeNet architecture and the Bayesian optimization algorithm. They used a total of 5310 X-ray images, including ones that were classified as Normal, Pneumonia and COVID-19. In their experimental studies based on fine-tuned hyper parameters and an augmented dataset, the highest accuracy score achieved was 98.26%.

On the other hand, some studies have been based on machine learning and deep learning using Computed Tomography (CT) scanning images, which is some other system of radiological imaging. From these studies, Butt et al. [2] evaluated multiple convolutional neural network models for detection of COVID-19 disease, based on CT images. For this purpose, 2D and 3D CNN models were used. In addition, the classical ResNet-18 network structure was used for extraction of image features. Their performance was calculated to have a sensitivity score of 98.2% and specificity score of 92.2%. Li et al. [9] developed a fully-automatic framework to detect COVID-19 using chest CT scanning images. The researchers presented a neural network (COVNet) model based on the pretrained ResNet50 architecture for detection of COVID-19. In their experimental works, a sensitivity score of 90% was achieved. Similarly, each of Song et al. [10], Tang et al. [11], and Chen et al. [12] proposed models that were based on machine learning and deep learning for the detection of COVID-19 using CT scanning images.

In the aforementioned studies, the performance of the detection of COVID-19 was evaluated on pretrained deep architectures that were based on transfer learning approach. In these studies, pretrained architectures were observed to be successful in the detection of COVID-19. However, no additional studies were carried out to increase the classification performance of the deep architectures used in these studies nor their original forms were used. On the other hand, deep architectures trained using the ImageNet dataset were subjected to fine-tuning by means of changing last three layers and used for detection of COVID-19. Therefore, these studies cannot be considered innovative, and in general, only a few images were used.

In the current study, a COVIDetectioNet system based on features selected from a new pre-learned deep features ensemble approach was developed for the classification of COVID-19 and other classes. The model proposed uses the AlexNet architecture for the feature extraction process. The architecture was trained using the transfer learning approach and with deep features obtained from all layers of the architecture. These features extracted from the convolution and fully-connected layers were then combined. Subsequently, the efficient features were selected using the Relief method. Finally, the obtained features were classified using the Support Vector Machine (SVM) algorithm. In the experimental studies, a total of 6092 X-ray images containing Normal (healthy), COVID-19, and Pneumonia classes were obtained by combining publicly available datasets. The results showed that the COVIDetectioNet system proposed yielded a 100% detection success rate in the diagnosis of the COVID-19 viral disease based on the use of chest X-ray images.

The contributions of the COVIDetectioNet system proposed are as follows:

  • A pre-learned deep features ensemble approach based on the learned visual features from the fully-connected and convolution layers of the pretrained deep model is proposed. In the experimental results, this approach was proven to significantly contribute to the classification performance for diagnosis of COVID-19, both individually and in a combined format.

  • The Relief feature selection algorithm was embedded in the model proposed in order to reveal the best efficient deep features. In the experimental results, the accuracy score obtained was 99.2% using only 1500 deep and effective features. Using this approach, time costs have been reduced whilst classification success has been increased.

  • Publicly available datasets organized by the authors of studies carried out on detection of COVID-19 were combined, and a combined dataset containing chest X-ray images was used in the experimental studies of this study. In the experiments, 100% accuracy was achieved using the proposed COVIDetectioNet model for the detection of the COVID-19 viral disease. In addition, the average recognition success was calculated to be 99.2% using the Normal, COVID-19, and Pneumonia classes.

The remaining part of this paper is organized as follows: Section 2 introduces the proposed methodology, the dataset, and the related theories, while Section 3 details the experimental works and the results. Section 4 presents a discussion of the results, and Section 5 outlines the contribution of the current study.

Proposed methodology

The COVIDetectioNet system proposed consists of three basic stages: pre-learned deep features ensemble, feature selection, and classification. In the first stage, deep features were obtained from the convolution and fully-connected layers of the AlexNet architecture. In the second stage, the most efficient features were selected from the pre-learned combined deep features using the Relief algorithm. In the third stage, the SVM method was used to classify these outstanding features. The general architecture of the pre-learned deep features ensemble COVIDetectioNet system proposed is presented in Fig. 1.

Fig. 1
figure 1

Architecture of COVIDetectioNet system proposed

The following subsections detail the proposed pre-learned deep features ensemble approach, Relief feature selection algorithm, SVM classifier, and dataset description.

Pretrained architecture

In this study, a pretrained CNN-based AlexNet architecture [13] was used as the feature extractor model. This architecture was trained using multiclass ImageNet dataset containing one million images. AlexNet is a deep 25-layer architecture that includes five convolution layers, seven ReLU layers, three fully-connected layers, three maxpool layers, two normalization layers, two dropout layers, and one softmax layer. The general structure of this architecture is given in Table 1.

Table 1 General structure of AlexNet architecture

In this study, the transfer learning approach was used for the pretrained CNN-based AlexNet architecture. The greatest disadvantage of the models that are created ex novo is that a largescale dataset is required for training purposes, and training the model developed requires a considerable amount of time. Transfer learning enables information to be used from pre-learned tasks and this information is then reapplied later in order to solve other problems. Thanks to this approach, the weights in the model contain a significant amount of information, resulting in a higher rate of success through faster learning as information is effectively reused [14,15,16,17]. A sample illustration of the fine-tuning process is shown in Fig. 2 using the fc6 layer of the AlexNet architecture based on the transfer learning approach.

Fig. 2
figure 2

Proposed AlexNet-SVM architecture based on fine-tuning process

Proposed pre-learned deep features ensemble approach

In the literature, earlier studies carried out on object recognition and classification, obtained the learned features using fully-connected layers, such as fc6, fc7, and fc8 of the AlexNet architecture. However, in the current study, deep features were obtained using convolution layers in addition to fully-connected layers. For this purpose, an ensemble averaging operation was applied for each channel using the output values obtained from the Conv1, Conv2, Conv3, Conv4, and Conv5 layers. This process is mathematically formulated as follows.

Suppose the value obtained from a convolution layer is MXNXC:

$$ A= Conv\left(:,:,k\right)\kern2em k=1,2,\dots, C $$
$$ {feat}_k=\frac{\sum \limits_{i=1}^M\sum \limits_{j=1}^NA\left(i,j\right)}{MXN} $$
$$ fea{t}_{Conv}=\left[{feat}_1,{feat}_2,\dots, {feat}_C\right] $$

where C and MXN represent the number of channels and the size of the learned visual properties. By applying Eqs. 1 through 3, the C dimension feature vector (featConv) is obtained. These operations were applied for each of the Conv1, Conv2, Conv3, Conv4, and Conv5 layers. In addition, the pseudocode of this approach is given in Algorithm 1.

Algorithm 1. Pseudocode of the proposed approach based on averaging ensemble.

figure a

In the approach proposed in this study, visual features learned from convolution layers were used in addition to fully-connected layers with a view to increasing classification performance for the purposes of detection of COVID-19. As an example, the visual properties obtained from the 96-channel convolution (Conv1) layer of the AlexNet architecture using X-ray images are shown in Fig. 3.

Fig. 3
figure 3

Visual properties obtained from X-ray image based on Conv1 layer

Relief feature selection algorithm

The Relief algorithm proposed by Kira and Rendell is based on the k-nearest neighbor algorithm [18]. The basic principle of the Relief algorithm is to select features by calculating the proxy statistical value. This proxy statistic is denoted by W as a unit of weight ranging from −1 (worst) to 1 (best) [19]. The following provides an overview of the steps of the original Relief algorithm:

  1. 1

    W initial value is assigned as 0 for each feature (W[A] = 0).

  2. 2

    R random samples are taken from the dataset.

  3. 3

    Steps 4 and 5 are repeated for each sample (Ri).

  4. 4

    The distance between Ri and the rest of the sample (same class samples [H] and other classes [M]) is calculated based on Eq. 4.

  5. 5

    W[A] value is updated based on Eq. 5.

$$ diff\left(A,{I}_1,{I}_2\right)=\frac{\left| value\left(A,{I}_1\right)- value\left(A,{I}_2\right)\right|}{\max (A)-\min (A)} $$
$$ W\left[A\right]=W\left[A\right]-\frac{diff\left(A,{R}_i,H\right)}{m}+\frac{diff\left(A,{R}_i,M\right)}{m} $$

Equation 5, calculates the distance between the samples I1 and I2 using the feature A. Samples of similar classes (H) contribute negatively, while discrete samples (M) contribute positively. As a result, the desired number of features is selected using the W[A] values calculated [18,19,20].

The purpose of the feature selection process used in the current study was to develop the feature vector and extract the features with minimum knowledge prior to the classification process. In this way, a high number of discriminative features were selected using the Relief algorithm. In the experimental studies, the use of the Relief feature selection method was proven to be an important factor in improving classification performance.

Support vector machine classifier

Support Vector Machines (SVM) is a statistical learning algorithm developed by Vapnik to solve classification and regression problems [21]. SVM solves the classification problem by transforming it into a square optimization problem. Thus, the algorithm decreases the steps in the learning process and provides a faster solution than most general algorithms [22, 23]. The SVM classifier is based on the principle of determining the most suitable hyperplane to distinguish between two classes, which are determined as positive or negative (see Fig. 4). In a classification problem consisting of two classes and n elements, learning data is shown as X = {xi, yi} and i = 1, 2,……, n. Here, while x is the input vector of the properties of classes in size N, y represents the class labels corresponding to −1 or + 1 as a result of the calculations shown in Eq. 6 [24].

$$ {\displaystyle \begin{array}{c}{y}_i=+1\kern0.5em for\kern0.75em w{x}_i+b\ge +1\\ {}{y}_i=-1\kern0.5em for\kern0.75em w{x}_{\mathrm{i}}+b\le -1\end{array}} $$

where w represents the weight vector of the hyperplane and b indicates the trend value. In solving the classification problem of SVM, the approach varies based on the fact that whether or not the data can be linearly separated.

Fig. 4
figure 4

General illustration of SVM structure

In classification problems that can be separated linearly, the hyperplane, which ensures that the maximum distance between the training examples of two classes that are close to each other, is found as a result of solving the optimization problem shown in Eq. 7 [25].

$$ \frac{\min {\left|\left|w\right|\right|}^2}{2}\kern1em for\kern0.5em {y}_i\left(w{x}_i+b\right)\ge +1 $$

In classification problems that cannot be separated linearly, the problem can be solved by defining an artificial ξ variable and a smoothing parameter (C). Related limitations are shown in Eq. 8.

$$ {\displaystyle \begin{array}{c}\min \Big[\frac{{\left|\left|w\right|\right|}^2}{2}+C\ast \sum \limits_{i=1}^r{\xi}_i\\ {}{y}_i\left(w.\varphi \left({x}_i\right)+b\right)\ge 1-{\xi}_i\kern2.75em {\xi}_i\ge 0\end{array}} $$

The Lagrange multiplier shown in Eq. 9 is used to resolve the optimization problem in determining the optimal hyperplane;

$$ L\left(\alpha \right)=\sum \limits_i^n{\alpha}_{\mathrm{i}}\pm \frac{1}{2}\sum \limits_{i,j=1}^n{\alpha}_i{\alpha}_j{y}_i{y}_j{x}_i,{x}_j $$

subject to:

$$ {\displaystyle \begin{array}{c}\sum \limits_i^n{\alpha}_i{y}_i=0\\ {}0\le {\alpha}_i\le C,\kern0.5em i=1,2,\dots, n\end{array}} $$

where ai represents the Lagrange multipliers depending on the condition α1, α2,…, αn ≥0. Many classification problems cannot be linearly separated in the original space. Therefore, they are resolved by using a kernel function expressed as K in order to convert the data from a low-dimensional input space to a high-dimensional feature space [26]. Kernel function K represents an expression that has the core function Φ(xi). Φ(xj). The decision function of the SVM classifier with the addition of the core function is expressed as shown in Eq. 11 [27, 28].

$$ f(x)=\mathit{\operatorname{sign}}\left(\sum \limits_{i=1}^n{\alpha}_i{y}_iK\left({x}_i,x\right)+b\right) $$


In this study, a dataset was created based on all publicly available images of the disease obtained from chest X-ray images. In creating this combined dataset, three different datasets obtained from the Github and Kaggle databases created by the authors of other studies were utilized. Information on the new dataset and its sources are detailed in Table 2.

Table 2 Information on datasets

Table 2 details the characteristics of the datasets that were partially combined and used within the current study for the detection of COVID-19. The combined dataset includes chest X-ray images of COVID-19, Normal (healthy), and Pneumonia classes, with 219, 1583, and 4290 images, respectively. Sample X-ray images of each class are given in Fig. 5.

Fig. 5
figure 5

Sample X-ray images: a) Normal, b) Pneumonia, c) COVID-19

Experimental results

In this paper, the performance metrics used for the analysis of the experimental works are accuracy, specificity, precision, sensitivity, and F1-Score. The mathematical equations for each of these metrics are given in Eqs. 12 through 16:

$$ Accuracy=\frac{TP+ TN}{TP+ FP+ FN+ TN} $$
$$ Specificity=\frac{TN}{FP+ TN} $$
$$ Precision=\frac{TP}{TP+ FP} $$
$$ Sensitivity=\frac{TP}{TP+ FN} $$
$$ Accuracy=\frac{2\ast Preci\mathrm{s} ion\ast Sensitivity}{Precision+ Sensitivity} $$

where true-positive, true-negative, false-positive, and false-negative are represented as TP, TN, FP, and FN, respectively.

The experimental studies were performed using MATLAB 2019a software on a computer with an Intel Xeon Silver 2.19 GHz processor, NVIDIA P4000 Quadro GPU card, and 32GB RAM. In this study, the SVM method was used in order to classify the deep features derived from the pretrained CNN architecture. The parameters of the SVM classifier were determined through Cubic kernel function and the one-vs.-all (OVA) approach. The SVM parameter C was searched in the range of [10−4, 103], box constraint level was determined as 1 and kernel scale value was set to automatic. In addition, during the experiments, 90% of the dataset was used for the purposes of training, whilst the remaining 10% was used in testing the network model proposed. The number of images used for training and testing in the experimental studies is shown in Table 3.

Table 3 Dataset class distributions for training and testing

In the first experiment, deep features were extracted from the fully-connected (fc6, fc7, fc8) layers of the pretrained AlexNet architecture. In addition, using the proposed approach (see Algorithm 1), deep features were obtained from the convolution layers of the architecture and calculated individually using the SVM classifier. The performance results of this first experiment are presented in Table 4.

Table 4 Individual performance results based on pre-learned deep features ensemble

Table 4 details the performance measures and numbers of features from each pre-learned deep layer of the AlexNet architecture used in the first experiment, including the performance of the combined convolution layers as well as total of all layers. According to these results, the highest accuracy score achieved from the individual layers of the AlexNet architecture was 98.19% for the fc6 layer, whilst the second-best was 97.21% for the fc7 layer. In addition, the highest accuracy score among the convolution layers was 97.21% for the Conv5 layer. It was observed that the accuracy score obtained from the Conv5 and Conv4 layers was higher than that of the fc8 layer. The combined performance of all the convolution layers was found to be more successful than the individual fc7 and fc8 layers. In addition to these results, a superior performance was achieved using a few features obtained from the convolution layer. As a result, the highest performance score achieved in this first experimental study was 98.52%, using a combination of all the layers. The confusion matrix and ROC curve of the best performance (all layers) of the first experiment (see Table 4) are shown in Fig. 6.

Fig. 6
figure 6

Confusion matrix and ROC curve for best accuracy score (first experiment)

In Fig. 6, the confusion matrix and ROC curve of the performance obtained for the combined features extracted from the convolution and fully-connected layers of the AlexNet architecture are illustrated. According to these results, a 100% accuracy score was obtained for the COVID-19 class, 99.86% for the Normal (healthy) class, and 99.18% for the Pneumonia class. The average accuracy rate achieved across all three classes was 98.56%.

In the second experiment, the features obtained from all layers of the pretrained AlexNet architecture were combined. Subsequently, the effective features were selected from a total of 10,568 combined features using the Relief algorithm. In the experiment, which was conducted based on the Relief method, the selected features were tuned according to the range [2005000], with a step size of 100, and for each selected feature the vector’s performance was calculated using the SVM classifier. The performance results of the second experiment are shown in Table 5.

Table 5 Performance results of features selected from pre-learned deep features ensemble

Table 5 details the sensitivity, precision, F1-Score, and accuracy scores of the selected features (which are numbered 500, 1000, 1500, 2000, 3000, 4000, and 5000), which showed the highest performance of the pre-learned deep features ensemble approach. According to these results, the highest accuracy score of the features selected using the Relief algorithm was 99.18%, and was achieved using 1500 effective features. In addition, the second-best score was 99.01%, achieved using both 2000 and 3000 selected features. The confusion matrix and ROC curve of the best performance (99.18%) of the COVIDetectioNet model proposed are shown in Fig. 7, and the success graph of the normal and selected features from both experiments is shown in Fig. 8.

Fig. 7
figure 7

Confusion matrix and ROC curve of best accuracy score for approach proposed

Fig. 8
figure 8

Success graph of normal and selected features (both experiments)

Figure 7 presents the confusion matrix and ROC curve of the performance obtained for the most effective 1500 features selected using the COVIDetectioNet model proposed based on the Relief algorithm. As can be seen, an accuracy score of 100% was obtained for the COVID-19 class, 99.86% for the Normal (healthy) class, and 99.18% for the Pneumonia class. The average accuracy rate across all three classes was 99.18%.

In this paper, 10-fold cross validation technique was used to evaluate the performance of the proposed method. In addition, holdout validation technique was also considered where randomly selected 90% of the input data was used for training of the proposed system and the rest 10% of the input data was used for testing purposes. Thus, for both cross and holdout validation techniques, average accuracy and accuracy scores were used for performance evaluation. Table 6 shows the accuracy scores obtained by the selected features. As shown in Table 6, the accuracy increased parallel as in the increase of the number of features. The peak accuracy 98.05% was obtained at number of features were 1500. After this point, the accuracy started to decrease.

Table 6 Performance results of features selected from pre-learned deep features ensemble

Table 7 shows the accuracy scores for each fold while using the 10-fold cross validation technique. As observed in Table x, for folds 2 and 6, the produced accuracy scores were 100%. Besides, for folds 5 and 8, the produced accuracy scores were above 99.00%. And the other folds produced accuracy scores in the range of 96.00% and 99.00%. These results showed that due to the partition of the training and test sets, different accuracy scores were obtained. The average accuracy score for 10-fold cross validation was 98.05%.

Table 7 Accuracy values for iteration of the 10-fold cross validation

When the holdout and cross validation results were compared, it was seen that hold out result was higher than the cross validation result. It should be noted that in cross validation technique, 100% accuracy score was also obtained. In holdout validation, due to the randomly selection of the training and test sets, obtaining high accuracy scores were reasonable. Thus, average accuracy score over cross validation was considered a better way in performance evaluation of the such systems.

In this study, results of a MKs-ELM-DNN model proposed were compared with other CNN-based pretrained models. For this purpose, deep features were extracted using the fully-connected layers of VGG16, SqueezeNet, GoogleNet, Inceptionv3, and ResNet18 architectures; ‘fc6’, ‘pool10’, ‘loss3-classifier’, ‘predictions, and ‘fc1000, respectively. Then, for each of these features, accuracy scores were calculated using the SVM classifier based on the same parameters used in this study. In addition, the transfer learning approach was used for these deep architectures. For this purpose, the last three layers of these deep architectures were removed and replaced by a fully-connected, a softmax, and a classification layer. Thus, these deep architectures were adapted for the solution of the detection of COVID-19 problem. In this specific task, the mini-batch size was chosen as 10, the epoch number was set to 7, and the initial learning rate was searched between 0.0001 and 0.01. In addition, optimization was carried out using SGDM (Stochastic Gradient Descent with Momentum) learning. The accuracy results obtained from all these studies are presented in Table 8.

Table 8 Performance results of other pretrained networks

Table 8 shows accuracy scores based on transfer learning (fine-tuning) and deep feature extractor-SVM classifier for pretrained deep architectures. According to these results, the best accuracy score was 96.72% with the AlexNet model based on the fine-tuning process, while the second-best accuracy score was obtained using VGG16 architecture based on the fine-tuning process. According to these results, it was observed that fine-tuning process based on deep learning architectures for Detection of COVID-19 yields the highest performance compared to deep feature extractor-SVM classifier.

These experimental tests prove that the pre-learned deep features ensemble yielded very effective results in the detection of COVID-19 disease. By applying the COVIDetectioNet system proposed, the decision-making processes of medical professionals can be supported in the detection of the COVID-19 viral disease based on chest X-ray images, saving valuable time, and with a high-performance detection success rate.


The novel coronavirus viral disease, known also as COVID-19, first appeared in December 2019 and has since spread rapidly to impact human lives on a global scale. Early diagnosis of this disease has become an important issue in terms of reducing the likelihood of high fatality numbers and the further spread of the pandemic. Automated early detection of the disease through radiological images could be achieved using artificial intelligence-based image processing techniques. Recently, several studies have been conducted based on machine learning and deep learning models for the early detection of COVID-19. In the current study, the COVIDetectioNet approach proposed was compared with the performance results of previous studies that used similar datasets, and these comparative results are presented in Table 9.

Table 9 Comparison of results of model proposed to those of previous studies

The results of the model proposed in the current study were observed to be more successful than those of the previous studies, as depicted in Table 9. Wang et al. [4] presented their COVID-Net system based on a tailored CNN for the diagnosis of COVID-19 and achieved a classification success rate of 92.6%. Afshar et al. [29] proposed a deep learning approach based on a capsule network using a four-class dataset of chest X-ray images, achieving a 95.17% classification accuracy for COVID-19 and other classes. Farooq et al. [30] developed a fine-tuned pretrained ResNet-50 architecture using data augmentation for Detection of COVID-19 and achieved a reported success rate of 96.2%. Chowdhury et al. [31] included four different pretrained deep learning models using four-class X-ray images based on data augmentation, with the best accuracy score of 98.3% using the SqueezeNet model. Ucar et al. [8] introduced a deep learning model based on a pretrained SqueezeNet model with Bayes optimization algorithm for COVID-19 viral detection, resulting in a 98.26% accuracy score. Narin et al. [5] presented three different convolutional neural networks based on the transfer learning approach for Detection of COVID-19 using chest X-rays and reported that the pretrained ResNet50 model yielded the best classification performance with 98% accuracy. Apostolopoulos et al. [6] used a transfer learning approach to calculate the performances of five different deep architectures and achieved an overall accuracy of 97.82% in the detection of COVID-19. Ghoshal et al. [7] proposed a deep model based on Bayesian Convolutional Neural Networks using a publicly available COVID-19 chest X-ray dataset, with their results showing an accuracy level of 88.39%. Li et al. [32] proposed a model based on discriminative cost-sensitive learning for the detection of COVID-19 from chest X-ray images and reported an accuracy score of 97.01%. Hemdan et al. [33] evaluated seven different deep CNN-based architectures for COVID-19 diagnosis, with the VGG19 and DenseNet201 models both yielding the highest classification performance level with 90% accuracy. Sethy et al. [34] presented a deep learning-based methodology for the detection of COVID-19 infected patients using X-ray images and achieved 95.38% accuracy using the ResNet50 model with SVM classifier.

As can be seen from Table 9, the proposed COVIDetectioNet model was based on a pre-learned deep features ensemble with a feature selection algorithm and achieved a superior classification performance when compared to other studies in the diagnosis of COVID-19 viral disease using chest X-ray images. The pre-learned deep features ensemble approach proposed based on the learned visual features of the fully-connected and convolution layers of the pretrained deep model has been proven to significantly contribute to the issue of classification performance. These results demonstrate that the classification performance of deep architectures can be improved using feature selection methods such as the Relief algorithm. In addition, this approach results in time cost savings, which plays a significant role in the successful treatment of patients during this COVID-19 pandemic.

In this paper, the purpose of using the pre-trained AlexNet architecture is to realize a faster and high-performance detection system using both weights of pre-trained architectures and low dataset. Additionally, the previous object-oriented research used the fc6 and fc7 layers of pretrained CNN-based AlexNet architecture [14, 16, 40,41,42,43]. In this study, the conv1, conv2, conv3, conv4, and conv5 layers containing high-dimensional feature vectors, as well as the fc6 and fc7 layers were used. Averaging process was applied for each channel belonging to these layers and an attempt was made to obtain meaningful features (Algorithm 1). During the experimental studies, it was clearly observed that this proposed approach achieved high performance for COVID19 detection (Tables 4 and 5). Additionally, it was observed that its combination with fc6, fc7, and fc8 layers significantly contributed to the efficiency of classification.


In this paper, a novel model called COVIDetectioNet is presented for the detection of COVID-19 viral disease using a pre-learned deep features ensemble and feature selection. The approach proposed consists of three key stages based on chest X-ray images. In the first stage, the convolution and fully-connected layers of a pretrained AlexNet architecture are used as a feature extractor. In the second stage, the most efficient features are selected from the combined obtained deep features using the Relief algorithm. In the final stage, the classification of the effective features is conducted using the SVM method.

In order to test the model proposed, the publicly available X-ray images used in previous COVID-19 studies were utilized. In the experimental testing of the proposed approach, the highest performing effective properties were selected using the COVIDetectioNet model proposed based on the Relief algorithm. Testing results shows that an accuracy score of 99.18% was achieved, together with a precision score of 99.48%, a sensitivity score of 99.13%, and an F1-Score of 99.30% based on the best 1500 selected features. In addition, the COVIDetectioNet model proposed yielded an accuracy score of 100% in the detection of COVID-19 viral disease. These results demonstrate that the COVIDetectioNet model proposed is more successful than earlier studies carried out for the detection of COVID-19 using X-ray imaging.

The advantages and limitations of the COVIDetectioNet model proposed are as follows:


  • The pretrained model reduces the training complexity of this study.

  • The pretrained model enables us to have effective features.

  • Feature selection algorithm selects high performance features.

  • The pre-learned deep features ensemble model consists of other high-dimensional layers as well as traditional fc6, fc7 and fc8 layers.

  • The pre-learned deep features ensemble model generates a higher accuracy score than that of individual models.


  • Finding optimal parameters for the SVM classifier can be seen as a limitation in terms of performance of the study.

  • Finding optimal values for the Relief algorithm can be seen as another limitation of the study.

In future works, a mobile-web-based system is planned to be developed, which will aim to support health professionals in their drive to detect instances of COVID-19 infection, and also for other diseases. In addition, other CNN-based models and attention modules will be examined as the studies in this area.


  1. Zhang J, Xie Y, Li Y, Shen C, Xia Y (2020) Covid-19 screening on chest x-ray images using deep learning based anomaly detection. arXiv preprint arXiv:2003.12338

  2. Butt C, Gill J, Chun D, Babu BA (2020) Deep learning system to screen coronavirus disease 2019 pneumonia. Applied Intelligence, 1-7

  3. WHO - Coronavirus disease 2019 info web site n.d. ()

  4. Wang L, Lin ZQ, Wong A (2020) COVID-net: a tailored deep convolutional neural network design for detection of COVID-19 cases from chest radiography images. arXiv preprint arXiv:2003.09871

  5. Narin A, Kaya C, Pamuk Z (2020) Automatic detection of coronavirus disease (covid-19) using x-ray images and deep convolutional neural networks. arXiv preprint arXiv:2003.10849

  6. Apostolopoulos ID, Mpesiana TA (2020) Covid-19: automatic detection from x-ray images utilizing transfer learning with convolutional neural networks. Physical and Engineering Sciences in Medicine, 1

  7. Ghoshal B, Tucker A (2020) Estimating uncertainty and interpretability in deep learning for coronavirus (COVID-19) detection. arXiv preprint arXiv:2003.10769

  8. Ucar F, Korkmaz D (2020) COVIDiagnosis-net: deep Bayes-SqueezeNet based diagnostic of the coronavirus disease 2019 (COVID-19) from X-ray images. Medical Hypotheses, 109761

  9. Li L et al (2020) Artificial intelligence distinguishes covid-19 from community acquired pneumonia on chest ct. Radiology, 200905

  10. Song Y et al (2020) Deep learning enables accurate diagnosis of novel coronavirus (COVID-19) with CT images. medRxiv

  11. Tang Z et al (2020) Severity assessment of coronavirus disease 2019 (COVID-19) using quantitative features from chest CT images. arXiv preprint arXiv:2003.11988

  12. Chen J et al (2020) Deep learning-based model for detecting 2019 novel coronavirus pneumonia on high-resolution computed tomography: a prospective study. medRxiv

  13. Krizhevsky A, Sutskever I, Hinton GE (2012) Imagenet classification with deep convolutional neural networks, In Advances in neural information processing systems, 1097–1105

  14. Turkoglu M, Hanbay D (2019) Plant disease and pest detection using deep learning-based features. Turk J Electr Eng Comput Sci 27(3):1636–1651

    Article  Google Scholar 

  15. Tuncer SA, Akılotu B, Toraman S (2019) A deep learning-based decision support system for diagnosis of OSAS using PTT signals. Med Hypotheses 127:15–22

    Article  Google Scholar 

  16. Turkoglu M, Hanbay D, Sengur A (2019) Multi-model LSTM-based convolutional neural networks for detection of apple diseases and pests. Journal of Ambient Intelligence and Humanized Computing, 1-11

  17. Turkoglu M (2019) Image Processing Based Plant Species and Diseases Recognition. Ph.D. Thesis, Inonu University, Turkey

  18. Kira K, Rendell LA (1992) A practical approach to feature selection. In Machine Learning Proceedings (pp. 249-256), Morgan Kaufmann

  19. Urbanowicz RJ, Meeker M, La Cava W, Olson RS, Moore JH (2018) Relief based feature selection: introduction and review. J Biomed Inform 85:189–203

    Article  Google Scholar 

  20. Sun Y, Wu D (2008) A relief based feature extraction algorithm. In proceedings of the 2008 SIAM International Conference on Data Mining, Society for Industrial and Applied Mathematics, (pp. 188-195)

  21. Cortes C, Vapnik V (1995) Support-vector networks. Mach Learn 20(3):273–297

    MATH  Google Scholar 

  22. Osowski S, Siwek K, Markiewicz T (2004) MLP and SVM networks-a comparative study. In proceedings of the 6th Nordic Signal Processing Symposium, NORSIG 2004. (pp. 37-40). IEEE

  23. Bogawar PS, Bhoyar KK (2018) An improved multiclass support vector machine classifier using reduced hyper-plane with skewed binary tree. Appl Intell 48(11):4382–4391

    Article  Google Scholar 

  24. Zidi S, Moulahi T, Alaya B (2017) Fault detection in wireless sensor networks through SVM classifier. IEEE Sensors J 18(1):340–347

    Article  Google Scholar 

  25. Gunn SR (1998) Support vector machines for classification and regression. ISIS Tech Rep 14(1):5–16

    Google Scholar 

  26. Yabanova I, Yumurtaci M (2018) Classification of dynamic egg weight using support vector machine. J Fac Eng Archit Gazi Univ 33(2):393–401

    Google Scholar 

  27. Kavzoğlu T, Çölkesen İ (2010) Destek vektör makineleri ile uydu görüntülerinin sınıflandırılmasında kernel fonksiyonlarının etkilerinin incelenmesi. Harita Dergisi 144(7):73–82

    Google Scholar 

  28. Sun L, Bao J, Chen Y, Yang M (2018) Research on parameter selection method for support vector machines. Appl Intell 48(2):331–342

    Article  Google Scholar 

  29. Simonyan K, Zisserman A (2014) Very deep convolutional networks for large-scale image recognition, In ICLR

  30. Landola FN, Han S, Moskewicz MW, Ashraf K, Dally WJ, Keutzer K (2016) Squeezenet: Alexnet-level accuracy with 50x fewer parameters and 0.5 mb model size, In ICLR

  31. Szegedy C, Liu W, Jia Y, Sermanet P, Reed S, et al. (2015) Going deeper with convolutions, In: Proceedings of the IEEE conference on computer vision and pattern recognition, Boston, MA, USA, pp.1–9

  32. Szegedy C, Vanhoucke V, Ioffe S, Shlens J, Wojna Z (2016) Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp.2818-2826

  33. He K, Zhang X, Ren S. Sun J (2016) Deep residual learning for image recognition, In: Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), Las Vegas, USA, (2016), pp.770–778

  34. Afshar P, Heidarian S, Naderkhani F, Oikonomou A, Plataniotis KN, Mohammadi A (2020) Covid-caps: a capsule network-based framework for identification of covid-19 cases from x-ray images. arXiv preprint arXiv:2004.02696

  35. Farooq M, Hafeez A (2020) Covid-resnet: a deep learning framework for screening of covid19 from radiographs. arXiv preprint arXiv:2003.14395

  36. Chowdhury ME et al (2020) Can AI help in screening viral and COVID-19 pneumonia?. arXiv preprint arXiv:2003.13145

  37. Li T, Han Z, Wei B, Zheng Y, Hong Y, Cong J (2020) Robust Screening of COVID-19 from Chest X-ray via Discriminative Cost-Sensitive Learning. arXiv preprint arXiv:2004.12592

  38. Hemdan EED, Shouman MA, Karar ME (2020) Covidx-net: a framework of deep learning classifiers to diagnose covid-19 in x-ray images. arXiv preprint arXiv:2003.11055

  39. Sethy PK, Behera, SK (2020) Detection of coronavirus disease (covid-19) based on deep features. Preprints, 2020030300, 2020

  40. Toğaçar M, Ergen B, Cömert Z (2020) Waste classification using AutoEncoder network with integrated feature selection method in convolutional neural network models. Measurement 153:107459

    Article  Google Scholar 

  41. Sethy PK, Behera, SK (2020) Detection of coronavirus disease (covid-19) based on deep features. Preprints, 2020030300

  42. Shukla P, Gupta T, Singh P, Raman B (2020) CARTOONNET: Caricature Recognition of Public Figures. In Proceedings of 3rd International Conference on Computer Vision and Image Processing (pp. 1-10). Springer, Singapore

  43. Fe Z, Yang E, Li DDU, Butler S, Ijomah W, Li X, Zhou H (2020) Deep convolution network based emotion analysis towards mental health care. Neurocomputing 388:212–227

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Muammer Turkoglu.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Turkoglu, M. COVIDetectioNet: COVID-19 diagnosis system based on X-ray images using features selected from pre-learned deep features ensemble. Appl Intell 51, 1213–1226 (2021).

Download citation

  • Published:

  • Issue Date:

  • DOI:


  • COVID-19 diagnosis
  • Relief algorithm
  • SVM
  • Pre-learned features
  • CNN