COVID Detection From Chest X-Rays With DeepLearning CheXNet
COVID Detection From Chest X-Rays With DeepLearning CheXNet
DeepLearning: CheXNet
D.Haritha M. Krishna Pranathi
Dept. of Computer Science
Dept. of Computer Science SRK Institute of Technology
SRK Institute of Technology Vijayawada, India
Vijayawada, India [email protected]
[email protected]
M. Reethika
Dept. of Computer Science
SRK Institute of Technology
Vijayawada, India
[email protected]
Abstract— The novel corona virus is a rapidly spreading viral increases the spread of disease. COVID became a pandemic
infection that has become a pandemic posing severe threats effecting globally and right now there is no vaccine available
around the world. It is necessary to identify the cases priorly so to cure this. In this epidemic situation Artificial Intelligence
that we can prevent the spread of this epidemic. But the (AI) techniques are becoming vital.
availability of test kits is low which is main drawback. To
Some of the applications where AI is imported are- AI is
overcome this AI is assistive and even used in COVID detection
and prediction. A model for COVID prediction from chest X-rays employed in cameras to trace infected patients with travel
using CheXNet is presented in this paper. This proposed model history using face recognition, robots to dis-patch food and
classifies the binary classes (COVID and normal) with 99.9% medicines, drones to sanitize public places etc. [1]. Nowadays
accuracy. CheXNet is a CNN model that used ChestXray14 Artificial Intelligence is significantly being used to analyze
dataset and was trained to detect abnormalities in chest RNA structure of COVID-19 virus and in research for
X-rays. Generally, this model was extended to detect all the 14 discovering its drugs and vaccine. A vast research is being
pathologies in chestXray14 dataset. We used it’s pre trained carried out in using AI in health care systems widely from
model Densenet121 in our model to detect COVID19 from binary disease prediction, patient monitoring, analyzing RNA
classes.
structures, discovering new drugs and medicines for disease
cure and developing vaccines for many diseases.
Keywords— COVID 19, CheXNet, DenseNet121, Pneumonia Implementation of machine learning techniques for automatic
disease diagnosis and identification is aiding the doctors as a
supportive tool and gaining its popularity in the medical field
I. INTRODUCTION as one of the major application areas of ML. Deep Learning
(DL) a sub field of ML is being successfully applied in several
For the last eight months, we are witnessing pandemic issues like carcinoma detection, carcinoma classification, and
situation throughout the world due to COVID 19, a new respiratory disorder detection from chest x-ray pictures. Day
corona virus first observed in Wuhan, China in December by day the covi19 is growing at an exponential rate so, we
,2019 first suspected as pneumonia. Then after initial study, need to inculcate these AI techniques to increase the testing
the virus is identified as its genesis I Severe Acute Respiratory rate. Recently, many researchers widely used radiology
Syndrome (SARS) and is termed as SARS-CoV-2. This virus images for COVD-19 detection. The observation from the
causes respiratory infections like cold at an early stage and can chest X-ray is a dis-criminating factor; if the chest X-ray is
lead to the most severe respiratory attacking diseases like normal; patients can go home and wait for the laboratory test
Middle East and Severe Acute Respiratory Syndromes called results, but in other case when using RT-PCR test the results
MERS and SARS. The clinical features of the disease include are obtained late and the patient will be quarantined until the
fewer, sore throat, headache, cough, mild respiratory result arrives. That’s where the significance of our work
symptoms even leading to pneumonia. The testing techniques carried out in this paper lies. Thus, CT images and X-rays
that are being currently used for COVID diagnosis are have vital role in prior detection of this disease which can be
Polymerase Chain Reaction (PCR) and Reverse Transcription used as screening tool. Therefore, simple, precise, and faster
PCR popularly known as RT-PCR. As RT-PCR tests take AI models are helpful to overcome the problem of delay in
much time for prediction, and also due to limited availability disease identification and help patients in early discovery and
of these test kits, early detection cannot be done which in turn cure. Deep Learning is used in such disease diagnosis,
© IEEE 2020. This article is free to access and download, along with rights for full text and data mining, re-use and analysis
Authorized licensed use limited to: IEEE Xplore. Downloaded on March 09,2022 at 20:52:20 UTC from IEEE Xplore. Restrictions apply.
prediction and even treatment. In this paper, a deep learning need a chest X-ray of chest x-ray images and are available also
model called CheXNet [6], that takes chest X-rays as input on internet [7].
and gives the probability of predicting the COVID-19 as
output is presented and acts like an aiding tool for pathology.
This was trained to predict 14 different pathologies. Since, this III. MATERIALS AND METHODS
model was already trained on chest X-rays during the
A. X-ray image dataset
development we can get better and accurate results of
prediction using this. So, to increase the COVID testing rate The dataset to be considered should contain only chest X-rays.
we can use X-ray test as preliminary test and if AI prediction There are various open access sources available on internet
test results in positive then patient can undergo medical test. [7]. The dataset we considered for implementing this model,
consists of 1824 images of chest X-rays of equalized COVID
and non-COVID classes i.e. 912 confirmed COVID-19 X-rays
and 912 non-COVIDX-rays [8]. The dataset is splitted into
II. RELATED WORK two sets training set and test set in 8:2 ratio. The following
This section briefs some of the recent works done on COVID Fig. 1(a) shows sample chest X-ray of a non-COVID patient
prediction using chest X-rays, different models that are used in and Fig. 2(b) shows X-ray of a COVID-19 infected person.
prediction and also some works related to AI and deep
learning in disease prediction, diagnosis. From the initially
days of COVID outbreak only many researchers started
working on this and discovered many methods for COVID
prediction and cure.
The ideology of using x-ray images in prediction of COVID-
19 came from the initial approaches which are used in
detection of pneumonia from chest X-rays using deep neural
networks [2]. The authors used CNN in prediction of
pneumonia from chest X-rays. They developed CNN model
(a) (b)
that takes chest X-rays and outputs pneumonia prediction.
Transfer Learning is a technique where we train a model on
one problem and use it on other related problem. There are Fig. 1. Sample x-ray of (a) non-COVID patient
also previous works done on COVID prediction using transfer (b) COVID infected person
learning [3]. Apostol Poulos et al., have an X-ray dataset taken
The distinct observations can be made from X-ray images of
from patients with microorganism respiratory disorder,
COVID-19 infected particularly in the lower lobe areas, and in
confirmed COVID-19 cases, and normal diseases from public
the posterior segments, with distribution in peripherals and
repositories for the automated detection of the Coronavirus.
subpleural distribution. These observations are also observable
They used transfer learning with CNN, yielding outstanding
in both the lungs even in the early stages of virus infection.
results approximately 96%. In this three distinct CNN based
models ResNet50, InceptionV3 and Inception-ResNetV2 have The images of the dataset are first downscaled to 224 X 224
been proposed for the identification of COVID, pneumonia and are normalized. We have augmented the training data by
infected patient using chest X-ray radiographs by Ali Narin, performing horizontalflipping, zooming, rotating and rescaling
Ceren, Pamuk [4]. They performed these models with 98%,
etc. The original cheXNet model used a dataset called chestX-
97% and 87% accuracies respectively. In [5] the authors used
darknet model and implemented 17 convolution layers, ray14 which is the present largest available dataset of chest X-
introducing different filtering on each layer. They also rays. Wang et al. (2017) [9] developed the ChestX-ray14
mentioned the findings that are often noticed in X-rays of dataset and it consists of 1,12,120 X-ray images of 30,805
corona infected patients as Groundglass opacities (GGO), A
patients and each x-ray image is labeled with14 distinct
crazy paving appearance, Air space consolidation, Broncho
vascular thickening, Traction bronchiectasis. In [6], the respiratory diseases.
authors developed a CheXNet model that detects Pneumonia
from chest X-rays that works much more accurate than a well B. Proposed Model
practicing radiologist. They have evaluated the model’s
CheXNet:
performance using F1 measure and shown that the model’s
performance was much better than the experienced CheXNet is a deep Convolutional Neural Network consisting
practitioners. The model was enhanced to identify all 14 of 121 layers which is shown in Fig. 2. This network produces
diseases of Pneumonia category from chestX-ray14 dataset a heatmap that localizes the areas in which disease symptoms
and achieved acknowledgeable and satisfactory results for all
are highly indicative in the image along with the prediction
those disease predictions. Hence, using CheXNet for COVID-
19 prediction is reasonable and for training this model we probability. Figure below shows the architecture of CheXNet
Authorized licensed use limited to: IEEE Xplore. Downloaded on March 09,2022 at 20:52:20 UTC from IEEE Xplore. Restrictions apply.
model that includes all convolution layers and the fully For our model, we build a CheXNet model by using pre-
trained model of DenseNet121. It has five convolutional layers
connected layers.
and average pooling is used. We used the weights of the pre-
trained model taking the weights file and loaded those weights
in our model. We achieved more accuracy compared to the
models which used transfer learning cause this CheXNet
model was trained on chest x-ray images itself unlike other
models. Fig. 4. shows the used model summary depicting the
working of model.
(1)
Authorized licensed use limited to: IEEE Xplore. Downloaded on March 09,2022 at 20:52:20 UTC from IEEE Xplore. Restrictions apply.
• Finally, construct a new fully-connected layer normal patient chest x-ray obtained after end of each CONV
consisting of POOL => FC =SIGMOID layers and layer of our CheXNet model.
append to top of DenseNet121.
• Now, pass a new X-ray image to detect whether the
patient is having COVID-19 or not. C. Results
We performed our experiment to predict COVID19 from chest
The model is built with five conv layers and is trained with x-ray images. By training our developed DenseNet121 model
pre-trained weights. The summary of the model on 1824 images we achieved excellent results showing that
implemented is shown in below figure Fig.3.2.2 in which
our model can predict with 99.9% accuracy. The high
we represented only significant layers and parameters. We
also visualized feature maps in our CheXNet model to efficiency i.e accuracy of this model is obtained because of the
observe how the given input chest x-ray is considered by datset considered -as it clearly depicted the distinguishing and
each layer of the proposed CheXNet model. This gives another reason is that we considered the weights of pre-
insights about the internal representation of how the model defined model which are already trained on chest X-rays.
considers input and its evaluation. This feature maps or Thus, we can use this in real time scenarios of COVID
activations maps provide the preferential regions of the detection in screening tests with any further developments
image that are used by convolutional neural networks to needed.
classify covid chest x-ray with that of normal one. Below Performance Metrics:
figures Fig.5 and Fig.6represents the activation maps of last In a model the values like accuracy, precision, recall, f1-score
blocks in different CONV layers of our model for both are considered as performance metrics since they are used to
covid patient and normal patient x-rays. From those we can evaluate the model performance.
clearly observe the difference and evaluation process of Accuracy: It is the measure of total number of predictions that
CONV layers. The differences in activation maps of both are perfectly classified.
depict that covid x-ray contains major portion of area Precision: It is the measure of specific cases expected based
affected when compared to that of normal one. Finally, by on confidence.
these the model can clearly classify the chest x-rays into Recall: It can be defined as ratio of the number of images
respective classified as positive to the total number of existing relevant
classes. positive images, which is similar to true positive rate.
F1-score: It is the weighted average of precision and recall.
Fig.7 shows the performance of our model.
Authorized licensed use limited to: IEEE Xplore. Downloaded on March 09,2022 at 20:52:20 UTC from IEEE Xplore. Restrictions apply.
loss. REFERENCES
[1] M.A. Ruiz Estrada. The uses of drones in case of massive Epidemics
contagious diseases relief humanitarian aid: Wuhan-COVID-19
crisisSSRN Electron J (2020), 10.2139/ssrn.3546547(February)Google
Scholar.
[2] Wu, Huaiguang, et al. “Predict pneumonia with chest X-ray images
based on convolutional deep neural learning networks.” Journal of
Intelligent & Fuzzy Systems Preprint (2020): 1-15.
[3] Apostolopoulos, loannis D., and Tzani A. Mpaesiana.”COVID-19:
automatic deyection from x-ray images using transfer learning with
convolutional neural networks” physical and Engineering Sciences in
Medicine(2020).
[4] Narin, Ali, Ceren Kaya, and Ziynet Pamuk. “Automatic detection of
Fig. 8 Training and Validation(test) accuracy and loss curves. coronavirus disease (COVID-19) using x-ray images and deep
convolutional neural networks.” arXiv preprint arXiv:2003.10849
(2020).
[5] Ozturk, Tulin, et al. “Automated detection of COVID-19 cases using
IV. CONCLUSION deep neural networks with X-ray images.” Computers in Biology and
Medicine(2020):103792.
In this paper we used CheXNet model using chest x-ray [6] Rajpurkar, Pranav, et al.”Chexnet: Radiologist-level pneumonia
images to predict the novel COVID-19 disease. This idea can detection on chest X-rays with deep Learning.” arXiv preprint
be implemented in real-time scenarios of COVID-19 detection arXiv:1711.05225 (2017).
with further developments. [7] J. Cohen, “COVID-19 image data collection”, GitHub,2020. [Online].
Available:(https://github.com/ieee8023/COVID-chestxray-dataset).
Our main future goal is to increase the dataset size so that we “RSNA Pneumonia Detection Challenge”, Kaggle,
can train the model still better for accurate predictions 2020.[Online].Available:(https://www.kaggle.com/c/rsna-pneumonia-
because, in machine learning training with more data makes detection-challenge).
the model to perform much better on unseen data. This can [8] (http://md-datasets-public-files-prod.s3.eu-west-
1.amazonaws.com/bc9f750d-b663-48a7-844e-4e8246751706)
also be further developed to predict the possibility of that
[9] (http://academictorrents.com/details/557481faacd824c83fbf57dcf7b6da9
affected person to survive. We are also working on this. 383b3235a).
However, it is our hope that this project will continue to
improve and potentially offer insight that will contribute
toward medical research regarding COVID-19.
Authorized licensed use limited to: IEEE Xplore. Downloaded on March 09,2022 at 20:52:20 UTC from IEEE Xplore. Restrictions apply.