0% found this document useful (0 votes)
16 views32 pages

Identification and Classification of Pneumonia

Pneumonia is a bacterial, fungal, or viral infection that affects one or both lungs. It is a serious disease in which the air sacs in both lungs become clogged with pus and other substances. So, several frameworks and models have been built to properly assess such diseases, but there is still space for improvement.

Uploaded by

eduardo cerron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views32 pages

Identification and Classification of Pneumonia

Pneumonia is a bacterial, fungal, or viral infection that affects one or both lungs. It is a serious disease in which the air sacs in both lungs become clogged with pus and other substances. So, several frameworks and models have been built to properly assess such diseases, but there is still space for improvement.

Uploaded by

eduardo cerron
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Identification and Classification of Pneumonia

using CNN Model with Chest X- ray Image


Suraj Kumar (  [email protected] )
Madan Mohan Malaviya University of Technology
Shiva Prakash
Madan Mohan Malaviya University of Technology

Research Article

Keywords: Deep Learning, Pneumonia, CNN, Chest X-ray image, ReLU, Augmentation

Posted Date: February 28th, 2023

DOI: https://doi.org/10.21203/rs.3.rs-2602640/v1

License:   This work is licensed under a Creative Commons Attribution 4.0 International License.
Read Full License

Page 1/32
Abstract
Pneumonia is a bacterial, fungal, or viral infection that affects one or both lungs. It is a serious disease in
which the air sacs in both lungs become clogged with pus and other substances. So, several frameworks
and models have been built to properly assess such diseases, but there is still space for improvement. In
this study, we used CXR images to train a CNN model to detect and classify Pneumonia disease in the
lungs and also present how training accuracy and validation accuracy as well as training loss and
validation loss vary when changing the size of the input image. The Kaggle CXR dataset is used, which
was already created and pre-processed. The Convolutional Neural Network method is used in the research
in close collaboration with some other data augmentation frameworks to enhance classification
accuracy, which also will help to enhance training and validation accuracies, as well as characterize the
precision of the Convolutional Neural Network model and achieve various results. The training and
validation accuracy of our model are 0.9757 and 0.9568, respectively, and the training and validation loss
are 0.0857 and 0.1399.

1. Introduction
A lung disease known as pneumonia infection can have a variety of reasons. Pneumonia infection can be
carried out by viruses, bacteria, and fungi. Also, it mostly kills children which are at the age of five all
around the world[1]. The three types of pneumonia infections are bacterial pneumonia, viral pneumonia,
and fungal pneumonia.

Bacterial Pneumonia

The bacteria may live in the bodies of healthy persons and cause disease only after immunity has been
reduced by other infections or illnesses. Patients with bacterial pneumonia frequently get a high fever
initially, along with chills, chest pain, a cough, and breathing difficulties. Coughing emerges as the main
symptom as the illness develops. The most typical type of pneumonia is bacterial pneumonia. The
patient's sputum is typically developed for the organism, and a chest X-ray is typically used to determine
the diagnosis.

Viral Pneumonia

Influenza, parainfluenza, and respiratory syncytial viruses are the main causes of viral pneumonia. A
runny nose, loss of appetite, and minimal fever are indications of this pneumonia which are typically
followed by respiratory obstruction and cough. Chest X-rays and a physical exam are used to determine
the diagnosis. The main form of treatment for nonbacterial pneumonia is supportive care.

Fungal Pneumonia

Skin testing is part of the initial inspection for patients with lung issues, and tuberculosis should always
be considered as a concern in any patient with fungal pneumonia. Coccidioidomycosis and

Page 2/32
histoplasmosis are two other fungi that should be taken into consideration, especially if the patient has
lately been exposed to dust storms, backyard swimming pools, old outbuildings or barns, or excavations.

About 18% of all deaths in kids under five are brought on by pneumonia, which damages the lungs[2] over
65-year-olds had a 93 death per 1 lakh population mortality rate. Globally, 150 million individuals suffer
from pneumonia each year, and if reasonable steps aren't taken, deaths could result[2],[3].

For example, there is a shortage of 2.3 million nurses and doctors across Africa's 57 countries[3]. Fast
and accurate clinical diagnosis is critical for these people. It can provide timely treatment access while
also saving much-needed money and time for individuals who are already poor.

