You are on page 1of 5

2021 International Conference on Smart Generation Computing, Communication and Networking (SMART GENCON)

Pune, India. Oct 29-30, 2021


2021 International Conference on Smart Generation Computing, Communication and Networking (SMART GENCON) | 978-1-6654-2503-2/21/$31.00 ©2021 IEEE | DOI: 10.1109/SMARTGENCON51891.2021.9645844

PNEUMONIA DETECTION USING DEEP


LEARNING
1st Krishna More 2nd Prathamesh Jawale 3rd Shubham Bhattad
Xavier Institute of Engineering, Mahim Xavier Institute of Engineering, Mahim Xavier Institute of Engineering, Mahim
Mumbai, India Mumbai, India Mumbai, India
krishnaaaxo@gmail.com prathameshjawale741@gmail.com shubham.bhattad33@gmail.com

4th Jaychand Upadhyay


Assistant Professor in Information Technology
Xavier Institute of Engineering, Mahim
Mumbai, India
jaychand.u@xavier.ac.in

Abstract—Analysis and diagnosis has a major importance in use for analysis) to be finished to get wi-fi bandwidths[2].
the medical Industry. Timely diagnosis plays a very crucial Deep getting to know strategies have caused plenty hobby in
role whenever lives of the patient are concerned. Pneumonia is its utility to the scientific imaging area because it well-known
sometimes fatal lung infection which can be fatal many times so
an early and efficient diagnosis with high accuracy is required. shows the distinctive picture functions that aren’t feasible
Real life method of detecting pneumonia are very trivial so there from authentic pics. Convolutional neural network(CNN)
is need for a system by using deep-learning has been a driving is found to be dependable in big agencies of studies
force for making this project. In this paper, we propose different and communities. CNN is implemented for category of
deep convolutional neural network(CNN) architectures to extract various styles of radiograph pics and detection in numerous
features from images of chest X-ray and classify the images to
detect presence pneumonia in a person with a higher accuracy. pathologies. Getting to know strategies have come to be
For this research work we have used the real world dataset properly favoured because of the provision of the deep CNN
contributed by the National library of medicine for research networks, that could attain higher overall performance in
work. Through this paper we want to show that with the help numerous applications.This approach has a downside of
of deep learning can help us in detecting disease in early stages wanting big datasets to educate the models. Transfer getting
which makes it ideal for treatment, which was not possible in
the early era of diagnosis. to know surpasses the problem through making use of the
understanding throughout the education system and habilitate
Index Terms—Pneumonia, CNN, Neural Networks, Transfer the deep CNN with much less quantity of data. We employ
Learning, VGG16, VGG19, XCEPTION, InceptionResNet V2, this idea for pneumonia detection in chest X-ray pics the
Chest X-Ray, Radiology, Radiologists, Neurons, Classification usage of pre-skilled models (such as: AlexNet, DenseNet121,
InceptionV3, ResNet18) on ImageNet dataset[3]. Hence, the
I. I NTRODUCTION converging impact of DeepLearning with the CS ends in
Over the years, pneumonia signs and symptoms retain to faster sign acquisition along side an confident development
a disorder of doubtlessly excessive morbidity and mortality, in analysis accuracy that’s ideal.
sparing no youngsters or healthful adults. There are over 5
hundreds of thousands instances every year within the United
States, with about 50,000 deaths are attributed to the 6th main II. R ELATED W ORK
motive of loss of life from infectious diseases[1]. To discover Chest X-rays are difficult to interpret and require
pneumonia, chest X-ray is utilized by the respective field professional radiologists. Many researchers are trying to
practitioners as imaging modality. But, Accurate Analysis automate X-ray analysis. A group of researchers developed a
of X-Rays wishes right Radiologists in practice. Rough deep learning framework to classify images of degenerative
Estimation of the World Health Organization(WHO) shows and diabetic retinopathy in February 2018 and normal chest
that thirds of the humans within the globe can not avail a X-rays[5]. The model was trained on pediatric chest X-rays
radiologist for analysis in their disorder yet. It could show 5232 images, of which 3883 are pneumonia, 1349 are normal,
very useful for an automatic device to locate it successfully and the accuracy rate is 92.8%. In the 2018 RNA Pneumonia
to manual scientific practitioners. To provide right scientific Challenge held on kaggle, the winner was committed to using
offerings in far flung villages, frequently imaging to be a fully folded network to detect and locate pneumonia on
executed at one stop and the scientific advisors are present on chest X-rays. The object recognition function is grafted[6].
the a long way stop which wishes transmission of pics over The deep learning algorithms they developed are generally
wi-fi channels. A long way stop picture reconstruction (for more accurate than radiologists in detecting pneumonia

978-1-6654-2503-2/21/$31.00 ©2021 IEEE 1


Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY CALICUT. Downloaded on August 26,2023 at 16:45:37 UTC from IEEE Xplore. Restrictions apply.
and other acute diseases[7]. For the detection of childhood learning and convolutional neural networks. The following
pneumonia, among the recently proposed transfer learning models are described in detail: A Basic CNN The neural
methods, the deep networking method is the first choice. network is made up of many tiny units known as neurons.
Chest X-rays were used for classification, yielding a value of These neurons are organized in a layered structure forming
96.7% and a f1 value of 92.7%[8]. Researchers rely on pure neural networks. Optimization methods are used on any of the
CNN without learning transfer to classify pneumonia images neural architecture nodes that contain weights such as back-
with an accuracy of 93.73%[9]. Another study proposed a propagation with the help of hyper-parameter tuning. When
deep learning architecture that uses chest X-rays to classify training the model, Each CNN model is made up of two parts
pneumonia, and used convolutional neural networks and 1. The classification part and 2. The convolutional part.
residual network architectures to properly classify images. In • The convolutional neural network is formed by building
several other areas, according to the line in addition to chest a layered neural network called convolutional layers.
X-rays, CNN and DL have made outstanding contributions. Convolutional layers use a filter of defined size to extract
various features. Scanning of images is performed by
III. DATASET D ESCRIPTION moving the filters according to the indicated steps. In the
study model, 6 convolution layers with 32, 32, 64, 64,
The Dataset used in this study was categorized.As a result,
124, 128 filters were used. Step 1 was used in conjunction
into two categories One category is allotted to pneumonia, with
with 3 × 3 size 2D convolution filters on each layer.
4273 images, and normal X-ray, with 1583 images. The X-ray
• Batch Normalisation: Batch normalisation is a technique
images were obtained through the facility of the Department of
that’s mostly used to Increase the models learning rate.
Health and Human Services Montgomery County, Maryland,
The input is normalized in this layer. in all models,
in the United States of America. The primary photographs
after every convolutional stage,Batch normalization is
were high definition However, for computing purposes and
employed on every layer of the neural network.
for quicker performance, the images were resized to 224x224
• Pooling: The pooling technique is used to reduce the
pixels for training.The data was distributed into two In the
resolution of the functional map obtained from the fold-
training set, 70% of the photos were used and 20% in the
ing sheet. In general, two grouping methods are used:
evaluation set and the remaining 10% in the validation set
maximum grouping and average grouping. In the simple
after balancing and enhancement of data.
CNN model, each convolutional layer with a grouping
filter of size 2x2 uses the maximum grouping.
• Activation: The activation function is used at the end of
a shift for the non-linear transformation of the inputs.
ReLU is the most widespread activation function in
convolutional neural networks. ReLU was used at the
end of each layer and in the last layer with two sigmoid
activation layers.
• Dropout: This method which is used to lessen overfitting
of the mode is known as Dropout. Using dropout, a few
nodes within the layer are arbitrarily selected to reside
inactive for a few instances. In this way, it prevents the
Fig. 1. Count Plot of Training Set version from getting too familiar with the data. A dropout
of 0. Five turned into utilized in dense layers for type on
this study.
• Dense Layers: The output of the convolution layer
is flattened and made available to the dense layer as
input. Convolution layers essentially extract features and
functional classification from images is carried out by
dense layers. The simple CNN architecture consists of
two dense layers with 32 nodes each and a last layer
with 2 nodes.

Fig. 2. Sample X-Rays from Dataset F ORMULAE


A. 1D convolution
IV. M ETHODOLOGY
w

Four models were trained and developed using the same (f ∗ g )(t) = fx .gt−x
 (1)
data set. The methodology used in the models was transfer x=−w

2
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY CALICUT. Downloaded on August 26,2023 at 16:45:37 UTC from IEEE Xplore. Restrictions apply.
B. 3D convolution 2) XCEPTION: The Xception CNN turned into made
through Google Giant. as an “excessive” successor of the
 Inception models. Inception modules defined within the
