Detection and differentiation of COVID-19 using deep learning approach fed by x-rays

The coronavirus, which appeared in China in late 2019, spread over the world and became an epidemic. Although the mortality rate is not very high, it has hampered the lives of people around the world due to the high rate of spread. Moreover, compared to other individuals in the society, the mortality rate in elderly individuals and people with chronic disease is high. The early detection of infected individuals is one of the most effective ways to both fight disease and slow the outbreak. In this study, a deep learning approach, which is alternative and supportive of traditional diagnostic tools and fed with chest x-rays, has been developed. The purpose of this deep learning approach, which has the convolutional neural networks (CNNs) architecture, is (1) to diagnose pneumonia caused by a coronavirus, (2) to find out if a patient with symptoms of pneumonia on chest X-ray is caused by bacteria or coronavirus. For this purpose, a new database has been brought together from various publicly available sources. This dataset includes 50 chest X-rays from people diagnosed with pneumonia caused by a coronavirus, 50 chest X-rays from healthy individuals belonging to the control group, and 50 chest X-rays from people diagnosed with bacterium from pneumonia. Our approach succeeded in terms of accuracy of 92% for corona virus-based pneumonia diagnosis tasks (1) and 81% for the task of finding the origin of pneumonia (2). Besides, achievements for Area Under the ROC Curve (ROC_AUC), Precision, Recall, F1-score, Specificity, and Negative Predictive Value (NPV) metrics are specified in this paper.


Introduction
People have been dealing with various outbreaks for years and millions of people have died due to these outbreaks. An outbreak caused by Corona Virus Disease 2019 , that started in China in late 2019 was declared by the World Health Organization (WHO) as a worldwide pandemic in the middle of 2020 [1][2][3]. COVID-19 has influenced over 13,500,000 human being all over the world and caused over 600.000 deceases, by July in 2020. Thus, COVID-19 has become the focus of scientists around the world. Since the COVID-19 has just appeared on humanity, there is not 100% reliable vaccine, drug, and test against this disease in the literature.
During the outbreak, the most common test technique used for the diagnosis of COVID-19 is a real-time reverse transcription-polymerase chain reaction (RT-PCR) [4][5][6][7]. However, it is a disadvantage that the sample, required for the RT-PCR test, is taken from the region where no virus is found by chance. Moreover, the RT-PCR test lasts for hours, and intense demand cannot fully meet [4,8,9].
One of the limited information we have about this disease is that in some cases, the disease causes pneumonia. Pneumonia is essentially an inflammation of air vesicles, which is a region where oxygen enters the body. Often the causes are bacteria and viruses, but it can also be seen as a side effect of some medications. Some concomitant rheumatic diseases can lead to this condition. The use of cortisone-derived drugs used in the treatment of various diseases, especially rheumatism, facilitates the development of pneumonia. Pneumonia can be diagnosed by X-ray imaging [10][11][12].
The X-ray may have a vital role to support the RT-PCR test and find out if the COVID-19 suspect is suffering from pneumonia. It can be used for early diagnosis of this disease. The findings obtained by chest X-ray can be used for the diagnosis of COVID-19. This approach has limitations just like the other one. It is difficult to understand whether pneumonia originates from corona or bacteria [13,14].
In this study, our objective is (1) to develop an approach using chest X-rays that can be used to diagnose COVID-19 and/or support RT-PCR testing, (2) to find out if a patient with symptoms of pneumonia on chest Xray is caused by bacteria or COVID-19.
This paper is organized as follows. Section 2 presents several recent studies in COVID-19. Section 3 describes the Methods which includes: General Framework, and Convolutional Neural Networks (CNNs). Section 4 describes the details of the experiments and its Results which include: Data Set, Experimental Setup, Performance Evaluation, and Empirical Results. In Section 5 and 6, Discussion and Conclusion are presented respectively.

Related Work
Sethy and Behera [15] classified the options that collected from varied CNNs with support vector machine (SVM) classifier mistreatment X-ray pictures. Their study states that the ResNet50 model with the SVM classifier provided the most effective performance. Xu, et. al. [16] aimed to utilize deep learning algorithms for 618 individuals within the classification of CT scan images, in 3 labels: corona, viral-pneumonia that originates flu A and healthy individuals. As a result of these studies, they achieved 0.86 accuracies. Wang et. Al [17] aimed to get a high-performance COVID-19 diagnosing system by training a lung segmentation network exploitation ground-truth masks obtained via associate unsupervised methodology and coming up with an efficient light-weight 3D residual network (ResNet) with a progressive classifier for COVID-19 classification and weakly-supervised lesion localization. Wang, Shuai, et. al. [6] have used profound learning strategies to get rid of graphic features from CT scan images for providing pre-diagnosis to the medical doctor before the infective examination. They reached 89.5% accuracy and 87% sensitivity, however once applied to the external dataset, the accuracy of their algorithmic rule was 79.3%.
Hemdan et al. [18] proposed a deep learning approach to diagnose COVID-19 in X-ray chest images and projected a COVIDX-Net model comprising 7 CNN models. Ioannis et al. [19] developed the deep learning model exploitation 224 confirmed COVID-19 images.
Their model reached 98.75% and 93.48% success rates for 2 and 3 categories, severally. Narin et al. [20] proposed a method to detect mistreatment X-ray chest images containing the ResNet50 model.

General Overview
Chest X-rays are ideal for CNN, one of the deep learning models, as it may be considered as 2D images. Moreover, differential diagnosis problem is considered as a supervised classification task where these X-ray images are fed into a CNN classifier. To find a solution to this problem, the X-ray images were rescaled as 224 * 224 and then classified with a deep learning algorithm developed on the AlexNet architecture. Figure 1 visualized the general overview of this study mentioned above.

