key: cord-0593383-q6tjirje authors: Khan, Asif Iqbal; Shah, Junaid Latief; Bhat, Mudasir title: CoroNet: A Deep Neural Network for Detection and Diagnosis of Covid-19 from Chest X-ray Images date: 2020-04-10 journal: nan DOI: nan sha: 3a9b2a9a8127281b86e27ffd75170b93361fa78f doc_id: 593383 cord_uid: q6tjirje The novel Coronavirus also called Covid-19 originated in Wuhan, China in December 2019 and has now spread across the world. It has so far infected around 1.8 million people and claimed approximately 114698 lives overall. As the number of cases are rapidly increasing, most of the countries are facing shortage of testing kits and resources. The limited quantity of testing kits and increasing number of daily cases encouraged us to come up with a Deep Learning model that can aid radiologists and clinicians in detecting Covid-19 cases using chest X-rays. Therefore, in this study, we propose CoroNet, a Deep Convolutional Neural Network model to automatically detect Covid-19 infection from chest X-ray images. The deep model called CoroNet has been trained and tested on a dataset prepared by collecting Covid-19 and other chest pneumonia X-ray images from two different publically available databases. The experimental results show that our proposed model achieved an overall accuracy of 89.5%, and more importantly the precision and recall rate for Covid-19 cases are 97% and 100%. The preliminary results of this study look promising which can be further improved as more training data becomes available. Overall, the proposed model substantially advances the current radiology based methodology and during Covid-19 pandemic, it can be very helpful tool for clinical practitioners and radiologists to aid them in diagnosis, quantification and follow-up of Covid-19 cases. The 2019 novel Coronavirus or Covid-19 is a pandemic which was first reported in Wuhan, China in December 2019. A new virus which belongs to the family of viruses "Coronavirus" (CoV) was called "Severe Acute Respiratory Syndrome Coronavirus 2" (SARS-CoV-2) before it was named Covid-19 by World Health Organization (WHO) in February 2020. Covid-19 is contagious and spreads through respiratory transmission when an infected person coughs or sneezes. It can also spread when a person touches virus exposed surface or object and then touches his eyes, nose, or mouth. Due to its contagious nature, the virus spreads rapidly and infected around 60000 people 19,899 deaths respectively [2] . The country wise (Top 10) distribution of Covid-19 cases (as on 12 April 2020) is shown in Table I and the plot of daily cases is shown in Figure 1 . Once infected, a Covid-19 patient may develop various symptoms and signs of infection which include fever, cough and respiratory illness (like flu). In severe cases, the infection may cause pneumonia, difficulty breathing, multi-organ failure and death [2] [3]. Due to the rapid and increasing growth rate of the Covid-19 cases, the health system of many advanced countries has come to the point of collapse. They are now facing shortage of ventilators and testing kits. Many countries have declared total lockdown and asked its population to stay indoors and strictly avoid gatherings. A critical and important step in fighting COVID-19 is effective screening of infected patients, such that positive patients can be isolated and treated. Currently, the main screening method used for detecting COVID-19 is real-time reverse transcription polymerase chain reaction (rRT-PCR) [4] [5]. The test is done on respiratory samples of the patient and the results can be available within few hours to 2 days. An alternate method to PCR screening method can be based on chest radiography images. Various research articles published in Radiology journal [6] [7] indicate that that chest scans might be useful in detecting COVID-19. Researchers found that the lungs of patients with COVID-19 symptoms have some visual marks like ground-glass opacities-hazy We collected a total of 1300 images from these two sources. We then resized all the images to the dimension of 224 x 224 pixels with a resolution of 72 dpi. Table II below shows the summary of the prepared dataset. The prepared dataset was then split into train and validation sets comprising of 80% and 20% of total data respectively. Figure 2 below shows some examples of chest x-ray images from the prepared dataset and Figure 3 shows the distribution of dataset for training and testing. In this section, we will discuss the work methodology for the proposed technique, model architecture, implementation and training. The work methodology is also illustrated in Figure 4 . Convolutional Neural Network also known as CNN is a deep learning technique that consists of multiple layers stacked together which uses local connections known as local receptive field and weight-sharing for better performance and efficiency. The deep architecture helps these networks Where I is the input matrix (image), K is the 2D filter of size m x n and F represents the output 2D feature map. Here the input I is convolved with the filter K and produces the feature map F. This convolution operation is denoted by I*K. The output of each convolutional layer is fed to an activation function. Activation function that takes the feature map produced by the convolutional layer and generates the activation map as its output. Activation function are used to introduces non-linearity to the network i: e it transforms the linear output from convolution operation into non-linear one. Some activation functions even have squashing effect which takes an input (a number), performs some mathematical operation on it and outputs the activation level of a neuron between a given range e.g. 0 to 1 or -1 to 1. There are number of activation functions available but the one which is recognized for deep learning is Rectified Linear Unit (ReLU). ReLU simply computes the activation by thresholding the input at zero. In other words, ReLU outputs 0 if the input is less than 0, and raw output otherwise. It is mathematically given as: Rectified linear unit activation function produces a graph which is zero when x < 0 and linear with slope 1 when x > 0. In CNN, the sequence of convolution layer is followed by an optional pooling or down The task of Convolution and pooling layers is to detect features from the input. Next step is to make a decision based on these detected features. In case of classification problem, the task is to compute the class scores. This is done by adding one or more fully connected layers at the end. In fully connected layer each neuron from previous layer is connected to every neuron in the next layer and every value contributes in predicting how strongly a value matches a particular class. The output of last fully connected layer is then forwarded to an activation function which outputs the class scores. Softmax and Support Vector Machines (SVM) are the two main classifiers used in CNN. Softmax function which computes the probability distribution of the n output classes is given as Where x is the input vector and Z is the output vector. The sum of all outputs (Z) equals to 1. The proposed model CoroNet uses Softmax, to predict the class to which the input x-ray image belongs to. All the layers discussed above are stacked up to make a full CNN architecture. In addition to these main layers mentioned above, CNN may include optional layers like batch normalization layer to improve the training time and dropout layer to address the overfitting issue. CoroNet is a CNN architecture tailored for detection of Covid-19 infection from chest x-ray images. It is based on Xception CNN architecture [19] . Table III . To initialize the model parameters, we used Transfer Learning to overcome the problem of overfitting as the training data was not sufficient. The Figure 5 . The experimental result of the proposed model on the prepared dataset is presented in the form of confusion matrix in Table IV . The overall accuracy, class-wise precision, recall and F-measure computed by formulae given below are summarized in Table V . . using chest x-ray images and, as more data becomes available, the performance can be further improved. and tested on a small dataset of few hundred images prepared by obtaining chest x-ray images of various pneumonia cases and covid-19 cases from different publically available databases. CoroNet is computationally less expensive and achieved promising results on the prepared dataset. The performance can further be improved once more training data becomes available. Notwithstanding the encouraging results, CoroNet still needs clinical study and testing but with higher accuracy and sensitivity for Covid-19 cases, CoroNet can still be beneficial for radiologists and health experts to gain deeper understandings into critical aspects associated with COVID-19 cases. Funding Sources: This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. Coronavirus: covid-19 has killed more people than SARS and MERS combined, despite lower case fatality rate Detection of SARS-CoV-2 in different types of clinical specimens Chest CT findings in coronavirus disease-19 (COVID-19): relationship to duration of infection Chest CT for typical 2019-nCoV pneumonia: relationship to negative RT-PCR testing Sensitivity of Chest CT for COVID-19: Comparison to RT-PCR Chest CT for typical 2019-nCoV pneumonia: relationship to negative RT-PCR testing A Tailored Deep Convolutional Neural Network Design for Detection of COVID-19 Cases from Chest Radiography Images Automatic Detection of Coronavirus Disease (COVID-19) Using Xray Images and Deep Convolutional Neural Networks Deep learning in medical image analysis. Annual review of biomedical engineering Radiologist-level pneumonia detection on chest x-rays with deep learning A deep neural network for classification of thoracic diseases on chest radiography COVID-19 image data collection Deep learning for content-based image retrieval: A comprehensive study Advances in Deep Learning Xception: Deep learning with depthwise separable convolutions Rethinking the inception architecture for computer vision