(F ∗ G)(t) = Fx,y,z .Gtx −x,ty −y,tz −z (2) preceding line are changed with intensity sensible sepa-
x y z rable convolutions. This Xception turned into proven to
C. Sigmoid do better than Inception on a greater-scale photo class
dataset (consisiting hundreds of thousands of photos of
1 almost 17k classes).
S(x) = (3) 3) INCEPTIONRESNET V2: The InceptionResNetV2
1 + e−x
CNN[9] is a aggregate of the Inception and Resnet
D. ReLU
structure with the purpose of accomplishing excessive
class overall performance the use of a Resnet structure
f (x) = max(x, 0) (4) with surprisingly little computation fee of the Inception
E. Max Pool structure.

f (t, X) = max Xijk (5) VI. OUTPUT AND RESULTS


tx −w≤i≤tx +w
ty −w≤i≤ty +w In this case study we have used architecture of pretrained
tz −w≤i≤tz +w models to train on our dataset for classification and detection
F. Average Pool of pneumonia. The models are VGG19, VGG16, Inception-
RestNetV2 and Xception. In our comparison we can see that
t ty +w t
VGG19 model outperforms all the other models and here is
x +w  z +w
Xijk the train accuracy and loss of the VGG19 model.
f (t, X) = (6)
8w3
i=tx −w j=ty −w k=tz −w