CRX imaging is the most often used method for detecting pneumonia. CXR analysis, on the other hand, is
a complex and biased approach. We developed a computer-aided detection model that uses chest X-ray
images to automatically identify pneumonia in this study. This method has proved to be one of the most
effective for a wide range of people, signifying the best pneumonia disease treatment with excellent
results. Many architectures and models have previously been developed to analyse such disorders[4]. To
achieve the most favourable outcomes from all other approaches, various experimental procedures were
applied. The tools used to identify and diagnose such disorders, on the other hand, are complex and time-
consuming. Deep learning[5] algorithms that are often employed are essentially a subset of ANN
(artificial neural network), which have remarkable strength and variety in the learning process[6]. To
prevent problems, a new but vital model is well-known for executing faultless acquiring attempts with
substantial neural architecture evolution. Consistently predicted pneumonia detection and image
classification were carried out using the neural network model. This model is built on convolutional
neural architecture computation, which uses a configurable number of neurons to co-relate on a specific
image and focuses on crucial information from them. Our research indicates exceptional success in a
variety of ways, including how the objective of the combination was integrated and distinguished, as well
as how the pneumonia diagnostic procedures were enhanced. The Convolutional Neural Network (CNN)
is a famous neural network with multiple layers, one of which is the max pooling layer. These layers
facilitate the accurate identification of X-ray images. It also contains the Rectified Linear Unit (ReLU)
layer, which assists in the improvement of nonlinear properties. It is an ideal architecture for dealing with
both 2D and 3D images. It is similar to the fixed network of the trial-and-error approach. CNN first
emerged in 2012, with only eight layers when AlexNet has published it. The number of layers was later
increased to 152. CNN is typically used to handle image-related issue. One of the primary purposes of
using the CNN approach was to help in the automatic identification of crucial part without the
requirement of human interference. The CNN technique works very well uses minimal processing power
since it allows for parameter sharing and includes multiple layers. The next step is to simultaneously stop
and lessen the effects of overfitting. Overfitting happens when a system is unable to effectively adjust for
a variety of reasons. It is an important factor in most, but not all, AI systems, and every effort must be
taken to minimize its effects. A CNN model should be constructed with the purpose of reducing overfitting
and underfitting while maintaining generalizability to be the optimal model selection. Using fewer

Page 3/32
parameters minimizes the risk of overfitting concerns in the model, which will eventually help to improve
the overall predictive presentation of the design model.

The remaining study divides into the following sections: Section II defines several functions in the field of
neural network using CNNs. The CNN approach used in our model is explain in Section III. Section IV
outlines the functionality of the CNN architectural models. Section V then examines several major uses of
CNN models in the real-world. The various materials as well as techniques employed in the
experimentation with the proposed architecture are explained in Section VII, such as image, the dataset
used, and so on. Section VIII discusses the result of our model in detail. Finally, Section VIII of the paper
concludes along with fundamental concept of applying CNN soon in the future.

1.1 Research Challenges of Pneumonia Infection


Identification:
Scaling of Images-

For biomedical image classification challenges, such a massive quantity of labelled data is difficult to
gather since it requires that professional clinicians classify each picture, which is a costly and time-
consuming operation. Transfer learning is a task to conquer this problem. There are various types of
images that fit into separate categories. So, scaling processes on specific images become tough. As a
consequence, the vast variety of picture classes leads to poor scaling operation.

Image Quality Deterioration-

The feature extraction quality of the pictures may decline when large size filters are needed for image
classification.

Cost Effectiveness-

For image classification, fully - connected layers are used, however their computation is expensive.
Therefore, as the number of layers rises, the model's price will also increase.

Feature Map Selection-

It is feasible that there will be several feature maps developed for every layer, which tends to lead the
production of many parameters.

Lack of Infrastructure-

The inconsistency in devices and frameworks is a key problem with CNNs

Insufficient Information-

Due to a lack of data and image databases, inaccurate results are produced.
Page 4/32
Similarity in features-

Pneumonia disease has several similar characteristics with other diseases.

2 Literature Survey
The authors[1] proposes and developed Deep Convolutional Neural Network framework for the detection
of pneumonia using CXR images of patients. 7000 CXR images are used in the model's training process,
and 200 images are used in the testing phase.v Author also compare proposed model with other models
(AlexNet, RestNet, and InceptionNet).

The authors[2] proposed four models: LSTM, CNN, MobileNetV2 and RestNet152V2 to predict the
pneumonia disease using Kaggle CXR dataset and also calculated the accuracy, precision, recall and F-1
score.

