Fusion of convolution neural network, support vector machine and Sobel filter for accurate detection of COVID-19 patients using X-ray images

The coronavirus (COVID-19) is currently the most common contagious disease which is prevalent all over the world. The main challenge of this disease is the primary diagnosis to prevent secondary infections and its spread from one person to another. Therefore, it is essential to use an automatic diagnosis system along with clinical procedures for the rapid diagnosis of COVID-19 to prevent its spread. Artificial intelligence techniques using computed tomography (CT) images of the lungs and chest radiography have the potential to obtain high diagnostic performance for Covid-19 diagnosis. In this study, a fusion of convolutional neural network (CNN), support vector machine (SVM), and Sobel filter is proposed to detect COVID-19 using X-ray images. A new X-ray image dataset was collected and subjected to high pass filter using a Sobel filter to obtain the edges of the images. Then these images are fed to CNN deep learning model followed by SVM classifier with ten-fold cross validation strategy. This method is designed so that it can learn with not many data. Our results show that the proposed CNN-SVM with Sobel filter (CNN-SVM + Sobel) achieved the highest classification accuracy, sensitivity and specificity of 99.02%, 100% and 95.23%, respectively in automated detection of COVID-19. It showed that using Sobel filter can improve the performance of CNN. Unlike most of the other researches, this method does not use a pre-trained network. We have also validated our developed model using six public databases and obtained the highest performance. Hence, our developed model is ready for clinical application.


Introduction
Coronavirus disease 2019 (COVID-19) has been spreading unprecedentedly across the globe from the beginning of 2020.The clinical characteristics of COVID-19 include respiratory symptoms, fever, cough, dyspnea, pneumonia, and fatigue during early stages [1], [2], [3].The COVID-19 also affects the cardiovascular and respiratory systems and may lead to multiple organ failure or acute respiratory distress in critical cases and is highly contagious [3][4][5][6][7].Therefore, COVID-19 infections are a crucial healthcare challenge around the world and has become a global threat [8].
The World Health Organization (WHO) declared the outbreak a "public health emergency of international concern" on 30 th January 2020.Reverse-transcription polymerase chain reaction (RT-PCR) is generally used to confirm the incidence of COVID-19.But the sensitivity of RT-PCR is not high enough for the early recognition of suspected patients [9].Recently, deep learning techniques have exhibited great success in the image processing domain, especially medical images, due to its potential of feature extraction [10].Deep learning is used to discriminate and detect viral and bacterial pneumonia in pediatric chest radiographs [11].Chest X-ray is found to be effective in the early diagnosis and screening of COVID-19 [12].This non-invasive imaging modality can help to detect specific characteristic manifestations in the lung related to the COVID-19.Hence, radiography examination may be utilized as a primary tool for COVID-19 screening in epidemic areas.Several imaging features can be extracted from the chest X-ray [13,14].In heavily-affected areas and resource-constrained areas, chest X-ray imaging can be beneficial for COVID-19 screening [15].There are various advantages related to this imaging modality, such as rapid triaging, availability, accessibility, and portability [15].It is cheap and can be made available in most of the clinical settings, even in low-income countries.One of the bottlenecks of the system is that expert radiologists are required to interpret the radiography images.As such, computer-aided diagnostic systems (CAD) can help the radiologists to detect COVID-19 cases accurately and rapidly.There are few deep learning-based techniques proposed for such automated detection using X-ray radiographs [15][16][17][18][19][20][21][22][23][24][25].
The main contributions of this work are listed as follows:  New private database collected by the authors is used. Data augmentation is performed. Proposed model is tested using six public databases and the results are found to be better than most of the existing state of the art methods. Sobel filter is found to improve the performance of CNN. Obtained highest classification performance for all databases.
Nowadays, machine learning (ML) methods are widely used for Covid-19.These methods can improve the diagnosis accuracy of clinicians.However, there are few limitations in these methods.For example, feature extraction is a challenging step in almost all ML methods.So, automatic feature extraction is a great improvement in this field.Among the different ML methods, deep learning (DL) can solve this challenge.It can do feature extraction automatically.In addition, when there are large amount of data, its performance is better than other ML methods.Consequently, nowadays DL is used to diagnose different diseases [26][27][28][29][30][31][32] such as COVID-19 [25].An overview of the works done on automated detection of COVID-19 using DL is presented in Table 1.In this table, the recently published DL works on COVID-19 detection using X-ray and CT scan images are listed.However, almost all of them used pre-trained networks using public databases.[13] X-ray 13, 800 images EfficientNet Brunese et al. [33] X-ray 6,523 images VGG-16 and transfer learning Ozturk et al. [34] X-ray Two publically available databases were used where images were updated regularly.

