key: cord-0169724-skv6f4be authors: Sharifrazi, Danial; Alizadehsani, Roohallah; Roshanzamir, Mohamad; Joloudari, Javad Hassannataj; Shoeibi, Afshin; Jafari, Mahboobeh; Hussain, Sadiq; Sani, Zahra Alizadeh; Hasanzadeh, Fereshteh; Khozeimeh, Fahime; Khosravi, Abbas; Nahavandi, Saeid; Panahiazar, Maryam; Zare, Assef; Islam, Sheikh Mohammed Shariful; Acharya, U Rajendra title: Fusion of convolution neural network, support vector machine and Sobel filter for accurate detection of COVID-19 patients using X-ray images date: 2021-02-13 journal: nan DOI: nan sha: 40fc2fd33b92228c2e69db5f6d7fd18e3c276e02 doc_id: 169724 cord_uid: skv6f4be 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 filtering (CNN-SVM+Sobel) achieved the highest classification accuracy of 99.02% in accurate 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 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. Table 1 : Summary of works done on automated detection of COVID-19 using DL techniques with X-ray and CT images. Wang et al. [14] X-ray 13,975 images Deep CNN Hall et al. [15] X-ray 455 images VGG-16 and ResNet-50 Farooq et al. [16] X-ray 5941 images ResNet-50 Hemdan et al. [18] X-ray 50 images DesnseNet, VGG16, MobileNet v2.0 etc. Abbas et al. [19] X-ray 196 images CNN with transfer learning Minaee et al. [20] X-ray 5000 images DenseNet-121, SqueezeNet, ResNet50, ResNet18 Zhang et al. [21] X-ray 213 images ResNet, EfficientNet Apostolopoulos et al. [23] X-ray 3905 images MobileNet v2.0 Narin et al. [24] X-ray 100 images InceptionResNetV2, InceptionV3, ResNet50 Luz et al. [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. 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. Khan et al. [35] X-ray 1251 images CNN Haghanifar et al. [37] X-ray 7,700 images DenseNet-121 U-Net Oh et al. [38] X-ray 502 images DenseNet U-Net Tartaglione et al. [39] X-ray 5 different databases ResNet Rahimzadeh et al. [40] X-ray 11302 images Xception and ResNet50V2 Jamil et al. [41] X-ray 14150 images Deep CNN Horry et al. [42] X-ray 60,798 images VGG, Inception, Xception, and Resnet Elasnaoui et al. [43] X-ray And CT Ardakani et al. [44] CT 1020 ResNet-101, ResNet-50, ResNet-18, GoogleNet, SqueezeNet, VGG-19, AlexNet This paper is organized as follows. The computer aided diagnosis (CAD) based on the proposed deep learning to detect COVID-19 is described in Section 2. The results obtained is presented and discussed in Section 3. Finally, the paper concludes with brief summary in Section 4. 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. 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 . They show the typical X-ray images of normal and COVID-19 patients. a b Figure 2 . Sample X-ray images: a) healthy subjects and b) COVID-19 patients. 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 . Figure 3 : Proposed CNN architecture for the automated detection of COVID-19 patients using X-ray images. In this study, to evaluate the performance of proposed methods, various evaluation metrics have been used and they are given below: 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. Table 6 . Comparison of proposed CNN-SVM+Sobel method using private database with other methods in detecting COVID-19 using X-ray images from different private databases. 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). Clinical characteristics of 138 hospitalized patients with 2019 novel coronavirus-infected pneumonia in Epidemiological and clinical characteristics of 99 cases of 2019 novel coronavirus pneumonia in Wuhan, China: a descriptive study Risk Factors Prediction, Clinical Outcomes, and Mortality of COVID-19 Patients, medRxiv Epidemiological and clinical characteristics of 99 cases of 2019 novel coronavirus pneumonia in Wuhan, China: a descriptive study Clinical Characteristics of 138 Hospitalized Patients With 2019 Novel Coronavirus-Infected Pneumonia in Early Transmission Dynamics in Wuhan, China, of Novel Coronavirus-Infected Pneumonia First Case of 2019 Novel Coronavirus in the United States A deep learning algorithm using CT images to screen for Corona Virus Disease (COVID-19) Sensitivity of Chest CT for COVID-19: Comparison to RT-PCR Precise diagnosis of intracranial hemorrhage and subtypes using a three-dimensional joint convolutional and recurrent neural network Visualization and interpretation of convolutional neural network predictions in detecting pneumonia in pediatric chest radiographs Estimating uncertainty and interpretability in deep learning for coronavirus (COVID-19) detection Towards an efficient deep learning model for covid-19 patterns detection in X-rayimages Lung Pattern Classification for Interstitial Lung Diseases Using a Deep Convolutional Neural Network Finding covid-19 from chest x-rays using deep learning on a small database Covid-resnet: A deep learning framework for screening of covid19 from radiographs Can AI help in screening viral and COVID-19 pneumonia?, arXiv preprint Covidx-net: A framework of deep learning classifiers to diagnose covid-19 in X-rayimages Classification of COVID-19 in chest X-rayimages using DeTraC deep convolutional neural network Deep-covid: Predicting covid-19 from chest X-rayimages using deep transfer learning Covid-19 screening on chest X-rayimages using deep learning based anomaly detection COVID-Net: A Tailored Deep Convolutional Neural Network Design for Detection of COVID-19 Cases from Chest X-rayImages Covid-19: automatic detection from X-rayimages utilizing transfer learning with convolutional neural networks Automatic detection of coronavirus disease (covid-19) using X-rayimages and deep convolutional neural networks Automated Detection and Forecasting of COVID-19 using Rapid ai development cycle for the coronavirus (covid-19) pandemic: Initial results for automated detection & patient monitoring using deep learning ct image analysis Handling of uncertainty in medical data using machine learning and probability theory techniques: A review of 30 years Automatic Myocarditis Diagnosis using Convolutional Neural Network Combined with K-means Clustering A comprehensive comparison of handcrafted features and convolutional autoencoders for epileptic seizures detection in EEG signals Deep Learning for Neuroimaging-based Diagnosis and Rehabilitation of Autism Spectrum Disorder: A Review Epileptic seizure detection using deep learning techniques: A Review A database for using machine learning and data mining techniques for coronary artery disease diagnosis Explainable deep learning for pulmonary disease and coronavirus COVID-19 detection from X-rays Automated detection of COVID-19 cases using deep neural networks with X-rayimages Coronet: A deep neural network for detection and diagnosis of COVID-19 from chest X-rayimages Efficient Deep Learning Model for COVID-19 Detection in large CT images databases: A cross-database analysis Detecting COVID-19 in Frontal Chest X-rayImages using Deep Learning Deep Learning COVID-19 Features on CXR Using Limited Training Data Sets Unveiling COVID-19 from Chest Xraywith deep learning: a hurdles race with small data A New Modified Deep Convolutional Neural Network for Detecting COVID-19 from X-rayImages Automatic Detection of COVID-19 Infection from Chest X-rayusing Deep Learning, medRxiv X-rayImage based COVID-19 Detection using Pre-trained Deep Learning Models Using X-rayimages and deep learning for automated detection of coronavirus disease Application of deep learning technique to manage COVID-19 in routine clinical practice using CT images: Results of 10 convolutional neural networks Automated Detection and Forecasting of COVID-19 using Deep Learning Techniques: A Review Augmented COVID-19 X-rayImages Database Automated Systems for Detection of COVID-19 Using Chest X-rayImages and Lightweight Convolutional Neural Networks COVID-19 Detection from X-rayImages Using Different Artificial Intelligence Hybrid Models Augmented COVID-19 X-rayImages Database (Mendely) Analysis using Convolutional Neural Network and Transfer Learning Patient Health Prediction Using Boosted Random Forest Algorithm, Frontiers in public health Hall et al. [15] 455 images VGG- 16 Figure 16 shows the performance obtained using different proposed methods with our private database for automated detection of COVID-19 patients using X-ray images. Figure 17 shows the performance obtained using various proposed methods with augmented COVID-19 X-ray images database for COVID-19 diagnosis. Figures 16 and 17 clearly show that our proposed CNN-SVM+Sobel model has performed better than rest of the methods on our database and augmented COVID-19 X-ray images database respectively. Our proposed method has performed better even using six public databases.Advantages of our proposed method are as follows:1. We collected a new database to validate our developed model. Our proposed method is also tested on six public databases and showed excellent performance. 3. Data augmentation is used to enable it works with small databases. 4. Sobel filter is used to improve the performance of our methodLimitations of our proposed method are as follows:1. Computational cost of different deep learning algorithm is high. 2. Limitation of input data is another weakness of our algorithm.