The authors[3] building a new CNN model to categorise images from the CXR dataset and extract
attributes to determine whether a person has pneumonia was remarkable. It used several data
augmentation techniques to improve the CNN model's classification and validation performance.

The authors[7] presents a new framework to detect pneumonia from a chest X-ray, also combine radiomic
characteristics and contrastive learning to propose a unique framework and get 87.7% accuracy on the
proposed new model.

The authors[8] build a hybrid model (combine ImgNet and SqeezeNet) to predict pneumonia from chest-X
ray images, author uses 4000 normal chest-X ray images and 4000 pneumonia chest-X ray images.

The authors[9] build CNN model to predict pneumonia using chest-X ray images and handling the
problem of overfitting with the help of data augumentation techniques.

The authors[10] predict the pneumonia disease based on CNN and transfer learning model, use data
augmentation for handling the problem overfitting compare with the other pneumonia classification
techniques.

The authors[11] propose a CNN to predict the COVID-19 and pneumonia, train and test the model on
publicly available CXR dataset and calculate the sensitivity, accuracy, specificity, recall, F1 score and
precision of the model. Average accuracy of used model is 94.07%.

The authors[12] objective is to create a solid and effective strategy to identify pneumonia based on chest
X-rays to help the chest doctor in the decision making of speed, accuracy and include segmentation,
detection, classification, prediction.

The authors[13] proposed a technique for determining the presence and type of pneumonia by analyzing
chest radiographs and performing a classification centred on features that has several data of the
sample and employing an augmentation method to adjust the sample size of the dataset, to find the
Page 5/32
characteristics that are most relevant, a feature selection method was also employed and the final
classification was completed using the random forest classifier.

The authors[14] build a deep learning model for detecting pneumonia using chest-X ray radiographs and
also used bivariate linear mixed models to pool diagnostic estimates including [15]specificity (SP),
positive likelihood ratio (PLR), sensitivity (SE), diagnostic odds ratio (DOR) and negative likelihood ratio
(NLR).

The authors[16] presented a study paper that analyses and identifies pneumonia using a convolutional
neural network based on chest X-ray images. In the implementation, max-pooling layers were employed
after six convolutional layers. Using fewer convolutional layers in the deep learning model for quicker
computation and classification was inspired by this.

The authors[17] used Bayesian model to improve computing performance by carefully downscaling the
architectures while the search and reinforcing the characteristics common to prior successful
architectures and combination of these two key contributions enables the efficient building of competitive
designs that beat both automatically and manually constructed structures on quantify image
classification.

The authors[18] propose a computational technique for detecting pneumonia regions using, single-shot
detectors, multi-task learning, augmentations, deep CNN, and squeeze-excitation.

The authors[19] explain a DeepConv-DilatedNet-based techniques for identifying and localising


pneumonia in (CXR) images.

The authors[20] investigate the nature of the problem by observing deep learning classification
techniques trained on three-dimensional computed tomography datasets from various countries to
recognise COVID-19 pneumonia cases.

The authors[21], present a lightweight deep learning (DL) strategy that employs a pretrained DenseNet-
121-based feature extraction approach as well as a deep neural network (DNN)-based technique with a
random search fine-tuning mechanism to predict pneumonia.

The authors[22] employing a substantial amount of CXR of human lungs with COVID-19 pneumonia,
influenza virus pneumonia, and regular biomarkers, develop an accurate CNN model for classification of
pneumonia patients and COVID-19 patients.

Page 6/32
Table 1
A summary of recent work applying a convolutional neural network to detect and identify pneumonia.
Ref. Year Purpose Model Use Average Dataset
Accuracy Use

[2] 2020 Classification of There are four model used CNN, 94.92% Kaggle
Pneumonia RestNet152V2, LSTM and CXR
MobileNetV2 respectively dataset

[3] 2019 Classification of Only CNN model used 93.01% Unknown


Pneumonia

[9] 2020 Detection of CNN model used 92.31% Kaggle


Pneumonia CXR
dataset

[16] 2020 Classification of CNN model used 94.36% Kaggle


Pneumonia CXR
dataset

[8] 2022 Classification of There are four model used CNN, 95.40% Kaggle
Pneumonia ImgNet, BoxNet, SqueezeNet CXR
respectively dataset

[13] 2021 Detection and Random Forest model used 86.30% Unknown
Classification of
Pneumonia