Darknet-19
Khan et al. [35] X-ray 1251 images CNN Silva et al. [36] CT scans 2482 images A slice voting-based approach extending the Efficient Net Family of deep artificial neural networks Luz et al. [13] X-ray 13, 800 images Efficient Net Ozturk et al. [34] X-ray Two publically available databases were used where images were updated regularly.

CADS Based COVID-19 Diagnosis Using 2D-CNN
Nowadays, many CAD systems have been developed using deep learning techniques to detect various diseases, including COVID-19, have attracted the attention of many researchers.The CAD based deep learning methods require huge database to yield highest performance.This paper proposes a novel 2D-CNN architecture to detect COVID-19 using X-ray images.The 2D-CNN with a number of convolutional layers, max-pooling, and fully connected (FC) layers are used.In our methodology, support vector machine (SVM) is used instead of the sigmoid activation function in fully connected layers to obtain highest classification performance.The proposed CAD system is shown in Figure 1.As shown in Figure 1, X-ray images are first applied to the network.Then, the data augmentation technique is adopted to prevent the overfitting and increase the number of input data.Then during pre-processing stage, image resizing and normalization of input images are done.Then the preprocessed images are fed to the convolutional layers of the proposed 2D-CNN network to extract the features.Then, the classification operation is accomplished by FC layers by two methods: (i) sigmoid and (ii) SVM separately.

X-ray database
In this study, 333 chest X-ray images comprising of 77 images of COVID-19 patients and 256 images of normal subjects were recorded at Omid Hospital in Tehran.They are collected from February 2020 to April 2020.The mean and standard deviation of their age are 49.5±18.5 years old.55% of cases are female.Three radiologists checked each image and determined whether a case has Covid-19 or not.Ethical approval of these data was also obtained.Some examples of these data can be seen in Figure 2.

CNN architecture
Nowadays, 2D-CNN networks are employed in many medical applications, including the diagnosis of COVID-19 using X-ray images [45].These deep learning networks consists of three main layers, convolutional layers, pooling, and fully connected (FC) layers [28].The convolutional layers are responsible for extracting features from images.Max-pooling layers are often applied to reduce the features in CNN architectures.The last part of 2D-CNN is FC, and in the previous layer, there is an activation function that is responsible for classification.Usually, the Softmax function is employed.The Sigmoid activation function has been proved to perform efficiently in binary classification problems in this deep learning architecture.The support vector machine (SVM) is another procedure that can be applied in 2D-CNN instead of Sigmoid to obtain favorable results.
In this work, at first, the number of data is increased using data augmentation algorithm.Data augmentation is done by using width shift range, height shift range, and rotation techniques.Using this method, the data is increased from 333 to 1332 images.Then, a 2D-CNN with sigmoid activation function is used to classify X-ray images.In addition, binary SVM is also used in the 2D-CNN network for classification.The hinge error function is used to obtain best results when using SVM in 2D-CNN.More details about the proposed 2D-CNN architecture is shown in Table 2 and Figure 3.

Performance measures
In this study, to evaluate the performance of proposed methods, various evaluation metrics have been used and they are given below:

Sensitivity = TP TP + FN
(2) F1 − Score = 2TP 2TP + FP + FN (4) In these equations, true positive (TP) is the correct classification of positive class.False-negative (FN) is the incorrect prediction of the positive case.True negative (TN) is the correct classification of the samples in the negative class.False-positive (FP) is the incorrect prediction of the negative case.In this work, positive class is symptom of COVID-19 and normal class is negative class.

