Covid-19 Chest X-Ray Images Detection and Classification Using Transfer Learning.
Covid-19 Chest X-Ray Images Detection and Classification Using Transfer Learning.
Transfer Learning.
A THESIS
MASTER OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY
By
Ram Choudhary
MIT2020069
UNDER THE SUPERVISION OF
Prof. Shekhar Verma
IIIT-ALLAHABAD
INDIAN INSTITUTE OF INFORMATION TECHNOLOGY, ALLAHABAD
(A UNIVERSITY ESTABLISHED UNDER SEC.3 OF UGC ACT, 1956 VIDE NOTIFICATION NO.
F.9-4/99-U.3 DATED 04.08.2000 OF THE GOVT. OF INDIA)
INDIA
JULY 2022
CANDIDATE DECLARATION
Place : Allahabad
Date: / /
Ram Choudhary(MIT2020069)
CERTIFICATE FROM SUPERVISOR
Date: / /
Place: Allahabad
Countersigned by:
..................
Dean(Academics)
CERTIFICATE OF APPROVAL
..................................
..................................
..................................
..................................
Acknowledgements
I would like to express my sincere gratitude to all those who provided me with
the resources and guidance to complete my thesis. I am profoundly grateful to Prof.
Shekhar Verma for his expert guidance and continuous encouragement throughout
to see that this project rights its target since its commencement to its completion.
His instrumental contribution in the proposed work has made it conceivable.
I would also like to thank Mr. Adarsh Prasad Behera, Research Scholar in the
department of Information Technology, at IIIT Allahabad for his overwhelming sup-
port and for helping me out whenever and wherever I approached him. My friends,
classmates who helped me to widen intellectual scope and who supported me in
ways too great to forget. Special thanks to my family for their love, encouragement,
interesting discussions and continuous support throughout the course.
Finally at the end I would like to thank to all faculty members who inspired me to
finish my work.
Ram Choudhary
MTech I.T
ABSTRACT
Coronavirus family is the source of the ailment known as COVID-19. the CXRs of
COVID-19 infected individuals are abnormal therefore radiography of chest is one
of the prominent detection method for COVID-19 diagnosis. However, an expert
with extensive knowledge is needed to review the CXRs (Chest-X-Ray). Therefore,
applying deep learning techniques to identify anomalies in X-ray pictures is fre-
quently suggested as a prepared option to aid in the diagnosis of the illness. Many
studies on COVID-19 CXR classification have been published, however the major-
ity of them used a limited sample of COVID-19 CXR pictures, which led to dataset
which is unbalanced and impacted the performance and the analysis of the models.
In this we suggest a number of image pre-processing methods to improve COVID-19
CXR pictures in order to provide a sizable and varied dataset to improve the effec-
tiveness of deep learning algorithms(DLA) in identifying the illness from CXR. We
also provide cutting-edge, reliable and efficient modified deep learning models to
detect COVID-19 from a huge collection of CXR pictures, based on DenseNet201,
VGG16, VGG19 and Inception-V3, we also make use of the transfer learning so that
we can train pre-trained models effectively those who are trained on more a million
images. Based on the previous work findings, we have improved dataset which is
large as well as balanced and contains better COVID-19 CXR pictures that is cur-
rently accessible.To identify more accurately COVID-19 using CXRs, we have also
added lung opacity as a new class to imporve precision in classification of COVID-
19.
1 INTRODUCTION 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Deep Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 CNN for image classification . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 VGG-16 . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 VGG-19 . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.3 DenseNet . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.4 Inception-V3 . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 LITERATURE REVIEW 14
3 PROBLEM FORMULATION 18
4 PROPOSED METHODOLOGY 19
4.1 Synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7 Conclusion 44
References 44
List of Figures
Chapter 1
INTRODUCTION
1.1 Overview
Coronavirus disease is a severe and dangerous illness that first appeared in Dec
2019 and has since spread around the globe [1]. The Worldometer [2] is a site that
was built by a group of developers and researchers with the purpose of providing
information on numerical data from across the globe. According to the informa-
tion provided on the website, the COVID-19 pandemic has resulted in a total of
183,194,939 cases and 3,966,106 fatalities by the end of June 2021. Fever, cough-
ing, shortness of breath, and exhaustion are some of the symptoms that are associated
with COVID-19 [3]. One of the acute symptoms is the sensation of having discom-
fort in the chest and having difficulty breathing. An abnormal CXRs may be seen in
about half of the people who have COVID-19 [4]. When it comes to the early detec-
tion and treatment of patient who may be suffering with COVID-19, chest imaging
plays a very significant role. Imaging of the chest performed using X-rays is used in
order to conduct a thorough examination of the patient’s chest [5]. In addition, the
advancements that have been made in deep learning applications over the last several
years have been of assistance in properly recognising COVID-19 from the CXR. DL
is a subfield of ML that attempts to model the way in which humans acquire certain
categories of knowledge. We are using it to evaluate and recognise patterns within
images, such as those seen in radiography jobs. DLA have shown some encouraging
outcomes in the process of extracting information from X-rays and medical pictures
[7]. As a result, we emphasise the use of DL models in the process of recognising
COVID-19 instances based on CXR pictures. By using an automated COVID-19
predictor based on a CXR, medical professionals will be able to recognise the illness
more quickly and take appropriate treatment. This study suggests a novel approach
for transfer learning that makes use of deep learning along with transfer learning by
combining head and final layer to suit four pre-trained models. These models are
• To identify and know COVID-19 from CXR pictures, we suggest four new
modified DL models by the use of transfer learning based on Dense-Net, VGG16,
VGG19 and Inception-V3.
Recently, deep neural networks have taken over as the go-to method for resolv-
ing several classification and computer vision issues. The capability includes im-
porting a pre-trained network and performing inference on it, however building a
neural network is beyond the scope. Deep neural networks, often known as DNNs,
have been very successful in the field of classification and computer vision. How-
ever, their extreme performance comes at the significant computational cost, which
greatly hinders their applications to many devices, such as mobile phones, detection
devices and Internet of Things (IoT) devices. Therefore, approaches and techniques
that decrease the computation cost while maintaining the high accuracy of DNN
are in high demand to allow a variety of edge AI applications. These methods and
strategies may be found in the literature. The motto of this chapter is to offer an
overview of effective deep learning approaches. In this, we begin by discussing
common model compression approaches such as factorization, pruning, and quan-
tized. After that, we outline strategies for the building of compact models, such as
efficient convolution layers and representational efficient CNN architectures.
Image classification has been primary topics in the computer vision domain. Con-
volutional neural networks (CNN) is a specific architecture of ANNs popularly used
in visual imagery and image recognition. The most crucial phase in detection of
COVID-19 virus using XR(X-ray) images is the extraction of features. The method
of extracting the information that is being distinct from pattern of lungs is known
as feature extraction. CNN is being used in extraction of optimal features from the
images in below Figure 1.1.
CXR image, the first layer is conv layer which is the basic layer of CNN. This layer
consists of some filters. Here, the input CXR image is made to pass through this ker-
nels/filter. The function map is obtained where the convolution operation performs
the multiplication of the sets of weights with the inputs. The multiplication of array
of input image and 2-dimensional collection of weights constitutes a filter. The filter
is considerably smaller that the size of input. This filter multiplies the input from
different angles and points. This layer covers the entire image so this filter is used to
identify some specific types of features .CNN presented a categorization model that
had been trained on before to work out experiments that had been practised. The
model believes that it has identified the chest XR image based on the label that was
present up to the training stage. The following stage is the evaluation, often known
as the categorization phase. The suggested model is going to be tested once more
utilising a dataset of chest x-ray pictures, but this time it won’t be labelled before-
hand. During the phase of training that came before, models will be expected to
categorise themselves based on the knowledge they have gained. At this level, the
categorization model will be measured or evaluated to see whether it is good or less
good than previous stages.
Stochastic gradient descent (SGD), which is used for optimization, is used in a se-
quential manner within the framework of the suggested classification model, which
has a rate of 0.01. The researchers will purposefully alter some parameters through-
out the classification process. Some of these factors include the epoch and the dataset
ratio. However, there are other factors that are constant. Other settings are define
with the same value for this classification. These settings include an architecture
with 2 convolutional layers, 3-layer pooling, 2 fully connected layers, there are 32
filters, a 3x3 filter/kernel that gathers size of 2x2 and finally soft-max as the classifi-
cation layer.
1.3.1 VGG-16
We trained the VGG-16 model using data from X-rays of normal, covid,pneumonia
and lung opacity, as you can see in below Figure 1.2 our VGG-16 consists of thir-
teen conv layers and three fully connected layers, with the 3*3 kernels are combined
with convolutional and the pooling layers with 2*2 parameters. Blocks 1–5 of the
VGG-16 convolutional and pooling layers each comprise several conv layers along
with kernels and pool layers. Each of the 2-convolutional layers in block-1 uses 16
(filter)kernels to extract features and the pooling layer use to reduces the size of the
images. The design of succeeding blocks is identical, with the exception that blocks
1 and 2 uses 2 conv layers, whereas blocks 3–5 employ these 3 conv layers, each
with a different (filter)kernel number, to enhance the network and boost overall ac-
curacy of the model. Three completely interconnected layers combine and output
characteristics into two classes in the end.
1.3.2 VGG-19
To expand the depth, VGG-19 just employs a 3 3 convnet set up as seen above.
Max-pool layers are used as a handler to reduce the dimension of feature frame.
There are two FCN layers, each of which has 4096 neurons. To lower the amount
of false positives, all sorts of lesions were taken into consideration while evalu-
ating the VGG, which is trained based on individual lesions. Convolution layers
apply the convolution algorithm on pictures at the pixel level, enabling the results to
flow through to the next layer. The 3x3-dimensional filters utilised in the convolu-
tion layer have been trained for feature extraction. Rectified Linear Unit stands for
(ReLU) layer and pool layer are then added to each stacked convolution layer. The
most well-known non-linear activation function that only accepts positive input is
ReLU at the moment.
ReLU is highly successful identify the optimal convergence behaviour that elimi-
nates the gradient problem when compared to the sigmoid function. After the ReLU
activation function, a down-sampling max-pooling layer is utilised. The filter with
a 2 2 dimension is often regarded as having the same step size. Every sub-region
will get the most value from the output. The activation function has to be created
for dense layer. In order to provide the dropout layer zero value, it was abandoned
during random layer activation. During the training phase, neurons are removed at
random to alleviate the problem of overfitting. This dropout is used when being
trained. below in Figure 1.3 is the architecture of VGG19.
1.3.3 DenseNet
Deep learning is best for layer by layer feature extraction from the image data, ab-
straction of the features, and recognition, detection function implementation. Deep
learning was utilised by Krizhevsky et al. to win the ImageNet CV competition.
CNN, which reflect DL techniques, are becoming a common study area in pattern
detection or recognition. Due to its new architecture which is somehow different
form ResNet where it has dense connectivity in extra, DenseNet has outperformed
many other deep learning models in terms of results. Its interconnection among ar-
bitrary layers, skip connection mode, improved feature transfer to feed forward, and
feature will get reuse between network layers all contribute to a more condensed
network with fewer redundant features. Similar layer depth improves network con-
vergence performance, mitigates network degradation and gradient disappearance
issues brought on by convolutional network deepening, and considerably reduces
the total parameters of the netwok and computing efficiency.
structure using DenseNet. Figure 1.4 (A) Dense block, some of the transition
layer then conv layer, and lastly fully connected layer make up the foundation of
DenseNet. Figure 1.5 (B) Denseblock is a collection of densely linked dense units
with non-linear functions of mapping of Convolutional, BN and ReLU that are cre-
ated using a pre-activation technique to facilitate network training and improve gen-
eralisation performance. A large amount of features get generated through less
number of convolutional filters/kernels, and the final layer of DenseNet model is
relatively in scale because the input of each dense unit is combined with all of the
outputs of the preceding dense units, and newly features must also be carry forword
to next dense units. This method allows features of a dense block to get used effec-
tively. Figure 1.5 (C) The transition layer, which is the work as wall to each adjacent
dense blocks, is made up of a 1 - 1 conv layer and a 2 - 2 avg pool layer. It com-
presses the input from the dense block and all the feature information that have been
extracted so far, which reduces the size and as well as dimensionality of the feature
array and, in turn, reduces dense block parameters and guards against overfitting
the network. By including feature information in features network, the classification
prediction layer, which is the top layer with full connectivity, lessens the impact of
feature location on classification and classifies feature after weighing.
1.3.4 Inception-V3
Consideration is given to the CNN Inception-V3 model, and retraining of the net-
work is performed with our own acquired datasets. Figure 1.6 depicts the Inception-
V3 model that has been presented. This model is made up of the following com-
ponents: AvgPool, MaxPool, Convolution, Concat Layer, Fully Connected layer,
Dropout, and Softmax Function. The weights sharing and sparse connectivity offer
the characteristics of the convolution layer. This layer calculates the outcome of the
neuron that is related with present local areas from the layer that came before it. In
addition to this, it correlates to kernels at the same layer and shares the weights of
the neurons that are located underneath the separate feature maps. A fully connected
network layer is used in the portion of the classification that accepts the feature
outputs from Inception-V3 as well as the segmented feature that was specifically
produced by the user.
Two primary components make up the CXR image classification model. These
components are the feature extraction process, which makes use of CNN, and the
classification process, which makes use of the softmax layer and the fully connected
layers. The input data is convolved using the convolution function, which then pro-
duces feature maps. This function accepts data as input.
Through the use of the pooling function, the feature resolution is lowered in order
to make the convolutionally generated features noise-resistant. The two forms of
pooling operations are avg-pooling and max-pooling, as shown in Figure 1.7. Here,
average pooling is a two-dimensional (2D) function with a size of (8, 8) that reduces
the computing burden while decreasing the variance of the data. It also permits
passing the output to the subsequent layer for the subsequent process. Additionally,
max pooling, a 2D pooling function, lowers computational cost and data variance.
When it comes to feature extraction, maximum pooling extracts significant edge
features whereas average pooling extracts smooth features.
Chapter 2
LITERATURE REVIEW
Different work and research has been done in the past for early detection of
COVID-19. Many algorithms have been tried to different datasets to check if a
better and perfect COVID-19 detection method could be found. Several research
and papers were analysed in order to reduce the research gap. The literature review
is divided into different sections which are important and influential for our research.
In paper [47] author uses CNN for classification and used CXR based images
that have 3 classes, covid, penumonia and lung opacity and they got test accuracy
of 82.6%. In [4] author used VGG16, DenseNet121, ResNet50, and ResNet152 on
CT-scan images to perform binary classification. These algorithms are more useful
for COVID-19 pneumonia detection rather than for any other lung issues. These al-
gorithms were applied on two different datasets to find several results. The datasets
used were huge Dataset of (OCT)Optical Coherence Tomography and CXR Images
and SARS-CoV-2 CT scan dataset. These are very small datasets which contain a
small number of OCT and CT scan images, hence provides an accuracy of 98-99%.
The results of this study can help radiologists and virologists in finding more com-
plex lung diseases in different datasets. Apart from that, it also concluded that with
the help of these models, when applied on more public data sets can help radiologists
to find the COVID virus much faster in the lungs
With 196 photos (COVID-19 = 105, SARS = 11, normal = 80) used to train a
DeTraCResNet18-based binary model, Abbas et al[10] .’s analysis was able to detect
COVID with 95.12% accuracy with 97.91% sensitivity also having 91.87% speci-
ficity, and 93.36% precision. In order to detect COVID, Maguolo and Nanni [11]
gathered 338,270 pictures (145 images of COVID-19, 338 images of pneumonia),
using the AlexNet algorithm, and achieved a 99.97% AUC. ResNet-50 was pre-
trained on 455 chest X-rays by Hall et al. [12]. (CXR images which conatin 135
of COVID-19 and 320 of pneumonia). They attained 95% AUC and 89.2% accu-
racy. 3905 CXR pictures (450 images of COVID-19, 3455 mixed images other then
COVID) were gathered by the authors of [13], who then used pre-trained MobileNet-
v2 to classify them with an accuracy of 99.18%. With the use of a pre-trained
(CNN+HOG) + VGG19 model, Alam et al. [14] trained on 5090 pictures (1979
images of COVID-19, 3111 of non-covid), and their accuracy was 99.49%. In [15],
the authors gathered 6926 photos (2589 COVID-19, 4337 non-covid), classified the
images using a CNN, and attained the accuracy of 94.43%. In [16], the authors
trained a CNN model using TL on 610 pictures (305 COVID-19 and 305 normal),
and they attained a 97.4% accuracy rate. A deep learning model CoreDet with 99.1%
accuracy was proposed by authors in [17] using 900 pictures (500 COVID-19 and
400 normal). In [18], the authors gathered 3251 photos (371 images of COVID-
19, 2882 images of normal), classified them using the AlexNet model, and got an
accuracy of 99.16%.
In[5] author used DL methods for COVID-19 image detection with the help of
lung ultrasound imaging which works as an alternative when there is no access to CT
scans or chest XR images. In [6] the author conducted a survey and applied different
deep learning models on many different data sets available publicly. These deep
learning models are applied separately on Chest XR images and CT scan images.
In [15], the author has used different CNN models to perform two binary clas-
sifications to check whether it gives a better result and accuracy or not when com-
pared with a multi-class classification method. Two binary classification method first
checked the COVID and NON-COVID images and then it further classified normal
and pneumonia using the NON-COVID images. It performed better than one multi-
class classification method and achieved 98.38% of accuracy.
For image data, deep learning techniques are very top-notch. These techniques
are used to create medical images. These are also used for classification and detec-
tion of these images as well. The CNN detects Pneumonia in CXR im- ages with
best accuracy. The results show above 95% accuracy. Apart from Pneumonia detec-
tion, this architecture also showed good results in other chest problems like bacterial
infections, viruses, and viral, etc
applied on CT scan and (X-ray)XR image data sets and how these radiology images
are the future for better detection on COVID-19 images.
In [10] author has applied federated learning model called electronic medical
record(EMR) chest X-ray AI model. Using vital signs, laboratory data and CXR
as inputs this model predicted the future oxygen requirements for COVID patient.
Data was collected from 20 different institutes. The data is not publicly available
and it was made sure that no data is shared on the centralized server as well as with
any other institute.
Deep learning algorithms, especially CNNs, have gotten a lot of attention. Al-
though CNN-based algorithms accomplish automated feature extraction and excel-
lent results, they often need more samples of training and computing com- plexity is
more compared to traditional methods.
The majority of the studies that were analysed for this literature review diagnosed
COVID-19 based on chest XR pictures and DL. This demonstrates the significance
of chest XR pictures in the diagnosis of virus like COVID-19 and assists medical
professionals in the expeditious detection of COVID from chest XR. However, we
discovered several drawbacks in prior efforts, such as unbalanced datasets and less
amount of COVID CXR photos to classify them. Both of these shortcomings have
a substantial influence on the performance and the outcome of these methods and
create a wrong impression on their level of accuracy. This study introduces a novel
pre-trained DL model that based on CNN using transfer learning, which we then ap-
ply to VGG-19, Inception-V3, VGG-16 and Dense-Net201and the results are quite
promising. In addition, we make use of image augmentation techniques in order to
build a dataset which is balanced that is capable of overcoming the constraint posed
by unbalanced datasets. Last but not least, in order to circumvent the issue of inade-
quately sized datasets, we compiled a massive one consisting of 14800 photos (3700
normal, 3700 pneumonia, 3700 COVID-19 and 3700 lung opacity) and used deep
learning to categorise them. We perform both binary and multi class classification
Chapter 3
PROBLEM FORMULATION
To end the spread of COVID, a significant number of people who may be infected
with the virus need to undergo testing so that they may be properly isolated and
treated. Pathogenic research facility testing represents the suggested highest quality
level, despite the fact that it is laborious and frequently yields significant false neg-
ative results. We need analytical tactics that are both swift and accurate in order to
combat the illness. In light of the radiographic changes that COVID-19 causes in XR
images, we planned to develop a DL methods with transfer learning that would be
able to extract characteristics of COVID CXRs. This would enable us to provide a
clinical analysis in advance to saving valuable time that could be better spent on dis-
ease control. A method of classification based on machine learning is utilised in this
study in order to categorise the X-ray pictures of the chest. It is possible to enhance
the accuracy of the current methodology and models, which is the most important as-
pect of this problem, by imposing transfer learning on that because less data in each
class, increasing the number of iterations, as well as the number of photos used for
training the models by augmenting images through augmentation. Accuracy is the
most important aspect of this problem. Google’s Inception V3 , VGG-16, VGG-19
and DenseNet are the CNN based architectures.
Chapter 4
PROPOSED METHODOLOGY
4.1 Synopsis
We are going to present an automated covid patient prediction model in Figure 4.1
to categorise COVID-19 by making use of (CNN), with the help of CXR pictures.
This model is totally utilised because, according to certain studies that employed
models that were comparable to this one, it provided high accuracy performance.
Additionally, this model was built primarily to handle two-dimensional data or pic-
ture data, and it is suited for substantial data. In the next chapter, we will discuss a
dataset consisting of CXRs pictures. In order to categorise CXRs pictures, the sug-
gested model places a greater emphasis on locating the appropriate parameters for a
CNN architecture network with making use of any pre-trained models and making
use of extra methodologies like transfer learning.
In this, we have four different types of chest x-ray scans, and they are labelled
as (0) for Covid-19, (1) for Normal, (2) for Pneumonia and (3) for Lung Opacity.
Therefore, we need to categorise them in a way that yields effective outcomes with
efficient accuracy. In this article, we improve the effectiveness of convolutional neu-
ral networks by applying the notion of transfer learning. As a result of the fact that
these models need additional data in order to be trained, we have resorted to transfer
learning in order to get around this limitation. Specifically, we make use of pre-
trained CNN models and then train our primary data on a classification layer that we
have developed on our own. Image augmentation was another strategy that helped
us get around the data image issues. We came up with some pictures just for the
classes with augmentation.
Chapter 5
5.1.2 Sklearn
Scikit-study is a python module that’s applied to execute more than one device
mastering capabilities. This is primarily based totally on NumPy, SciPy and Mat-
plotlib modules. Scikit-study offers clear in conjunction with powerful capabilities
for more than one supervised and unsupervised mastering algorithms. The additives
utilised from Scikit-study are random wooded area classifier, confusion matrix, class
document and accuracy rating from metrics for plotting and getting the results
5.1.3 Pandas
This has been the majorly utilised module in facts analysis. This offers enor-
mously more suitable execution code carried out in C or Python. The more than
one method through which the facts will be tested with Pandas is Series and Data
Frames.
5.1.4 Numpy
NumPy is the maximum large module important for handling the bulk of the log-
ical processing inside python. It is usually applied for dealing with arrays and its
computations NumPy resources a multi-dimensional array item having extraordinar-
ily advanced execution along with capabilities critical for handling this item. These
facts systems are extraordinarily beneficial for systematic computation of excessive
dimensional records.
This is unfastened cloud software provisioned through Google which toughen un-
fastened GPU. This bolsters Python three.6 which has been best in executing pro-
found deep mastering modules particularly Keras, Tensor Flow, OpenCV and Py-
Torch. This is installed on Jupyter Notebook subsequently smooth for operating
We employ chest X-ray scans from normal people, those with pneumonia, peo-
ple with COVID-19 and as well Lung Opacity for this investigation. We establish
Dataset by collecting eleven publicly accessible sub-databases. This dataset con-
tains a approx 2000 COVID-19 pictures before image augmentation, 3700 images
of pneumonia, 3700 images of normal chest x-rays and 3700 of lung opacity. We
combine and modify eleven distinct sets of publicly available data, including those
from the dataset with name as ChestX-ray8 [25], the CXR Images of pneumonia
dataset [26], the BIMCV-COVID-19 CXR dataset [27], the COVID-19 CXRs Col-
lection [28], the COVID -19 CXR Dataset [29], the Actual-Med COVID-19 CXR
Dataset Initiative [30], the SIRM CXR COVID Dataset [32], COVID-CXNet [34],
MOMA- Dataset [35], and COVID-19 Image Repository [33]. These eleven datasets
were selected and they are freely accessible to academics and they are openly pub-
lished.
them to 224 pixels by 224 pixels before adding them to the feature array. In order to
train, test and validate the models, we separate the photographs into four categories:
Normal, COVID-19, pneumonia(lung infection) and Lung Opacity images, and we
label them with the numbers 0, 1, 2 and 3. In the final step, we apply a one-hot
encoding method to each of the labels.
For our trials, we used the VGG16, VGG19, DenseNet201, and Inception-V3
deep learning classifiers. TensorFlow and Keras libraries contain all the models.
These models serve as our foundational models, and we give each one a fresh, un-
trained brain. A convolutional neural network (CNN) design called VGG16[36] has
a pool layer that is repeated three times, a pool layer, and 3 conv filter layers (3
3). Then, 1 pool layer and 3 conv kernel layers (3 3) were performed twice. The
head of the architecture, which includes three completely linked layers and SoftMax
output, is the last component. The convolutional neural network (CNN) architecture
VGG19[36] consists of 1 pool layer repeated 3 times, 2 conv filter/kernel layers (3
3), and 2 convolution kernel layers. Then, one pooling layer and four convolution
filter layers (3 3) were repeated twice. The head of the architecture, which includes
three completely linked layers and softmax output, is the last component. A highly
linked convolutional network is DenseNet201[37]. DenseNet201’s architecture is
divided into four sections. The first one has a layer of 7 7 convolution, a layer of 2 2
max-pool,then a dense block of 1*1 conv, and a layer of 3*3 conv layers repeated 6
times.Second section consists of a thick block of 1*1 conv layer and 3*3 conv layer
comes again and again 12 times, followed by a layer of 1*1 conv layer and a layer
of 2*2 max-pool. The second portion’s layers are comes again and again 48 times
in the third part. The same layers from sections 2 and 3 are repeated 32 times in the
fourth segment. Classification layers, often known as the head layer, are made up of
1000 completely linked layers with SoftMax and a 7 by 7 global average pooling.
Convolutional neural network (CNN) architecture Inception-V3.
TL is now one of the most effective methods utilised in the field of DL. It is
possible for us to train our model using smaller datasets in a shorter amount of
time by receiving knowledge from models that have been pre-trained using larger
datasets and passing that information to our model. Because there are typically only
limited datasets accessible for medical data, such as photographs, this scenario arises
rather frequently. We can train DL models on relatively limited datasets without
risking of over-fitting if we make use of transfer learning. Some of the last layers
of the existed pre-trained network get removed, which is a necessary step in order
to accommodate the new categorization challenge. After that, we remove it and
replace it with our own newly defined layers that correspond to the new classes that
our problem presents. In addition to this, we change the network as fully connected
layer’s dimension to 64 and the dropout layer to 0.5. The average pooling size is
now 4 by 4. The topmost layer is made up of two different class heads, which are the
standard chest X-ray pictures as well as the COVID CXR images that have a binary
cross-entropy loss function. In addition, we apply a loss function that is categorical
cross-entropy loss function on the pictures of normal chest X-rays, pneumonia, lung
opacity and COVID-19 to produce a third and final layer of classification. This layer
is composed of four class heads. Below Figure 5.5 provides an in-depth look at the
head that was added to the existed pre-trained models.
Chapter 6
Figure 6.1: Accuracy vs Val Accuracy with 15 Figure 6.2: Loss vs Val-loss with 15 epochs
epochs
Figure 6.4: Accuracy vs Val Accuracy with 15 Figure 6.5: Loss vs Val-loss with 15 epochs
epochs
Figure 6.7: Accuracy vs Val Accuracy with 15 Figure 6.8: Loss vs Val-loss with 15 epochs
epochs
Figure 6.10: Accuracy vs Val Accuracy with 15 Figure 6.11: Loss vs Val-loss with 15 epochs
epochs
On the training and validation data, we train four pre-trained models with binary
class classification, where label 0 is for normal and label 1 for COVID-19. Accuracy
and loss function on the training data and validation data for the all models are men-
tioned above. The DenseNet201 model exhibits highest The training set’s accuracy
Figure 6.13: Accuracy vs Val Accuracy with 15 Figure 6.14: Loss vs Val-loss with 15 epochs
epochs
is 97.8% among all and the validation data correctness is 96.8% and it also set high-
est test accuracy of 96.1% with binary class classification on covid and non-covid
data. This finding suggests that the model acquire sufficient knowledge throughout
its learning process to accurately predict the outcomes. This outcome shows that the
model can correctly categorise the validation data using the knowledge it has gained
from the training set and also predicts right on unseen data.
vs val-accuracy graph and also relatively same loss vs val-loss graph which shown
in below figures 6.15 and figures 6.16.
Figure 6.15: Accuracy vs Val Accuracy with 30 Figure 6.16: Loss vs Val-loss with 30 epochs
epochs
Below in figure 6.17 is the random output that our model predicted between nor-
mal, covid, pneumonia and lung opacity.
Figure 6.18: Accuracy vs Val Accuracy with 15 Figure 6.19: Loss vs Val-loss with 15 epochs
epochs
Figure 6.20: Accuracy vs Val Accuracy with 30 Figure 6.21: Loss vs Val-loss with 30 epochs
epochs
Below in figure 6.22 is the random output that our model predicted between nor-
mal, covid, pneumonia and lung opacity.
Figure 6.23: Accuracy vs Validation Accuracy Figure 6.24: Loss vs Val loss with 15 epochs
with 15 epochs
Figure 6.25: Accuracy vs Val Accuracy with 30 Figure 6.26: Loss vs Val-loss with 30 epochs
epochs
Below in Figure 6.27 is the random output that our model predicted.
Figure 6.28: Accuracy vs Val Accuracy with 15 Figure 6.29: Loss vs Val-loss with 15 epochs
epochs
Figure 6.30: Accuracy vs Val Accuracy with 30 Figure 6.31: Loss vs Val-loss with 30 epochs
epochs
Below in Figure 6.32 is the random output that our model predicted.
Table 6.3: Multi class classification comparison between previous work and our work
The method that we have suggested focuses on two elements that distinguish
themselves from the other recent efforts. First, we have observed that the research in
question only includes a limited number of COVID-19 photos and an uneven distri-
bution of datasets derived from the gathered datasets. This issue has an impact on the
results, most notably with the differentiation of COVID-19 from the other classes.
We tackled this issue head-on by utilising a well-rounded dataset that contained a
significant number of COVID-19 pictures. This dataset comprises COVID-19 CXR
pictures that have been augmented with data from eleven various sources. There
are a total of 3,700 normal photos, 3,700 pneumonia images, 3,700 COVID-19 im-
ages, and 3,700 lung opacity images in this dataset. Second, we present a technique
called transfer learning, which is derived from a variety of deep learning algorithm
techniques and has shown some encouraging results. Pre-trained DL models like
VGG16, DenseNet201, VGG19, and InceptionV3 are trained, validated, and tested
by our team. We suggest a final layer, sometimes referred to as the head(top / main)
layer, for the pre-trained DL modelss that achieve excellent performance and suit
our data. We were able to attain an accuracy of 95.2% percent for the multi-class
categorization and test accuracy of 87.18%. Even though we are unable to compare
the published studies owing to the fact that each study employs a unique dataset and
set of algorithms, this issue persists because of the fast change that occurs daily in
the chest XR datasets that are available on online sources. This comparison is pro-
vided to highlight the prior research that has been done in this field, as well as the
improvements we have achieved in comparison to the prior work, and to clarify the
limits of the prior study in order to fix them. Last but not least, the results/outcomes
of this study are comparable to the results of the most recent research.
Chapter 7
Conclusion
The detection of the COVID-19 case more quickly and the prevention of the dis-
ease’s spread on the chest are two benefits of employing CXRs to forecast COVID-
19. Within the scope of this investigation, we use transfer learning to train, validate,
and test four widely used DL algorithms. When it comes to classifying CXR pic-
tures from COVID-19, we put the pre-trained models Inception-V3, DenseNet201,
VGG16, and VGG19 through their paces. According to the findings, with binary
class classification The DenseNet201 model exhibits highest The training set’s ac-
curacy is 97.8% among all and the validation data correctness is 96.8% and it also
set highest test accuracy of 96.1% with binary classification on covid and non-covid
data. For multi class classification the DenseNet model gain the highest training
accuracy from the four models is 95.2% accuracy on the train set and among all
VGG-16 gain the highest test accuracy of 87.18%. This was determined by compar-
ing the models’ performance. As a direct consequence of this, our overall test accu-
racy is 87.18% and the train accuracy of 95.2%. In addition, this research presents
the COVID-Chest-X-ray balanced dataset, which was compiled from eleven distinct
sources and had a total of 3700 normal pictures, 3700 pneumonia images, 3700
COVID-19 CXR images following the application of data augmentation and 3700
lung Opacity. In order to solve the problem of an imbalanced dataset, this dataset has
a drastically increase in the amount of COVID-19 photos compared to earlier stud-
ies. In light of our findings, the dataset that we have provided can assist researchers
in training ML and DL models with dataset which is balanced that contains a signif-
icant number of COVID-19 photos. In addition, the collected data can aid medical
professionals in recognising COVID-19 from the CXR at an initial stage, which will
allow them to make judgments more quickly. For the future, we plan to expand
the proposed data set to include additional CXR pictures that come from a wider
variety of diseases as well as increase the number of images in the dataset. If any
open-source data is already accessible, this will be possible.
References
[1] Paules, C.I.; Marston, H.D.; Fauci, A.S, [Coronavirus Infections—More Than
Just the Common Cold ], JAMA 2020, 323, 707.
[4] Rousan, L.A.; Elobeid, E.; Karrar, M.; Khader, Y. [Chest X-ray Findings and
Temporal Lung Changes in Patients with COVID-19 Pneumonia],BMC Pulm.
Med. 2020, 20, 1–9.
[5] Wong, H.; Lam, H.; Fong, A.H.; Leung, S.T.; Chin, T.W.; Lo, C.; Lui, M.M.;
Lee, J.; Chiu, K.W.; Chung, T.W.; et al, [Frequency and Distribution of Chest
Radiographic Findings in Patients Positive for COVID-19. Radiology], 2020,
296, E72–E78.
[6] McBee, M.P.; Awan, O.A.; Colucci, A.T.; Ghobadi, C.W.; Kadom, N.;
Kansagra, A.P.; Trid, A.S.; Auffermann, W.F. [Deep Learning in Radiol-
ogy],Acad. Radiol. 2018, 25, 1472–1480.
[7] Kim, M.; Yan, C.; Yang, D.; Wang, Q.; Ma, J.; Wu, G. [Deep Learning in
Biomedical Image Analysis. In Biomedical Information Technology],Academic
Press: Cambridge, MA, USA, 2020; pp. 239–263.
[8] slam, M.M.; Karray, F.; Alhajj, R.; Zeng, J [A Review on Deep Learning Tech-
niques for the Diagnosis of Novel Coronavirus (COVID-19)] IEEE Access 2021,
9, 30551–30572.
[9] Alafif, T.; Tehame, A.M.; Bajaba, S.; Barnawi, A.; Zia, S[Machine and Deep
Learning towards COVID-19 Diagnosis and Treatment: Survey, Challenges, and
Future Directions.],Int. J. Environ. Res. Public Health 2021, 18, 1117.
[11] Maguolo, G.; Nanni, L[A Critic Evaluation of Methods for COVID-19 Auto-
matic Detection from X-ray Images], Inform. Fusion 2021, 76, 1–7.
[12] Hall, L.; Goldgof, D.; Paul, R.; Goldgof, G.M[Finding COVID-19 from
Chest X-rays Using Deep Learning on a Small Dataset], arXiv 2020,
arXiv:2004.02060.
[13] Apostolopoulos, I.D.; Aznaouridis, S.I.; Tzani, M.A. [Extracting Possibly Rep-
resentative COVID-19 Biomarkers from X-ray Images with Deep Learning Ap-
proach and Image Data Related to Pulmonary Diseases], J. Med. Biol. Eng.
2020, 40, 462–469.
[14] Alam, N.A.; Ahsan, M.; Based, M.A.; Haider, J.; Kowalski, M. [COVID-19
Detection from Chest X-ray Images Using Feature Fusion and Deep Learning].
Sensors 2021, 21, 1480.
[16] Mahmud, T.; Rahman, M.A.; Fattah, S.A. [CovXNet: A multidilation convolu-
tional neural network for automatic COVID-19 and other pneumonia detection
from chest X-ray images with transferable multi-receptive feature optimization.]
Comput. Biol. Med. 2020, 122, 103869
[17] Hussain, E.; Hasan, M.; Rahman, M.A.; Lee, I.; Tamanna, T.; Parvez,
M.Z.[CoroDet: A deep learning based classification for COVID-19 detection
using chest X-ray images.] Chaos Solitons Fractals 2021, 142, 110495.
[18] Ibrahim, A.U.; Ozsoz, M.; Serte, S.; Al-Turjman, F.; Yakoi, P.S.[ Pneumonia
Classification Using Deep Learning from Chest X-ray Images During COVID-
19.] Cogn. Comput. 2021, 1–13.
[20] Wang, L.; Lin, Z.Q.; Wong, A. [COVID-Net: A Tailored Deep Convolutional
Neural Network Design for Detection of COVID-19 Cases from Chest X-ray
Images.] Sci. Rep. 2020, 10, 1–12.
[21] Ahammed, K.; Satu, M.S.; Abedin, M.Z.; Rahaman, M.A.; Islam, S.M.S.
[Early Detection of Coronavirus Cases Using Chest X-ray Images Employing
Machine Learning and Deep Learning Approaches.]medRxiv 2020.
[23] Murugan, R.; Goel, T. [E-DiCoNet: Extreme Learning Machine Based Classi-
fier for Diagnosis of COVID-19 Using Deep Convolutional Network.] J. Ambi-
ent. Intell. Humaniz. Comput. 2021, 12, 8887–8898.
[24] Sekeroglu, B.; Ozsahin, I. [Detection of COVID-19 from Chest X-ray Images
Using Convolutional Neural Networks.] SLAS Technol. Transl. Life Sci. Innov.
2020, 25, 553–565.
[25] Wang, X.; Peng, Y.; Lu, L.; Lu, Z.; Bagheri, M.; Summers, R.M. [ChestX-ray8:
Hospital-Scale Chest X-ray Database and Benchmarks on Weakly-Supervised
Classification and Localization of Common Thorax Diseases.] In Proceedings
of the 2017 IEEE Conference on Computer Vision and Pattern Recognition
(CVPR), Honolulu, HI, USA, 21–26 July 2017.
[26] Kermany, D.S.; Goldbaum, M.; Cai, W.; Valentim, C.C.; Liang, H.; Baxter,
S.L.; Zhang, K. [Identifying medical diagnoses and treatable diseases by image-
based deep learning. ] Cell 2018, 172, 1122–1131.
[28] Cohen, J.P.; Morrison, P.; Dao, L.; Roth, K.; Duong, T.Q.; Ghassemi, M.
[COVID-19 image data collection: Prospective predictions are the future.]
IarXiv 2020, arXiv:2006.11988.
[29] Wang, X.; Peng, Y.; Lu, L.; Lu, Z.; Bagheri, M.; Summers, R.M. [ChestX-ray8:
Hospital-Scale Chest X-ray Database and Benchmarks on Weakly-Supervised
Classification and Localization of Common Thorax Diseases.] In Proceedings
of the 2017 IEEE Conference on Computer Vision and Pattern Recognition
(CVPR), Honolulu, HI, USA, 21–26 July 2017.
[33] Winther, H.B.; Laser, H.; Gerbel, S.; Maschke, S.K.; Hinrichs, J.B.; Vogel-
Claussen, J.; Meyer, B.C. [COVID-19 Image Repository.] Figshare Dataset
2020.
[35] Shams, M.; Elzeki, O.; Abd Elfattah, M.; Hassanien, A. [Chest X-ray images
with three classes: COVID-19, Normal, and Pneumonia. ] Mendeley Data 2020,
V3.
[36] Simonyan, K.; Zisserman, A. [Very deep convolutional networks for large-
scale image recognition.] arXiv 2014, arXiv:1409.1556.
[37] Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. [Densely connected
convolutional networks.] In Proceedings of the IEEE conference on Computer
Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017;
[39] Yoo SH, Geng H, Chiu TL, Yu SK, Cho DC, Heo J, Choi MS, Choi IH, Cung
Van C, Nhung NV, Min BJ and Lee H (2020) [Deep Learning-Based Decision-
Tree Classifier for COVID-19 Diagnosis From Chest X-ray Imaging.] Front.
Med. 7:427. doi: 10.3389/fmed.2020.00427;
[40] Brinati, D., Campagner, A., Ferrari, D. et al. [Detection of COVID-19 Infection
from Routine Blood Exams with Machine Learning: A Feasibility Study.] J Med
Syst 44, 135 (2020);
[41] Jiang X., Coffee M., Bari A., Wang J., Jiang X., Huang J.J., et al. [Towards
an artificial intelligence framework for data-driven prediction of coronavirus
clinical severity.] Comput. Mater. Continua, 63 (1) (2020), pp. 537-551;
[42] Schwab P., Schütte A.D., Dietz B., Bauer S. [Clinical predictive models for
COVID-19: Systematic study.] J. Med. Internet Res., 22 (10) (2020), Arti-
cle e21439.
[43] Jiang X., Coffee M., Bari A., Wang J., Jiang X., Huang J.J., et al. [Towards
an artificial intelligence framework for data-driven prediction of coronavirus
clinical severity.] Comput. Mater. Continua, 63 (1) (2020), pp. 537-551;
[44] Ozturk T, Talo M, Yildirim EA, Baloglu UB, Yildirim O, Acharya UR (2020)
[Automated detection of COVID-19 cases using deep neural networks with X-ray
images.] Comput Biol Med 121:103792;
[45] Aijaz Ahmad Reshi, Furqan Rustam, Arif Mehmood, Abdulaziz Alhossan,
Ziyad Alrabiah, Ajaz Ahmad, Hessa Alsuwailem, Gyu Sang Choi, [An Effi-
cient CNN Model for COVID-19 Disease Detection Based on X-Ray Image
Classification], Complexity, vol. 2021, Article ID 6621607, 12 pages, 2021.
https://doi.org/10.1155/2021/6621607
7 %
SIMILARITY INDEX
3%
INTERNET SOURCES
4%
PUBLICATIONS
2%
STUDENT PAPERS
PRIMARY SOURCES
1
Mohammad Khalid Imam Rahmani, Fahmina
Taranum, Reshma Nikhat, Md. Rashid Farooqi,
1%
Mohammed Arshad Khan. "Automatic Real-
Time Medical Mask Detection Using Deep
Learning to Fight COVID-19", Computer
Systems Science and Engineering, 2022
Publication
2
Submitted to National Institute of Technology,
Agartala
1%
Student Paper
3
www.mdpi.com
Internet Source 1%
4
Submitted to Monash University
Student Paper 1%
5
Submitted to University of Dundee
Student Paper <1 %
6
WWW.MDPI.COM
Internet Source <1 %
7
clok.uclan.ac.uk
Internet Source <1 %
<1 %
8
"Intelligent Computing Theories and
Application", Springer Science and Business
Media LLC, 2017
Publication
9
Tao Zhou, XinYu Ye, HuiLing Lu, Xiaomin
Zheng, Shi Qiu, YunCan Liu. "Dense
<1 %
Convolutional Network and Its Application in
Medical Image Analysis", BioMed Research
International, 2022
Publication
10
link.springer.com
Internet Source <1 %
11
mdpi-res.com
Internet Source <1 %
12
Dulani Meedeniya, Hashara Kumarasinghe,
Shammi Kolonne, Chamodi Fernando, Isabel
<1 %
De la Torre Díez, Gonçalo Marques. "Chest X-
ray analysis empowered with deep learning: A
systematic review", Applied Soft Computing,
2022
Publication
13
G. H. G. S. A. D. Dhanapala, S. Sotheeswaran.
"Transfer Learning Techniques with SVM For
<1 %
Covid-19 Disease Prediction Based On Chest
X-Ray Images", 2022 2nd International
Conference on Advanced Research in
Computing (ICARC), 2022
Publication
14
Submitted to Universiti Teknikal Malaysia
Melaka
<1 %
Student Paper
15
bura.brunel.ac.uk
Internet Source <1 %
16
Muzammil Khan, Muhammad Taqi Mehran,
Zeeshan Ul Haq, Zahid Ullah, Salman Raza
<1 %
Naqvi, Mehreen Ihsan, Haider Abbass.
"Applications of artificial intelligence in COVID-
19 pandemic: A comprehensive review",
Expert Systems with Applications, 2021
Publication
17
www.researchgate.net
Internet Source <1 %
18
Dimitrios Kollias, Mihalis A. Nicolaou, Irene
Kotsia, Guoying Zhao, Stefanos Zafeiriou.
<1 %
"Recognition of Affect in the Wild Using Deep
Neural Networks", 2017 IEEE Conference on
Computer Vision and Pattern Recognition
Workshops (CVPRW), 2017
Publication
19
ebin.pub
Internet Source <1 %
20
"Image Analysis for Moving Organ, Breast,
and Thoracic Images", Springer Science and
<1 %
Business Media LLC, 2018
Publication