[10] 2021 Detection of Two model Deep Neural Network and 96.70% Kaggle
Pneumonia Transfer Learning used CXR
dataset

[7] 2021 Detection of There are five model used: CNN, 82.88% Kaggle
Pneumonia ResNet-18AttRadi, ResNet-18, ResNet- CXR
18Att, ResNet-18Radi dataset

3 Architecture Of Cnn
A class of deep neural networks called convolutional neural networks (CNN) is most frequently used to
assess visual imagery. The information will be accompanied by images, according to CNN's fundamental
principle. These architectures would be helpful for managing various types of data by using several
datasets. A flowchart explaining how each layer is applied is shown in Fig. 1. The primary difference is
that the CNN method uses neurons that are active in depth and spatial dimensionality, which are in three
dimensions (size and width)[23]. The profundity is the third element of an initiating volume, not the total
number of layers inside the ANN. In contrast to ordinary ANNs, neurons inside a random layer can
communicate with a short portion of the layer preceding it. CNN is made up of three main types of layers.
These are pooling layers, convolutional layers, and fully linked layers. When these layers are linked, a CNN
model is developed. The CNN's function has been divided into four major functions, which are described
below:

First, layer is input layer which stores the images' pixel values.
Page 7/32
The convolution layer then help to determine the results of several neurons connected to
neighbouring regions. The regions associated to input volume as well as their weights must then be
computed as a scalar multiplication. The activation function, which is comparable to the sigmoid
function, the output of the activation of the preceding layer, is implemented by the ReLU, which
comes after, component by component.
Using a pooling layer, the input sample and spatial dimensionality are then downscaled, and the
different parameters are decreased before the picture is divided in half inside that activation.
Finally, the fully connected layer generates the serval activation value. layer's primary purpose of this
is to classify the image by using the convolutional or pooling layer's output. Every other neuron
provides a categorization label, and the resulting results are collected in the output layer.

4 Functions Of Cnn Layers


4.1 Convolution Layer
The convolutional layer, which is also where the majority of processing happens, is the fundamental
component of a CNN. It needs a filter, input data and a feature map among other things. Pretend the input
is a colour image formed up of a 3D pixel matrix. A three-dimensional input will then be produced—width,
depth and height— which, in an image, are comparable to RGB. Additionally, the receptive fields of the
image will be scanned by a feature detector to assess whether the feature is present. This detector is also
known as a filter or kernel. This procedure is described by a convolution layer.

When data passes through a convolution layer, it convolves every filter throughout the spatial dimensions
of the input, producing in a two-dimensional activation map. This map includes all of the image pixel
values. Convolution layer may rapidly minimize model complexity by optimizing the outputs for almost
any model. Zero padding, depth, and stride are the three main hyperparameters that may be used in this
optimization strategy. When the three parameters are used, we can easily minimize the dimensionality
and size of the convolutional layer parameters created. The below formula used to implement all the
parameters provided by K O' Shea[15]

Where, V is size of the input, R represents the size of receptive field, Z the quantity of zero padding
provided, and stride is S.

4.2 Pooling Layer


In addition to carrying out numerous operations that minimise the parameters and complexity of the
provided images, this layer is largely leads to lowering the whole dimensionality and characteristics of

Page 8/32
image. It runs over the given input to the activation map and then uses the MAX function to scale out the
dimensionality. The max pooling layer contributes to a 25% reduction in the size of the activation map
even as maintaining its depth volume. In CNN architecture, there will be two types of pooling: general
pooling and overlapping pooling. The pooling layer destroys a large amount of information, but it also
benefits CNN in a number of ways. This layer improve efficiency, decrease complexity and reduce the
likelihood of overfitting.

4.3 Fully Connected (FC) Layer


Each neuron on every layer is linked to neurons on the previous layer. The output from feature extraction
is produced with the help of the fully connected layer and transferred to the output layer. The
classification process is carried out by this layer using the features that were obtained from the prior
layers and their corresponding filters. FC layers commonly employ a SoftMax activation function to
classify inputs accurately; this function generates a probability between 0 and 1.