G. Dense Layer TABLE I


C OMPARISON OF D IFFERENT M ODELS

f (x) = ReLU (W x + b) (7) Models Accuracy Loss


VGG19 94.38 1.0011
H. L2
InceptionResNetV2 91.25 0.4766
 1/2 Xception 88.75 0.4077

||x||2 = (x2i ) (8) VGG16 85.00 1.2905
i

I. L1

||x||1 = (|xi |) (9)
i

V. ALGORITHMS
To, discover the maximum suitable version for this project,
we focused on vividly famous pretrained models, which might
be appropriate for switch mastering, already to be had from
depended on sites like kaggle and keras libraries. Fortunately,
those pretrained are all to be had as part of the Keras API
and every pillar switch mastering with the shape of helping
the pre-software to the version of the ImageNet weights.
1) VGG16 AND VGG19: VGG16 and VGG19 depict con-
volutional neural network architectures with very tiny
convolution filters(3x3) and a tread of one considered
Fig. 3. Accuracy of Different Models
to attain an excessive accuracy in huge photo popularity
applications. There are implementations of this version
which has variations intensive of convolution or max-
pooling and absolutely related layers, with VGG16
means that there are sixteen layers within the base
version and VGG19 has 19 layers.

3
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY CALICUT. Downloaded on August 26,2023 at 16:45:37 UTC from IEEE Xplore. Restrictions apply.
TABLE II
P ERFORMANCE S CORES OF VGG19

Precision Recall F1-score Support


NORMAL 0.94 0.68 0.79 234
PNEUMONIA 0.84 0.97 0.90 390
ACCURACY 0.87 624
MACRO AVG 0.89 0.83 0.85 624
WEIGHTED AVG 0.88 0.87 0.86 624

Fig. 4. Loss of Different Models

Fig. 7. ROC Curve of VGG19

Fig. 5. Training Accuracy and Loss of VGG19 LIMITATIONS


