2024 2nd International Conference on Advances in Computation, Communication and Information Technology (ICAICCIT)
A Smart Approach to Pneumonia Detection Using
2024 2nd International Conference on Advances in Computation, Communication and Information Technology (ICAICCIT) | 979-8-3315-4121-7/24/$31.00 ©2024 IEEE | DOI: 10.1109/ICAICCIT64383.2024.10912224
Deep Learning
Naveen Annepaka Poonam Tanwar Enosh Prem Kumar
CSE,SET CSE,SET CSE,SET
Manav Rachna International Institute Manav Rachna International Institute Manav Rachna International Institute
of Research and Studies of Research and Studies of Research and Studies
Haryana, India Haryana, India Haryana, India
annepakanaveen19@[Link] [Link]@[Link] enoshpremkumar@[Link]
Neha Garg Muni Reddy Chinta Rajesh Kumar
CSE,SET CSE,SET University Librarian
Manav Rachna International Institute Manav Rachna International Institute Dr. O P Bhalla Central Library
of Research and Studies of Research and Studies Manav Rachna International Institute
Haryana, India Haryana, India of Research and Studies, Faridabad,
[Link]@[Link] Haryana. librarian@[Link]
Kabita Choudhary
Deepak Saxena The Global University
Integrated Academy of Management Administrative Office: Model Village
and Technology, Ghaziabad, UP Naharlagun
registrar@[Link] Itanagar, Arunachal Pradesh
kabita152010@[Link]
Abstract— Pneumonia is an infection that results in susceptible areas the right care and treatment. X-rays of the
swelling and the buildup of pus or fluid in the air sacs of one chest are thought to be the best way to identify the patient.
or both lungs. Bacteria, viruses, and fungi are among the By examining chest x-rays, computer-assisted diagnostic
infectious organisms that can cause this illness. Depending (CAD) devices are crucial in the diagnosis of pneumonia.
on the causative organism, the patient's general health, and
any underlying diseases, pneumonia can vary greatly in Convolution neural networks and other deep learning
severity and treatment. Different kinds of pneumonia exist, processes can be used to extract relevant characteristics
such as community-acquired pneumonia (CAP) and from photos for image classification applications.
hospital-acquired pneumonia (HAP). Diagnosing usually Epidemics and chronic illnesses have killed countless
requires a physical examination and imaging exams, with people throughout history, causing severe crises that took
treatment depending on the cause—antibiotics are used for years to overcome [1][2]. Over time, infectious diseases
bacterial pneumonia, while supportive care is given for viral within communities can be defined in two different ways:
pneumonia. Prevention involves getting vaccinated and pandemics and outbreaks. Likewise, a pandemic is the
practicing good hygiene habits. Prompt diagnosis and emergence of additional incidents of disease, accident, or
treatment are crucial for vulnerable populations to avoid other health issues than anticipated in a particular area
serious complications from pneumonia. This study seeks a between numerous Ortho particular groups of people during
method to detect pneumonia by using Deep Learning (DL) a given time. The majority of the cases appear to be related.
techniques that concentrate on the behavior and attributes of The epidemic deviates from a pandemic in that it is less
proposed chest x-ray images. The aim of this work is to likely to spread widely and is more contained. One of the
implement various deep learning models such as previous pandemics included pneumonia, a serious illness
Convolutional neural network (CNN), VGG-19, that can lead to a variety of health problems.
MobilenetV2 etc., for classifying a chest X-ray image as
either pneumonia or normal case. The results demonstrate When it comes to forecasting the classification
that CNN achieves the highest accuracy of 99.77%. outcomes, DL is crucial [8]. Similarly, the healthcare
department predicts diseases using several DL models [9].
Keywords- Deep learning, Transfer learning, Pneumonia However, the type of data determines the use of the DL
detection, medical imaging, VGG-19, CNN Neural Networks, X- model. The IN model is the most suitable model for the type
ray, MobilenetV2. of data utilized in the inquiry, as shown by the photos in the
dataset used in the paper. The way people are arranged in
networks and developed to obtain a geographical
I. INTRODUCTION
stratification of attributes, from the lowest to the highest
The bacterium pneumonia is the cause of pneumonia, an level structures, independently and adaptably, is influenced
interstitial lung disease. In India, pneumonia kills one in by the IN, a model for uniform information analysis grids,
three people, according to a WHO survey. The pneumonia like radiographs in the medical division [9] [10][ 11].
detection system is a rapid way to diagnose pneumonia. The Additionally, the state-of-the-art model is introduced in
doctor can establish whether or not the patient has section II. The datasets and methods utilized in the
pneumonia with the use of X-ray imaging. Radiologists look suggested strategy for pneumonia classification and
for white patches in the lungs, which are a sign of an prediction are described in Section III. In addition, section
infection, when performing X-ray inspections. Accurate and IV has discussed the performance measures and the
timely pneumonia detection is essential for giving outcomes. Finally, section V has covered the conclusion.
979-8-3315-4121-7/24/$31.00 ©2024 IEEE
842
Authorized licensed use limited to: VTU Consortium. Downloaded on April 08,2025 at [Link] UTC from IEEE Xplore. Restrictions apply.
The main contribution of this research is: 87.02% and 98.8% for the datasets from the Radiological
Society of North America (RSNA) and Germany,
• Training different Deep Learning Models for
respectively. Using three distinct classification processes—a
classification.
fully connected layer for image classification as Poola et al.
• Comparative analysis between CNN, VGG-19 and
MobilenetV2 in classifying pneumonia cases. [18] have introduced an ensemble hybrid DL system that
• Analyzing classification metrics such as Accuracy, consists of an SVM, radial basis function, and logistic
Precision, and Recall of CNN, VGG-19 and regression[18]. The weights that are used to extract the
MobilenetV2. features from the photos have been established in the second
This paper is organized in multiple sections, phase.
Introduction, Related Work, Methodology, Results and
Lastly, the computer-aided model has been used to
Discussion.
classify CXR images. To predict pneumonia using CXR
pictures, Mabrouk et al. [19] built a DL model by
II. LITERATURE REVIEW integrating the Dense Net 169, MobileNetV2, and Vision
This section reports on studies that use ensemble and pre- Transformer models. The photographs were subjected to
trained models to predict pneumonia in CXR pictures. feature extraction using the three models, and the retrieved
Pneumonia was categorized using various single and group features were subsequently used in the experiment. Lastly,
learning methods. To solve a particular task, ensemble the computer-aided model has been used to classify CXR
learning combines several models into a single model; the images. Mabrouk et al. [19] have expanded a DL model by
models chosen are based on the demands and features of the combining the Dense Net 169, MobileNetV2, and Vision
problem being solved. These days, ensemble models are Transformer models to predict pneumonia using CXR
often employed for prediction tasks like classification and images. The experiment was conducted using the
regression. Increased accuracy can be obtained by training characteristics that were derived from the photographs using
one model individually within an ensemble. Specifically, the three models.
this study found that an ensemble of some of the models III. DATASET
exhibited higher accuracy.
The dataset for this study was obtained from one of the
A deep convolutional neural network (CNN) approach several deep-learning contests offered by Kaggle [20]. The
was employed by Ahmad et al. [12] to extract characteristics collection includes lung X-ray images of neonates aged one
from the CXR radiography dataset. The data was to five. The lung medical facility was verified by medical
categorized using AUC, which demonstrated the severity of experts. All chest X-rays were part of the patient's routine
the patient's medical conditions. AUC, which stands for clinical care. Of the 5856 identified pictures in the dataset,
AUC, is used to indicate the conclusion. Comparing the Fl- 4273 showed signs of pneumonia, whereas the remaining
score findings to the Chex Net method, the average actual 1583 were negatives—only during training, Figure -1 shows
median value was (Fl-score)0.387, which is far lower. The the glimpse of x-ray images classified as pneumonia and
proposed CNN approach for detecting pneumonia and normal cases. A generative adversarial network was used to
pointed out that the model could exaggerate the real-world create more pictures for the minority class as a result of the
prediction accuracy of pneumonia. In the experiment, an dataset's imbalance. No produced photos were used to assess
AUC of 0.931 was received. Through the combination of the algorithm. The scans were all single-channel intensity
the ResNet50V2 and XceptionNet models, Rahimzadeh et images with sizes ranging from 1346 × 1044 to 2090 x 1858
al. [14] created a deep CNN framework that predicts pixels. In order to conform to the required input of the
efficiency-based outcomes. A comparison with other majority of CNN network topologies, all pictures were
existing models revealed a maximum accuracy of 91.4% converted to the 224x224x3 format.
within the results. To identify pneumonia, a CNN algorithm
has been created. Leracitano et al. [15].
IV. FOUNDATION OF PROPOSED WORK
The chest X-ray data and fuzz pictures are used to The objective of this work is to construct a CNN without
extract features using this model. In addition, an accuracy transfer learning or pre-trained weights. Although most
rate of up to 81% was obtained when the suggested model CNN architectures reported in the literature place dropout
was compared to previous methods. Inf-Net techniques may layers only in the fully connected dense region of the
perform significantly better, according to Zhang et al.'s network, our network uses a dropout layer that is carefully
evaluation [16] of several Al-based pneumonia detection placed in the convolutional portion of the network, which is
algorithms following a comprehensive examination of the a significant departure [3].
available algorithms. Compared to earlier design methods,
Kundu et al.'s [17] use of an ensemble of three CNN A network is said to be overfitting if it learns the details
frameworks—Res Net, Dense Net, and Google Net—to of the training set too well and cannot generalize to the test
detect pneumonia produced positive results. The study set. It happens when the model learns all of the useful
employed two datasets, yielding accuracy findings of information from the training set of data, even the noise.
843
Authorized licensed use limited to: VTU Consortium. Downloaded on April 08,2025 at [Link] UTC from IEEE Xplore. Restrictions apply.
Fig 1: Examples of Input Images [20]
Fig 2: Impact of Dropout in CNN [3]
To avoid the model being too reliant on one or a limited respective subfolders. The limited size of the validation set,
number of single parameters, neurons are deliberately which includes only 16 images. Fig 4 represents statistics of
ignored throughout each training session. pneumonia and normal cases
The graphs in Fig. 2 depict dropout in a simple feed
forward neural network where each node's dropout rate
inside its layer is set at 0.5 as considered. When using this
dropout rate, each node in that layer has a 50% chance of
being disregarded during that specific training phase. It is
likely that a dropout rate between 0% and 50% will be
chosen which is observed in dense layers due to the fact
that thick layers have more parameters than convolutional
layers. In this work, the dropout layer integrated into the
convolutional part of the CNN model and analyse its
behaviour with respect to the VGG-19 and Mobilenet
models [13] and VGG-19 model with incremental
unfreezing fine tune.
Fig.4: Nature of Dataset
V. METHODOLOGY Step 2: Data Pre-processing- The pre-processing steps are
The following section explains the methodology utilized to done so as to have uniformity in the dataset which is
detect the pneumonia cases. The methodology consists of beneficial in maintaining consistency during training The
various steps as explained below and represented in Fig.3: grayscale conversion is done on each image for ease of use
and also resized to a size of 255. The images are
Step 1: Data Splitting- The data collection has been divided standardized by scaling pixel values to fall within the
into train, validation, and test subsets. Initially the training range of 0 to 1. A class imbalance prevailed in the dataset
set held 5216 images while the validation set comprised of due to the higher number of pneumonia cases than the
16 images; finally, the testing set contained 624 images
respectively. The images are categorized into two classes,
PNEUMONIA and NORMAL, with each class stored in
844
Authorized licensed use limited to: VTU Consortium. Downloaded on April 08,2025 at [Link] UTC from IEEE Xplore. Restrictions apply.
Fig. 3: Architecture of Proposed Model
normal cases. To address class imbalance, the class_weight
parameter was applied in [Link](), ensuring that the VI. RESULTS & DISCUSSION
model paid appropriate attention to minority classes. Data The data collection has been divided into train,
augmentation methods such as rotation, zoom, and contrast validation, and test subsets. Initially the training set held
adjustment were also used to enhance the model's 5216 images while the validation set comprised of 16
generalization ability. images; finally, the testing set contained 624 images
Step 3: Overview of Models- respectively.
CNN is deep learning models, that works like human visual The following section provides the experimental results
systems. For tasks involving classification or regression, of four classifiers with their visualizations and their
they include fully connected layers, pooling layers to comparative analysis on four evaluations metric accuracy,
minimise spatial dimensions, and convolutional layers to precision, recall and F1-score. The classifiers namely CNN,
extract information [4]. The most commonly used CNN VGG19, and MobilenetV2 have been applied on the
architectures are AlexNet, ResNet, VGG etc. Here 2 layers acquired dataset.
of Convo2D has been used 1 with 32 filters and another Table 1 is showing the accuracy matrix result for four
with 64 filters of size 3× 3 each. The max pooling 2D of models in terms of precision, F1 score, recall and accuracy
size 2× 2 is used for down-sampling purpose, the Relu and its visualization in Fig.5.
activation is used in dense layer.
TABLE 1. ACCURACY MATRIX OF MODELS.
VGG-19: This deep CNN architecture is well-known for
being easy to use and efficient in image classification Classifier Precision F1 Recall Accuracy
applications. It’s build upon VGG-16 [5]. The 19 layers Score
comprises of three completely linked and sixteen
CNN 0.83 0.73 0.75 0.99
convolutional layers. The max pooling and ReLU activation
layers come after each convolutional layer, which employs MobilenetV2 0.25 0.33 0.5 0.97
tiny 3x3 filters and 2× 2 pooling [6].
VGG19 0.9 0.87 0.88 0.98
Incremental Unfreezing and Fine Tuning VGG-19: It’s a
transfer learning technique for optimization on new dataset. Incremental & Fine 0.94 0.94 0.93 0.96
In the initial phase, the final classification layers are trained Tune VGG19
while keeping pre-trained layers as frozen to retain learning
features. Incrementally the layers are unfrozen from top to
bottom, fine tuning of them made with lower learning rate. The performance matrix has been shown in Table 1 and
This approach is used to reduce the impact of overfitting [6]. showing that all four models are suitable for pneumonia
detection. The CNN provides an accuracy of 99%.
Mobilenet V2: Mobilenet V2 is an effiecient deep learning
architecture for devices like smartphones. It builds upon The analysis of the results obtained with the suggested
mobilenetV1 by adding inverted residual blocks and linear pneumonia prediction model is as follows and ROC curve
bottlenecks to improve accuracy [7]. In this model the has been given in Figure 6:
pointwise convolution performs in opposite manner and is
called as projection layer. Here expansion layer is 1×1
convolution, having more output channels than the input
ones.
845
Authorized licensed use limited to: VTU Consortium. Downloaded on April 08,2025 at [Link] UTC from IEEE Xplore. Restrictions apply.
In order to identify the best course of therapy and
guarantee prompt medicine, this research highlights the
significance of early identification of pneumonia. One of the
most popular ways to diagnose pneumonia is with X-ray
images, but these images are susceptible to cross-variability,
and the diagnosis depends on the clinician's capacity to
identify the disease's early symptoms and reduce the
mortality rate.
REFERENCES
[1] Elasnaoui et al: “Automated styles for discovery and bracket
pneumonia grounded on x-ray images using deep literacy.” In
Artificial intelligence and blockchain for unborn cyber security
operations, Springer, Cham, pp 257- 284, 2021.
[2] Gour and Jain ,“Automated COVID-19 discovery from x-ray and CT
Fig.5. Result of Models images with piled ensemble convolutional neural network.”
Biocybern Biomed Engineering; 4227 – 41, 2022.
1. CNN analyzes X-ray pictures as input and produces [3] Szepesi and Szilágyi,“Detection of pneumonia using convolutional
output images with either a normal caption or a picture of neural networks and deep learning.” Biocybernetics and biomedical
engineering, 42(3), pp.1012-1022, 2022.
pneumonia. Caption pneumonia denotes the presence of
[4] Harshvardhan et al: “Pneumonia detection using CNN through chest
pneumonia, whereas normal denotes the absence of X-ray.” Journal of Engineering Science and Technology (JESTEC),
pneumonia. 16(1), pp.861-876, 2021.
2. When compared to the scenario where each model was [5] Naveen and Diwan, “Pre-trained VGG- 16 with CNN Architecture to
given equal weights, the suggested weighted classifier with classify X-ray images into Normal or Pneumonia”, 2021.
optimal weights demonstrated an improvement in testing [6] Dahmane et al: “Pneumonia detection based on transfer learning and a
accuracy of 0.85%. False positives outnumbered false combination of VGG19 and a CNN built from scratch.” Indonesian
Journal of Electrical Engineering and Computer Science, 24(3),
negatives, which led to a smaller classification error of pp.1469-1480, 2021.
pneumonia patients as healthy—ideal for medical diagnosis. [7] Souid et al: “Classification and predictions of lung diseases from
3. One of the shortcomings of this strategy was the scarcity chest x-rays using mobilenet v2.” Applied Sciences, 11(6), p.2751,
of available data. Thousands of photos are usually used to 2021.
train deep learning models. Insufficient data used to train [8] Lakhani and Sundaram,"Deep literacy at casket radiography
deep neural networks can lead to overfitting and restrict the automated bracket of pulmonary tuberculosis by using convolutional
neural networks", Radiology, vol. 284, no. 2, pp. 574- 582, 2017.
models' capacity to generalize. The proposed technique
[9] Esteva et al.," A companion to deep literacy in healthcare", Nature
performance would only become better as more data became Medicine, vol. 25, no. 1, pp. 24- 29, 2019.
accessible. [10] Varshni et al: "Pneumonia Detection Using CNN- grounded point
birth",IEEE International Conference on Electrical Computer and
Communication Technologies (ICECCT), pp. 1- 7, 2019.
[11] Ross et al: "Automated image processing system for the opinion and
bracket of malaria on thin blood smears", Medical and Biological
Engineering and Computing, vol. 44, no. 5, 2006.
[12] Article “World Health Organization. “Revised WHO bracket and
treatment of nonage pneumonia at health installations substantiation
summaries.” Geneva World Health Organization”, 2014.
[13] Reshan, Gill et al: “Detection of pneumonia from chest X-ray images
utilizing mobilenet model.” In Healthcare (Vol. 11, No. 11, p. 1561).
MDPI, 2023.
[14] Rahimzadeh, and Rezai, “Phage Therapy to Prevent Nosocomial
Bacterial Pneumo-nia in Patients with Severe COVID-19 in 2020.”
Journal of Mazandaran University of Medical Sciences, 28(165),
pp.203-212.
[15] Ieracitano et al: “A fuzzy-enhanced deep learning approach for early
detection of Covid-19 pneumonia from portable chest X-ray images."
Neurocomputing, 481, pp.202-215, 2022.
[16] Chen et al: “An effective deep neural network for lung lesions
segmentation from COVID-19 CT images.” IEEE Transactions on
Industrial Informatics, 17(9), pp.6528-6538, 2021.
Fig. 6: ROC Curves for Classifiers [17] Islam et al: “Encephalitis in patients with COVID-19: a systematic
evidence-based analysis.” Cells, 11(16), p.2575, 2022.
VI. CONCLUSION [18] Poola et al: “SyntDiaNet: Integrating feature extraction, transfer
learning and classifier-embedded generative adversarial network for
The implementation of CNN algorithms and deep advanced pneumonia diagnosis.” Multimedia Tools and Applications,
learning techniques revolutionizes pneumonia detection by pp.1-39, 2024.
streamlining the analysis of X-ray images. These models
automate the diagnostic process, saving time and reducing [19] Mohamed et al: “Combination of essential oil and ciprofloxacin to
the workload for clinicians while enhancing accuracy and inhibit/eradicate biofilms in multidrug ‐ resistant Klebsiella
consistency. This improved efficiency enables early and pneumoniae.” Journal of applied microbiology, 125(1), pp.84-95,
more reliable detection, allowing patients to take timely 2018.
preventive actions and receive the appropriate treatment. [20] Mooney, "Chest X-Ray Images (Pneumonia)," Kaggle
Ultimately, these advancements contribute to better disease [Link]
management, leading to improved patient care and outcomes. pneumonia, 2018.
846
Authorized licensed use limited to: VTU Consortium. Downloaded on April 08,2025 at [Link] UTC from IEEE Xplore. Restrictions apply.