Professional Documents
Culture Documents
v1
Keywords: deep learning; CNN; DenseNet; COVID-19; fight against this virus. Polymerase chain reaction (PCR) is
transfer learning the main method and gold standard for detecting COVID-19
cases which can detect SARS-CoV-2 RNA from respiratory
specimens (collected through a variety of means such as
Abstract—Coronavirus disease (COVID-19) is a pandemic nasopharyngeal or oropharyngeal swabs). [12] Though this
infectious disease that has a severe risk of spreading rapidly. method is the most effective one, it is very time consuming
The quick identification and isolation of the affected persons is
the very first step to fight against this virus. In this regard, and intensive lab work is required after the collection of the
chest radiology images have been proven to be an effective samples to get result.
screening approach of COVID-19 affected patients. A number Another approach is examination of chest radiography imag-
of AI based solutions have been developed to make the screening ing (e.g., Radiology or computed tomography (CT) imaging)
of radiological images faster and more accurate in detecting which can be conducted faster but expert analysis is needed
COVID-19. In this study, we are proposing a deep learning
based approach using Densenet-121 to effectively detect COVID- to interpret the subtle differences. To remove this bottleneck,
19 patients. We incorporated transfer learning technique to many AI based systems have been proposed to detect COVID-
leverage the information regarding radiology image learned by 19 from radiography images. Moreover, AI solutions are
another model (CheXNet) which was trained on a huge Radiology much faster than traditional system where radiologist need to
dataset of 112,120 images. We trained and tested our model examine the images by hand.
on COVIDx dataset containing 13,800 chest radiography images
across 13,725 patients. To check the robustness of our model, In our work, we have used Dense Convolutional Network
we performed both two-class and three-class classifications and (DenseNet) [6] of 121 layers as our model. DenseNet makes
achieved 96.49% and 93.71% accuracy respectively. To further the training of deep learning models tractable by removing
validate the consistency of our performance, we performed vanishing gradient problem, enhancing feature reuse, and
patient-wise k-fold cross-validation and achieved an average increasing parameter efficiency. It has achieved the state-of-
accuracy of 92.91% for three class task. Moreover, we performed
an interpretability analysis using Grad-CAM to highlight the the-art performance in several computer vision tasks. More-
most important image regions in making a prediction. Besides over, DenseNet has been used successfully in disease pre-
ensuring trustworthiness, this explainability can also provide new diction from Radiology images. In paper [10], DenseNet-
insights about the critical factors regarding COVID-19. Finally, 121 was used to detect 14 kinds of diseases from chest
we developed a website that takes chest radiology images as Radiology images (CheXNet) and better performance was
input and generates probabilities of the presence of COVID-19
or pneumonia and a heatmap highlighting the probable infected achieved than practicing academic radiologists. Paper [4] also
regions. Code and models’ weights are availabe. 1 used DenseNet-121 for disease prediction from Radiology
images of ChestRadiology-14 dataset and further improved
I. I NTRODUCTION the performance achieved by paper [10]. Motivated by the
Coronavirus disease (COVID-19) is a pandemic infectious excellent performance of DenseNet on Radiology images (e.g.
disease caused by severe acute respiratory syndrome coron- paper [10] and [4]), we used DenseNet-121 as our deep
avirus 2 (SARS-CoV-2) which is now a global issue as there learning model. Moreover, we initialized our model’s weights
are no specific vaccines or treatments for this. As it is able by the weights of CheXNet [10]. Our intuition of using this
to infect people easily and can spread from person-to-person transfer learning technique was utilization of the information
in an efficient and sustained way, the quick identification regarding Radiology images present in CheXNet pretrained
and isolation of the affected person is the very first step to model, since CheXNet was trained on ChestRadiology-14 [13]
dataset containing 112,120 frontal view Radiology images
1 Code for reproducing results is available at from 30,805 unique patients.
https://github.com/mmiemon/COVID-DenseNet and models’ weights can be We trained our model on CovidX dataset containing 13,800
found at https://bit.ly/2YZwyk3 chest radiography images across 13,725 patients. We tested our
model for two class classification (COVID-19 vs non-COVID-
DenseNet-121 has four dense blocks and a transition layers it with a FC layer with two neurons for two class classification
between each two dense blocks (Figure 1). Each dense block and three neurons for three class classification. We initialized
consists of several convolution layers and each transition our models weights by the weights of CheXNet [10], which
layer consists of a batch normalization, a convolution and was trained on ChestRadiology-14 [13] dataset of 112,120
a average pooling layer. Finally, we have a fully connected chest Radiology images. Since CheXnet was already trained
layer with with soft-max activation function with three neurons to extract features from chest Radiology images, we used this
for three-class classification and two neurons for two-class transfer learning method to leverage the pretrained model.
classification. The network was trained end-to-end with Adamax optimizer
with standard parameters (β1 = 0.9 and β2 = 0.999) [7], and
B. Data Generation learning rate = .00001. Categorical cross-entropy was selected
The Radiology images of COVID-19 infected patients are as loss function. The learning rate was reduced by the factor of
extremely rare. We used COVIDx Dataset assembled by [9]. 0.1 when validation loss plateaus. Early stopping with patience
They combined open source databases with chest Radiology set to 5 was used to stop over-fitting. The train, validation and
or CT images from [5], [1], [2]. The total number of test split was set to 0.8, 0.1, and 0.1.
Corona infected Chest images are only 238. This is extremely
small compared to the number of Radiology images available IV. E XPERIMENTAL R ESULTS
for Pneumonia infected and healthy persons which are 6045
Table V: Experiment-1 result.
and 8851 respectively. So the data is highly skewed because
of the scarcity of images of COVID-19 patients. To deal Class/ Metric Accuracy Precision Recall f-score
Overall 0.94 0.94 0.94 0.94
with unbalanced data-set we augmented only the COVID-19 COVID-19 0.87 0.87 0.87 0.87
images in the training set. The following table IV shows the Pneumonia 0.93 0.95 0.93 0.94
distribution of images before and after augmentation. Normal 0.95 0.94 0.96 0.95
A. Quantitative Analysis
To show this particular analysis, we will analyze the test
accuracy, precision, recall, and f-score of each experimental Figure 3: Actual Chest-Xray images along with heatmaps of
setup. a corona affected, a pneumonia affected, and a normal person
• Experiment 1: In this experiment we performed three (top to bottom respectively).
class classification (COVID-19, Pneumonia, Normal). We
split our dataset in train, validation, and test set in 80%-
10%-10% ratio. There were no common image among Overall 2 class classifier performed better as expected and
three sets and augmentation was performed separately in the 10 fold result conformed with this as well.
each set. Results are shown in Table V and VI.
• Experiment 2: To check the robustness and performance
B. Qualitative Analysis
consistency of our model, we have done patient wise To investigate how our model makes prediction we used
10-fold cross validation as the data-set contains multiple Gradient-weighted Class Activation Mapping (Grad-CAM)
Radiology images of different days for same patient. Each [11], which produces a coarse localization map highlighting
fold has images of different patients and augmentation the important regions in the input image for making the
was performed separately in each of them. Results are prediction. In this approach, we computed the gradient score
shown in Table VII. for the target class with respect to the feature maps of the
• Experiment 3: The same setup (train, validation, test final convolutional layer. These gradients are average-pooled
split in 80%-10%-10% ratio) as the first experiment with to obtain the neuron importance weights and a weighted
only 2 class label Eg. COVID-19 and Non COVID-19 combination of the activation maps are followed by Rectified
was used in this experiment. Results are shown in Table Linear Unit (ReLU). This results in a coarse heatmap of the
VIII and Table IX. input image. Figure 3 shows the actual Chest-Xray images
Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 9 May 2020 doi:10.20944/preprints202005.0151.v1
along with heatmaps of a corona affected, a pneumonia [11] S ELVARAJU , R. R., C OGSWELL , M., DAS , A., V EDANTAM , R.,
affected, and a normal person. We can see that our model is PARIKH , D., AND BATRA , D. Grad-cam: Visual explanations from deep
networks via gradient-based localization. In Proceedings of the IEEE
mainly emphasizing on the lung areas in detecting COVID-19 international conference on computer vision (2017), pp. 618–626.
or Pneumonia. [12] WANG. Detection of sars-cov-2 in different types of clinical specimens.
This qualitative analysis is important for a number of JAMA (2020).
[13] WANG , X., P ENG , Y., L U , L., L U , Z., BAGHERI , M., AND S UMMERS ,
factors: R. Hospital-scale chest x-ray database and benchmarks on weakly-
• Interpretability: One of the major drawbacks of many supervised classification and localization of common thorax diseases.
In IEEE CVPR (2017).
deep learning models is lack of interpretability. With
Grad-CAM, we tried to make our model interpretable and
explainable. The generated heatmaps show us insights
about how our model make predictions.
• Trustworthiness: From the heatmaps we can see the
important regions of the images that leads to classification
decision. Consequently, we can verify that our model is
not making decision based on inappropriate regions of
the Radiology image.
• Possible critical factors: Our approach can provide
new insights and visual indicators about critical factors
of COVID-19 disease.
V. C ONCLUSION
In this work, we showed a novel transfer learning based
approach to detect COVID-19. To assure that our model can
differentiate COVID-19 radiology images from both healthy
persons and pneumonia patients, we performed both two class
and three class classification. To guarantee the robustness and
consistency of our model we implemented patient-wise 10-fold
cross validation. Moreover, we performed an explainability
analysis to interpret and visualize how our model works. The
open source data for COVID-19 radiology images is limited,
if more data is available in future, our model can be tested
against those data. How our model performs in detecting
COVID-19 from other types of lung diseases can be a future
research direction.
R EFERENCES
[1] figure1. https://github.com/agchung/Figure1-COVID-chestxray-dataset.
Accessed: 2020-04-29.
[2] rnsa. https://www.kaggle.com/c/rsna-pneumonia-detection-challenge.
Accessed: 2020-04-29.
[3] Website. https://plez.herokuapp.com.
[4] C OHEN , J. P., B ERTIN , P., AND F RAPPIER , V. Chester: A web delivered
locally computed chest x-ray disease prediction system, 2019.
[5] C OHEN , J. P., M ORRISON , P., AND DAO , L. Covid-19 image data
collection. arXiv 2003.11597 (2020).
[6] H UANG G, L IU Z, V. D. M. L. W. K. Densely connected convolutional
networks. Proceedings of the IEEE conference on computer vision and
pattern recognition (2017).
[7] K INGMA , D. P., AND BA , J. Adam: A method for stochastic optimiza-
tion. arXiv preprint arXiv:1412.6980 (2014).
[8] L IN L I , L IXIN Q IN , Z. X. Y. Y. X. W. B. K. J. B. Y. L. Z. F. Q. S.
K. C. D. L. G. W. Q. X. X. F. S. Z. J. X. J. X. Artificial intelligence
distinguishes covid-19 from community acquired pneumonia on chest
ct.
[9] L INDA WANG , A. W. Covid-net: A tailored deep convolutional neural
network design for detection of covid-19 cases from chest radiography
images. Journal of Network & Computer Applications (2020).
[10] R AJPURKAR , P., I RVIN , J., Z HU , K., YANG , B., M EHTA , H., D UAN ,
T., D ING , D., BAGUL , A., L ANGLOTZ , C., S HPANSKAYA , K., ET AL .
Chexnet: Radiologist-level pneumonia detection on chest x-rays with
deep learning. arXiv preprint arXiv:1711.05225 (2017).