Even though the effects received have been immensely
The matrix to check the model performance are shown overwhelming, there have been nonetheless few barriers
below: in our version which have been too crucial to hold out
of consideration. The first and primary largest challenge
is that there may be no records of the related affected
person pondered in our assessment version. Moreover,
the X-rays which used have been handiest the frontal
photographs however sideways photographs assessment has
a variety of significance in drawing out conclusions for
radiologists[10]. Thirdly, for the reason that version has a
variety of convolutional layers, the version calls for very
excessive computational strength in any other case it’ll take
a variety of time for computation process.

CONCLUSION
Company of specialized radiologists is obligatory for
correctly diagnose any form of thoracic disease. This paper
entirely ambitions to enhance the clinical adeptness in
regions in which the provision of radiotherapists remains
limited,in which it is able to be used efficiently. Our observe
enables the early analysis of Pneumonia to save you negative
results which incorporates demise in far flung regions. The
Fig. 6. Confusion Matrix of VGG19 improvement of algorithms on this area may be extraordinarily
useful for offering higher health-care services. Our version
ambitions to obtain a better accuracy than the preceding
fashions and papers which makes it greater feasible to use.
With the succession of experiments conducted, we aim to
produce the dominating pre-trained CNN model and classifier
for the future work purposes in the similar domain. Our study

4
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY CALICUT. Downloaded on August 26,2023 at 16:45:37 UTC from IEEE Xplore. Restrictions apply.
will possibly lead to the development of superior algorithms
for detecting Pneumonia in the future.

R EFERENCES
[1] Charles H. Nightingale, Paul Ambrose, Thomas M. File, Jr. (2003).
Community Acquired Respiratory Infections, CRC Press, Taylor &
Francis e-Library.U.S.A.

[2] S. S. Kar and S. P. Maity, “Gradation of diabetic retinopathy on


reconstructed image using compressed sensing,” IET Image Processing,
vol. 12, no. 11, pp. 1956–1963, 2018.

[3] V. Chouhan, S. K. Singh, A. Khamparia, D. Gupta, P. Tiwari, C.


Moreira, and V. H. C. D. A. RobertasDamaeviius, “A novel transfer
learning based approach for pneumonia detection in chest X-ray
images,” Applied Sciences, 2020, https://doi.org/10.3390/app10020559.

[4] Kermany, Daniel S., et al. ”Identifying medical diagnoses and treatable
diseases by image-based deep learning.” Cell 172.5 (2018): 1122-1131.

[5] The DeepRadiologyTeam,2018 RSNA Pneumonia Challenge,


Pneumonia Detection in Chest Radiographs, 21 Nov 2018.

[6] Liang, Gaobo, and LixinZheng. ”A transfer learning method with


deep residual network for pediatric pneumonia diagnosis.” Computer
Methods and Programs in Biomedicine (2019).

[7] Stephen, Okeke, et al. ”An Efficient Deep Learning Approach


to Pneumonia Classification in Healthcare.” Journal of healthcare
engineering 2019 (2019).

[8] Saul, Can Jozef, DenizYagmur Urey, and Can DorukTaktakoglu.


”Early Diagnosis of Pneumonia with Deep Learning.” arXiv preprint
arXiv:1904.00937 (2019).

[9] C. Szegedy, S. Ioffe, V. Vanhoucke, and A. Alemi, “Inception-v4,


inception-resnet and the impact of residual connections on learning,” in
Proc. of the AAAI Conf. on Artificial Intell. San Francisco, California,
USA: AAAI Press, 2017, p. 4278–4284. doi: 10.5555/3298023.3298188

[10] Suhail Raoof, David Feigin, Arthur Sung, Sabiha Raoof, Lavanya
Irugulpati, and Edward C Rosenow III. 2012. Interpretation of plain
chest roentgenogram. Chest 141, 2 (2012), 545558.

5
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY CALICUT. Downloaded on August 26,2023 at 16:45:37 UTC from IEEE Xplore. Restrictions apply.

You might also like