Results and Discussion
In this section, the results of our proposed CNN-SVM and CNN-Sigmoid methods and its combination with Sobel filter are provided.All simulations are done using Keras library have been conducted with back-end TensorFlow.The COVID-19 X-ray images database is obtained from Omid Hospital, Tehran, Iran.In this work, total number of 1332 (total images number is 333, which is increased to 1332 after the data augmentation operation) images are used.The results are obtained in two modes: (i) CNN network with sigmoid output layer and (ii) CNN network with SVM output layer with 10-fold cross-validation strategy.
In order to validate the proposed method, we have tested with another public database named as augmented COVID-19 X-ray images database [46].The experiment results are presented in Figures 8 to 15       Tables 3 and 4 depict the results obtained using various combination of networks with private database and augmented COVID-19 X-ray images database, respectively.Table 3 clearly shows the effect of using sigmoid or SVM classifiers and Sobel Filter when we used in our proposed method with our database.Table 4 shows the evaluation performance measures obtained by applying different algorithms and combination of our methods using augmented COVID-19 X-ray images database.It can be noted from Tables 3 and 4 that Sobel operator improved the performance of CNN-Sigmoid and CNN-SVM approaches in detecting COVID-19 significantly.Table 4 shows the results of our proposed method and other works on augmented COVID-19 X-ray images database.For better comparison between the achieved results in Tables 3 and 4, the results are also illustrated in Figures 16 and 17.They show the impact of using Sobel filtering in our algorithms.As SVM is a more robust classifier, when it is used in our algorithms, the performance has improved.Our proposed method is also tested with six public databases to evaluate the performance of our developed model.The public database can be accessed from this link: https://www.kaggle.com[50][51][52][53][54][55].The details of the database and results obtained using our database are provided in Table 5.It can be noted from this table that using the Sobel filter can improve the performance of our algorithm.In all tests, using Sobel filter has a positive impact on the results.Also, CNN-SVM+Sobel performed better than others combinations.For all databases, CNN-Sigmoid+Sobel performed better than the rest of the combinations.Meanwhile, in Table 6, the results of the proposed method applied on our database are compared with other researches who used different databases.Accordingly, the performance of our proposed method is better than other researches.

Conclusion
COVID-19 is currently one of the most life-threatening diseases endangering the health of many people globally.One of the main features of this disease is its rapid prevalence among people in the community.In this work, we have developed a novel COVID-19 detection system using X-ray images.In this work, we have used 333 X-ray images (77 COVID-19 + 256 normal) from Omid Hospital, Tehran to develop the model.First the images are subjected to Sobel filter to obtain the contours of the images and then fed to CNN model followed by SVM classifier.Our method is able to detect the COVID-19 cases correctly with an accuracy of 99.02%.The developed model has also yielded highest detection accuracy using six public databases.Hence, this justifies that our developed model is robust and accurate.In future, we intend to use this model to detect other chest related diseases like cancer, pneumonia, cystic fibrosis, infection, and chronic obstructive pulmonary disease (COPD).

Figure 1 :
Figure 1: Proposed methodology used for the automated detection of COVID-19 patients using X-ray images.

Figure 3 :
Figure 3: Proposed CNN architecture for the automated detection of COVID-19 patients using X-ray images. .

Figure 8
Figure 8 illustrates the results obtained using private database with CNN-sigmoid method with 10-fold cross-validation.Figures 9 to 11, shows the private database results obtained by applying CNN-SVM, CNN-sigmoid with Sobel operator, and CNN-SVM with Sobel operator, respectively with 10-fold crossvalidation.

Figure 8 :Figure 9 :Figure 10 :
Figure 8: Performance metrics of CNN-sigmoid method using private database: (a) loss function curve, and b) accuracy curve with 10-fold cross-validation strategy.

Figure 11 :
Figure 11: Performance metrics of CNN-SVM with Sobel operator method using private database: (a) loss function curve, and b) accuracy curve with 10-fold cross-validation strategy.

Figure 14 :
Figure 14: Performance metrics of CNN-sigmoid method with Sobel operator using augmented COVID-19 X-ray images database: (a) loss function curve, and b) accuracy curve with 10-fold cross-validation strategy.

Figure 15 :
Figure 15: Performance metrics of CNN-SVM method with Sobel operator using augmented COVID-19 X-ray images database: (a) loss function curve, and b) accuracy curve with 10-fold cross-validation strategy.

Figure. 16 :
Figure.16: Performance obtained using different methods with our private database for COVID-19 diagnosis.

Table 1 :
Summary of works done on automated detection of COVID-19 using DL techniques with X-ray and CT images.

Table 2 :
Details of parameters used in the proposed CNN architecture.

Table 3 .
Various performance measures obtained using different combination of methods.

Table 4 .
Evaluation performance measures obtained by applying different algorithms and combination of our methods using augmented COVID-19 X-ray images database.

Table 5 :
Evaluation metrics obtained for our proposed method using different public databases.