5 Applications Of Cnn
Image classification is belonging to the most important tasks performed by CNNs in the current
environment using several feature extraction and data augmentation strategies.
Among the most essential applications is recognition of speech, which uses automated devices to
recognise speech.
CNNs are frequently utilised for data with limited processing resources. With growing classification
accuracy, a number of techniques are still being evaluated on small datasets.
CNNs are apply to process low-resolution images. Many researchers have suggested various
strategies for working with low-resolution images using CNN.
CNN are applied to detect the object in order to identify the items. The CNNs are also used for image
segmentation.
CNNs are applying in NLP for language analysis, modelling of language, and designing of language.
CNN approaches help in deciding the numerous meanings of every text in order to better understand
the client's requirements. This helps in the creation of artificial systems capable of executing
complicated tasks efficiently.

6 Materials And Methodology


6.1 Problem definition
The main components of the classification challenge's issue statement are a collection of CXR and
categorizing the images using various data augmentation techniques. It becomes very challenging to
correctly classify those images according to their characteristics and features because there are different
images connected to various classes. The two most important problems are classifying the images with

Page 9/32
much greater accuracy and less data loss and characterizing the image based on its features. No
information must be lost as a result of the classification process. But precisely classifying the images
becomes incredibly difficult.

6.2 Datasets
The dataset has 5856 images total and is split into three main folders: training, testing, and validations.
The pneumonia folder and the normal folder are two additional divisions of this folder. The execution of
numerous types of implementations on images has benefited greatly from the augmentation
methodology. The anterior and posterior chest images were taken from a retrospective study of paediatric
patients between the ages of 1 and 6 years. The goal of this experiment was to increase training
accuracy, validation accuracy while reducing validation loss and training loss. The main goal of using
this CXR dataset is to obtain images of patients who have pneumonia disease. To maintain the portion of
multiple datasets, the validation and training sets of the original dataset are modified. The validation and
training data have been reorganised as a result. Overall, there were 5216 images in the training set, 624 in
the test set, and 8 in the validation set. The validation accuracy as well as training accuracy has been
greatly enhanced by this change. On the various classes of CXR images, the classification method is
employed. The classes are divided into a number of subclasses, each of which has two different types of
images. In one group, there are images of individuals with pneumonia, while in the other, there are images
of individuals without the pneumonia disease.

Page 10/32
6.3 Pre-processing
In order to perform this operation, original data (also known as raw data) must be transformed before
being sent to the algorithms. When a dataset is obtained from different sources, it is in unstructured form
(raw format). Pre-processing is needed because the raw images are insufficient for analysis at this point.
It involves changing each dataset from different perspectives and includes all of the dataset's larger
instances. It enables one to increase the dataset's success size. Changes are typically chosen at random
from a predetermined collection.

6.4 Data Augmentation


This approach mainly helps researchers extend the variety of the data for different data models.
Augmentation approaches, which are placed to use during the neural network training, also includes
cropping, shifting, rotating, padding, and flipping of the data. The proposed methodology makes
advantage of various data augmentation methods. This first procedure involves a rescale of the image to
1/255. It makes use of the Additional 0.2 width and height shifts. Additionally, zoom range, shear range,
vertical flip and horizontal flip are employed. When we run image input through a neural network, there
are various visuals that show how we could have wanted the network to aggregate or condense into
multiple numbers or loads. These flags or highlights are the pixels that make up the image's object as a
result of image classification. We do not want the neural power to focus on certain features of the images
when developing their shape, though (the synopsis or summarization is the load arrangement). Due to the
features of the image, these noises or highlights are the pixels that make up the image. With the help of
data augmentation, several operations on the data can be performed to increase the accuracy of the
classification of the image. This method may improve the data and provide some insightful information
for best results. Images are flipped, altered, and rotated to provide a clear idea. By employing
augmentation to create several copies of the same images, the training set can be made larger. By
making the training dataset perform better, this will help in generalising the data.

Page 11/32
Table 3
Image Augmentation
Setting
Operations Values

Shear Range 0.2

Rescale 1/255

Horizontal Flip True

Vertical Flip True

Zoom Range 0.2

Width-Shift 0.2

Height-Shift 0.2

Range Shear 0.2