Convolutional Neural Networks
CNN used in many computer vision fields, especially in classification, contain convolution, pooling, and fully connected layers unlike conventional neural networks [21,22].
The convolution starts at the top left and takes a small filter window with a certain width and height and performs an operation on it, the process is usually the matrix multiplication, which is decided by the gradient descent to achieve the best final result. This process continues sequentially until entirely throughout the image and creates a new image.
An issue of the feature map output of convolutional layers is that they file every single function of aspects in the input. A common method for addressing this hassle is referred to as down sampling. can be accomplished with Pooling Layer. Pooling can be processed according to the maximum, minimum, or average principles.
After some convolution and pooling process, the final output is passed through a fully connected layer, a conventional feed-forward neural network, to produce a result.

Dataset
In this research, numerous publicly available datasets of X-ray images that belongs chest had been used. The chest X-ray images had accrued from different sources; such as Cohen dataset (https://github.com/ieee8023/covid-chestxray-dataset), Italian Society of Medical and Interventional Radiology (SIRM) website, Radiopaedia and Radiological Society of North America (RSNA) and have combined them as a new dataset. In this dataset, there are 3 different classes: control, COVID-19 based pneumonia, and bacteria-based pneumonia. In Fig. 2, an example is given to the healthy individual belonging to the control group, corona patient with COVID-19 positive label, and bacteria-borne pneumonia patient classes. Moreover, there are 50 different chest X-ray images in each class. The original data can be downloaded from https://www.kaggle.com/cagataybrk/covid19.

Experimental Setup
CNN, or ConvNet is a specific type of multi-layer neural networks, designed to understand patterns besides lengthening from pixels with minimal pre-processing. In this study, the results had been acquired by leaning the AlexNet architecture [23], which is a CNN type whose reliability has been proven by various studies, in the literature. AlexNet is one of the most popular neural network architectures to date. It used to be proposed by Alex Krizhevsky for the ImageNet Large Scale Visual Recognition Challenge. The AlexNet architecture is comprised of eight layers in total, out of which the first five are convolutional layers and the last two layers before the softmax layer are fully-connected. The first two convolutional layers are linked to overlapping maxpooling (MXP) layers to extract a maximum wide variety of Features by using Local Response Normalization (LRN). The third, fourth, and fifth convolutional layers are at once related to the fully-connected (FC) layers. All the outputs of the convolutional and fully-connected layers are related to ReLU non-linear activation function. The ultimate output layer is linked to a softmax activation layer, which produces a distribution of labels. ReLU nonlinearity is utilized after all the convolution and entirely associated layers. The ReLU nonlinearity of the first and second convolution layers is followed by the usage of a nearby normalization step before doing Pooling. Figure 3 demonstrates the AlexNet CNN architecture that has been used. In the training process, Adam Optimizer was utilized. The process was terminated after 50 epochs. For each training iteration, the mini-batch size was selected as 32 and the learning rate was selected as 0.001. Before each epoch, the training data was shuffled.

Evaluation
All experiments were carried out using 10-fold crossvalidation. In this approach, the dataset is divided into 10 equal parts randomly and homogeneously. Each part is used for sequential testing, while the remaining parts are used for training. This process continues until each part is used for testing. Thus each part is used for both testing and training.
To verify the overall performance of this study, Accuracy (1) where TP, FP, TN, and FN refer to a number of true positives, false positives, true negatives, and false negatives respectively.
Moreover, the Area under the ROC curve and the Confusion Matrix from the test results were given.

Empirical Results
To detect COVID-19, the system is designed to predict illness labels (COVID-19 positive or not) regardless of participants. Table I shows the results obtained with performance metrics derived from estimates obtained with 10-fold cross-validation. To confirm our study's achievement Table II includes the confusion matrix. In Table II, 0 is represented for healthy subjects while 1 is represented for COVID-19. To find out what pneumonia's origin (COVID-19 or Bacteria), the system was designed to predict originate label regardless of participants. Table III showed the results obtained with performance metrics derived from estimates obtained with 10-fold cross-validation. To confirm our study's achievement Table IIV includes the confusion matrix. In Table IIIV, 0 is represented for Bacteria pneumonia subjects while 1 is represented for COVID-19 pneumonia.

Conclusions and Discussion
Early diagnosis of patients infected with the COVID-19 virus, and thus early treatment, is important for preventing the spread of the disease and overcoming the disease. In this study, an AlexNet CNN-based Deep Learning model was proposed, which automatically separates COVID-19 patients from normal patients by using chest X-ray images. Moreover, an approach has been developed to determine whether X-ray findings of people diagnosed with pneumonia are related to Bacteria or COVID-19. The proposed technique achieved an accuracy of 92.0% for detecting COVID-19 samples from normal ones and an accuracy of 81.0% for differentiating whether the source of the pneumonia is bacteria or COVID-19 virus.
Considering the results obtained by classification of chest X-ray images with deep learning algorithms, it has been proved that chest X-ray images can be used as an alternative to PCR tests to detect and differentiate COVID-19. Although the obtained results are promising, both the related publication and data/dataset deficiencies slow down further studies in this new field. Scientifically more reliable and effective studies will be published faster with this study and similar pioneering studies. In future studies, by using relatively more chest X-ray images to be obtained from the literature and by obtaining synthetic images from these images, it will be tried to obtain precise and accurate results for the related problem.

Author's Note
Abstract version of this paper was presented at 9th International Conference on Advanced Technologies (ICAT'20), 10-12 August 2020, Istanbul, Turkey with the title of "Detection and Differentiation of Covid 19 Using Deep Learning Approach Fed by X-Rays".