6.5 Model
The proposed CNN architecture consists of many layers, including max pooling, classification layers, and
some Convolution layers. The following feature extractor layers are as following: conv 3x3, 32, conv 3x3,
64, conv 3x3, 128, conv 3x3, 256, and ReLU activators. The outcome of the max pooling and
convolutional layers is then changing into feature maps, which are in two-dimensional planes used for
the pooling and convolutional operations. 100x100x3 150x150x3 200x200x3 250x250x3 and 300x300x3
are the image's specified input sizes. The plane of every layer was also created by combining previous
planes that occurred in prior levels. The Sigmoid Activation Function, which is preserved with the models
at the end, serves as the classifier in this method. It also is known by the term an ANN model due to its
extremely thick layers. The squashing function is another name for this function. By limiting the output
range to the area ranging from 0 and 1, It helps in the probability' future projection. Additionally, the
classifier included into this model needs distinctive properties for each classification-related calculation.
Thus, the feature extraction procedure generates a longer feature vector plane, which is then deployed in
the classification procedure. The "flattening process" incorporates rescaling the output of the feature
extraction process back into the one-dimensional feature extractor planes. Additional component of the
classification layer used for the final image classification include the dense layer flattening layer, ReLU
activator, sigmoid sfunction and dropout of 0.5. Also used is the size 0.5 dropout feature, followed by
layers of sizes 512 and 1. Additionally, by integrating the ReLU function and sigmoid activation function,
the proposed method divides the images into pneumonia and normal images. The use of the CNN
architecture in conjunction with data augmentation techniques has made a significant contribution to
reducing validation loss and improving accuracy.

7 Results

Page 12/32
After running the code for long time, various result comes. The code takes 7 to 8 hours to run. We change
various parameters for improving the various accuracy, as well as reducing the loss of our proposed
model. There is various type of data augmentation also used in this research. Some learning rates also
changes in order to handling the dataset for fitting into the proposed CNN model. Various conclusions
and results were obtained, so this study indicates that this research is valid research. Image size
100x100x3 150x150x3 200x200x3 250x250x3 and 300x300x3 are reshaped and trained for several
hours before the average and efficient performance shown in the experiment.

We present all obtain results in the Table 4. In our proposed CNN model, the average training accuracy:
0.9757, average training loss: 0.0857, the average validation loss: 0.1399, and the validation accuracy:
0.9568. The result of Table 4 also show that, if change the image size then the accuracy and loss of the
model also changes. So, in our research image size 200X200X3 show the best and most efficient result.
We also present the accuracy and loss graph below for all image size used in this research.

Table 4 Accuracy and Loss of the Model

Size of Image Training Accuracy Validation Accuracy Training Loss Validation Loss

100X100X3 0.9761 0.9593 0.0873 0.1330

150X150X3 0.9737 0.9580 0.0837 0.1401

200X200X3 0.9826 0.9601 0.0775 0.1370

250X250X3 0.9731 0.9527 0.0895 0.1437

300X300X3 0.9729 0.9539 0.0905 0.1459

Average 0.9757 0.9568 0.0857 0.1399

In the Fig. 3 and Fig. 4 the result for given input image of size 100X100X3, which shows the accuracy and
loss. The validation accuracy and training accuracy of image size 100X100X3 are 0.9593 and 0.9761.
The training loss and validation loss for image size 100X100X3 are 0.0873 and 0.1330 respectively.

Figure 5 and Fig. 6 shows the accuracy and the loss of the input image size 150X150X3. The training
accuracy: 0.9737, validation accuracy: 0.9580, training loss: 0.0837 and validation loss: 0.1401.

In the Fig. 7 and Fig. 8 the input image size is 200X200X3 and the training accuracy, validation accuracy,
training loss, and validation loss are 0.9826, 0.9601, 0.0775 and 0.1370 respectively. This result is the
best result obtain in this research.

In the Fig. 9 and Fig. 10 the input image size is 250X250X3. The obtain result of training accuracy,
validation accuracy, training loss and validation loss are 0.9731, 0.9527, 0.0895 and 0.1437 respectively.

The input image size of Fig. 11 and Fig. 12 is 300X300X3. The training accuracy: 0.9729, validation
accuracy: 0.9539, training loss: 0.0905 and validation loss: 0.1459.
Page 13/32
In the Fig. 13 and Fig. 14 we plot the accuracies and losses of all input image size.

Figure 15 represents the plot for every given input size to CNN approach. CNN's model is beneficial. in the
fast implementation of algorithm, resulting in improved optimal configuration for various training
accuracies and training data. It stated that whenever any of the CNN algorithms used data augmentation
techniques, the results are improved. In Fig. 15, it shows that for different -different input image size,
accuracy of training and validation changes. So, it is clear that for any image size, validation and training
accuracies as well as validation and training losses always changes.

Figure 16 shows the number of people who infected by pneumonia and not infected by pneumonia.
CNN's model is beneficial in the faster algorithmic execution, enhanced optimization outcomes for
various training datasets.

8 Conclusion
This paper presents detailed literature survey, comparison of well-known diagnosis methods, as well as a
model of CNN based methodology. The proposed method presented the more accurate diagnosis of
pneumonia patients, and this proposed method using CNN methodology is also computationally efficient.
This study explores the way for further enhancement for better identify and detection of pneumonia and
lung cancer from CXR images. In this research accuracy for image size 100X100X3, 150X150X3,
200X200X3, 250X250X3, 300X300X3 are 97.61%, 97.37%, 98.26%, 97.31%, 97.29% respectively. In this
research we check the accuracy and loss for different image size. So, this proposed model shows that if
we change the image size, then accuracy and loss always change. The prospective solutions to well-
known problems are the real challenges to be an excellent research topic.

Declarations
Author Contribution Suraj Kumar wrote the manuscript and reviewed the manuscript. Shiva Prakash lead
the work, wrote and reviewed the manuscript.

Acknowledgment This research is not received any financial support.

Data Availability The authors declare that they have used publicly available ‘Chest X-Ray Images
(Pneumonia)’ for present work, which is available
online https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia.

Ethical Approval Not applicable.

Consent to participate Not applicable.

Consent for publication Not applicable.

Conflict of interest The authors declare no competing interests.

Page 14/32
References
1. T. Rajasenbagam, S. Jeyanthi, and J. A. Pandian, “Detection of pneumonia infection in lungs from
chest X-ray images using deep convolutional neural network and content-based image retrieval
techniques,” J. Ambient Intell. Humaniz. Comput., no. 2016, 2021, doi: 10.1007/s12652-021-03075-2.
2. N. M. Elshennawy and D. M. Ibrahim, “Deep-Pneumonia Framework Using Deep Learning Models
Based on Chest X-Ray Images,” Diagnostics, vol. 10, no. 9, pp. 1–16, 2020, doi:
10.3390/diagnostics10090649.
3. O. Stephen, M. Sain, U. J. Maduh, and D. U. Jeong, “An Efficient Deep Learning Approach to
Pneumonia Classification in Healthcare,” J. Healthc. Eng., vol. 2019, 2019, doi:
10.1155/2019/4180949.
4. G. Verma and S. Prakash, “Internet of Things for Healthcare: Research Challenges and Future
Prospects,” in Advances in Communication and Computational Technology, 2021, pp. 1055–1067.
5. A. Raj, S. Prakash, J. Srivastva, and R. Gaur, “Blockchain-Based Intelligent Agreement for Healthcare
System: A Review,” in International Conference on Innovative Computing and Communications, 2023,
pp. 633–642.
6. R. Gaur, S. Prakash, S. Kumar, K. Abhishek, and M. Msahli, “A Machine-Learning – Blockchain-Based
Authentication Using,” pp. 1–19, 2022.
7. Y. Han, C. Chen, A. Tewfik, Y. DIng, and Y. Peng, “Pneumonia detection on chest X-ray using radiomic
features and contrastive learning,” Proc. - Int. Symp. Biomed. Imaging, vol. 2021-April, no. 3, pp. 247–
251, 2021, doi: 10.1109/ISBI48211.2021.9433853.
8. A. H. Alharbi and H. A. Hosni Mahmoud, “Pneumonia Transfer Learning Deep Learning Model from
Segmented X-rays,” Healthcare, vol. 10, no. 6, p. 987, 2022, doi: 10.3390/healthcare10060987.
9. S. Shah, H. Mehta, and P. Sonawane, “Pneumonia detection using convolutional neural networks,”
Proc. 3rd Int. Conf. Smart Syst. Inven. Technol. ICSSIT 2020, no. Icssit, pp. 933–939, 2020, doi:
10.1109/ICSSIT48917.2020.9214289.
10. S. Krishnamurthy, K. Srinivasan, S. M. Qaisar, P. M. D. R. Vincent, and C. Y. Chang, “Evaluating Deep
Neural Network Architectures with Transfer Learning for Pneumonitis Diagnosis,” Comput. Math.
Methods Med., vol. 2021, 2021, doi: 10.1155/2021/8036304.
11. R. Murugan and T. Goel, “E-DiCoNet: Extreme learning machine based classifier for diagnosis of
COVID-19 using deep convolutional network,” J. Ambient Intell. Humaniz. Comput., vol. 12, no. 9,
pp. 8887–8898, 2021, doi: 10.1007/s12652-020-02688-3.
12. A. M. A. Barhoom, P. Samy, and S. A. Naser, “Diagnosis of Pneumonia Using Deep Learning,” Int. J.
Acad. Eng. Res., vol. 6, no. 2, pp. 48–68, 2022, [Online]. Available: www.ijeais.org/ijaer
13. M. Masud et al., “A Pneumonia Diagnosis Scheme Based on Hybrid Features Extracted from Chest
Radiographs Using an Ensemble Learning Algorithm,” J. Healthc. Eng., vol. 2021, 2021, doi:
10.1155/2021/8862089.

Page 15/32
14. Y. Li, Z. Zhang, C. Dai, Q. Dong, and S. Badrigilan, “Accuracy of deep learning for automated detection
of pneumonia using chest X-Ray images: A systematic review and meta-analysis,” Comput. Biol.
Med., vol. 123, no. June, 2020, doi: 10.1016/j.compbiomed.2020.103898.
15. K. O’Shea and R. Nash, “An Introduction to Convolutional Neural Networks,” no. December, 2015,
[Online]. Available: http://arxiv.org/abs/1511.08458
16. G. Verma* and S. Prakash, “Pneumonia Classification using Deep Learning in Healthcare,” Int. J.
Innov. Technol. Explor. Eng., vol. 9, no. 4, pp. 1715–1723, 2020, doi: 10.35940/ijitee.d1599.029420.
17. Z. Lu et al., “Multiobjective Evolutionary Design of Deep Convolutional Neural Networks for Image
Classification,” IEEE Trans. Evol. Comput., vol. 25, no. 2, pp. 277–291, 2021, doi:
10.1109/TEVC.2020.3024708.
18. T. Gabruseva, D. Poplavskiy, and A. Kalinin, “Deep learning for automatic pneumonia detection,” IEEE
Comput. Soc. Conf. Comput. Vis. Pattern Recognit. Work., vol. 2020-June, pp. 1436–1443, 2020, doi:
10.1109/CVPRW50498.2020.00183.
19. S. Yao, Y. Chen, X. Tian, and R. Jiang, “Pneumonia Detection Using an Improved Algorithm Based on
Faster R-CNN,” Comput. Math. Methods Med., vol. 2021, 2021, doi: 10.1155/2021/8854892.
20. D. Nguyen et al., “Deep Learning–Based COVID-19 Pneumonia Classification Using Chest CT Images:
Model Generalizability,” Front. Artif. Intell., vol. 4, no. June, pp. 1–12, 2021, doi:
10.3389/frai.2021.694875.
21. B. Almaslukh, “A Lightweight Deep Learning-Based Pneumonia Detection Approach for Energy-
Efficient Medical Systems,” Wirel. Commun. Mob. Comput., vol. 2021, 2021, doi:
10.1155/2021/5556635.
22. J. Antonchuk, B. Prescott, P. Melanchthon, and R. Singh, “COVID-19 Pneumonia and Influenza
Pneumonia Detection Using Convolutional Neural Networks,” pp. 1–6, 2021, [Online]. Available:
http://arxiv.org/abs/2112.07102
23. A. K. Tripathi and A. K. Tiwari, “Prediction of Neurological Disorders using Deep Learning: A Review,”
no. Icacse 2021, pp. 135–139, 2022, doi: 10.5220/0010564100003161.

Figures

Page 16/32
Figure 1

Flowchart of CNN Model

Page 17/32
Figure 2

CNN Architecture

Page 18/32
Figure 3

Legend not included with this version

Page 19/32
Figure 4

Legend not included with this version

Page 20/32
Figure 5

Legend not included with this version

Page 21/32
Figure 6

Legend not included with this version

Page 22/32
Figure 7

Legend not included with this version

Page 23/32
Figure 8

Legend not included with this version

Page 24/32
Figure 9

Legend not included with this version

Page 25/32
Figure 10

Legend not included with this version

Page 26/32
Figure 11

Legend not included with this version

Page 27/32
Figure 12

Legend not included with this version

Page 28/32
Figure 13

Legend not included with this version

Page 29/32
Figure 14

Legend not included with this version

Page 30/32
Figure 15

Legend not included with this version

Page 31/32
Figure 16

Number of Cases of Pneumonia and Normal in Dataset

Page 32/32

You might also like