0% found this document useful (0 votes)
62 views33 pages

Epics 2

This document is a project report submitted for a Bachelor of Technology degree in Computer Science and Engineering. It describes the development of a Pneumonia Prediction System using deep learning models. The project uses convolutional neural network models like ResNet and InceptionNet to analyze chest X-ray images and predict whether a patient has pneumonia. By comparing the performance of different models, InceptionNet achieved the highest accuracy of over 90%. Future work includes comparing additional models and developing a dashboard application for pneumonia prediction using X-ray images with the most accurate model.
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)
62 views33 pages

Epics 2

This document is a project report submitted for a Bachelor of Technology degree in Computer Science and Engineering. It describes the development of a Pneumonia Prediction System using deep learning models. The project uses convolutional neural network models like ResNet and InceptionNet to analyze chest X-ray images and predict whether a patient has pneumonia. By comparing the performance of different models, InceptionNet achieved the highest accuracy of over 90%. Future work includes comparing additional models and developing a dashboard application for pneumonia prediction using X-ray images with the most accurate model.
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/ 33

Pneumonia Prediction System

Mini Project report submitted in partial fulfillment of the Requirements for


the Award of the Degree of
BACHELOR OF TECHNOLOGY
In

COMPUTER SCIENCE AND ENGINEERING


Submitted by

L. Sumanth Varma 198W1A0594


E. Kavya 198W1A0578
N. Vijaya 208W5A0510

Under the Guidance of

Mr. Ch. Mukesh


Assistant Professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


VELAGAPUDI RAMAKRISHNA SIDDHARTHA ENGINEERING
COLLEGE
Autonomous and Approved by AICTE, NAAC A+, NBA Accredited
Affiliated to Jawaharlal Nehru Technological University, Kakinada
Vijayawada 520007
2022
VELAGAPUDI RAMAKRISHNA SIDDHARTHA
ENGINEERING COLLEGE
(Autonomous, Accredited with ‘A+’ grade by NAAC)
Department of Computer Science and Engineering

CERTIFICATE

This is to certify that the Mini Project Report entitled ”Pneumonia Prediction Sys-
tem” being submitted by
L. Sumanth Varma 198W1A0594
E. Kavya 198W1A0578
N. Vijaya 208W5A0510
in partial fulfilment for the award of the Degree of Bachelor of Technology in Computer
Science and Engineering to the Jawaharlal Nehru Technological University, Kakinada, is a
record of bonafide work carried out during the period from 2022 - 2023.

Mr. Ch. Mukesh Dr.D.Rajeswara Rao, M.Tech, Ph.D

Assistant Professor& Guide Professor & HOD,CSE

i
DECLARATION

We hereby declare that the project entitled “PNEUMONIA PREDICTION SYSTEM” sub-
mitted for the B. Tech Degree is our original work and the dissertation has not formed the
basis for the award of any degree, associateship, fellowship or any other similar titles.

Place: Vijayawada L. Sumanth Varma(198W1A0594)

Date: 25-10-2022 E. Kavya(198W1A0578)

N. Vijaya (208W5A0510)

ii
ACKNOWLEDGEMENT

Behind every achievement lies an unfathomable sea of gratitude to those who activated
it, without whom it would ever have come into existence. To them we lay the words of
gratitude imprinted with us.

We would like to thank our respected Principal, Dr.A.V. Ratna Prasad and Dr.D.
Rajeswara Rao, Head of the Department, Computer Science and Engineering for their
support throughout our Project.

It is our sincere obligation to thank our guide Mr. CH. Mukesh, Assistant Professor,
Department of Computer Science and Engineering for his timely valuable guidance and
suggestions for this Project.

We owe our acknowledgements to an equally long list of people who helped us in this
Project. Finally, we wish to thank all the supporting staff who gave us facility in lab for the
completion of this Project.

Place: Vijayawada

Date: 25-10-2022

iii
Abstract

Pneumonia is a respiratory infection resulting in inflammation of the Lungs. Viruses, bacte-


ria, or fungi could be to blame for this infection’s sickness. Pneumonia can range in intensity
from nonthreatening to fatal. The most vulnerable demographics include infants and young
children, seniors, those with health issues, and people with weakened immune systems. Early
detection of pneumonia disease is essential for ensuring curative care and boosting survival
rates. The most common approach for diagnosing pneumonia is a chest x-ray. However,
the examination of chest radiographs is a subjective and difficult task. In this study, Con-
volutional Neural Network, Resnet, Inception Net was used for the analysis, as a result by
comparing the above-mentioned models we got the accuracy more than 90Inception Neural
Network. By these results new model has come up with the accuracy of the more than
90Future work includes the comparison of other models, among them Models with highest
accuracy is chosen to design and develop the Dash Stream Application for the prediction of
Pneumonia using X-ray images.

Keywords: Pneumonia, Chest X-ray, Convolutional Neural Network (CNN), Resnet, In-
ception Net, Dash Stream Application.

iv
Table of Contents

1 INTRODUCTION 1
1.1 Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 LITERATURE SURVEY 5
2.1 A Novel Method for Multivariant Pneumonia Classification Based on Hybrid
CNN-PCA Based Feature Extraction Using Extreme Learning Machine With
CXR Images [1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Intelligent Pneumonia Identification From Chest X-Rays: A Systematic Lit-
erature Review [2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Detection and Classification of lung diseases for pneu- monia and Covid-19
using machine and deep learn- ing techniques [3] . . . . . . . . . . . . . . . . 7
2.4 Interpretable Puemonia Detection by combining Deep Learning and Explain-
able Models with Mul- tisource data [4] . . . . . . . . . . . . . . . . . . . . . 8
2.5 Detection of Puemonia Infection in Lungs From Chest X-ray images using
Deep Convolutional Neu- ral Network and content-based image Retrieval
Tech- niques [5] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 Identification and classification of pneumonia dis- ease using a deep learning-
based intelligent com- putational framework [6] . . . . . . . . . . . . . . . . 10
2.7 Pneumonia Detection Proposing a Hybrid Deep Convolutional Neural Net-
work Based on Two Par- allel Visual Geometry Group Architectures and
Machine Learning Classifiers [7] . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.8 Pneumonia Detection Using Convolutional Neural Networks [8] . . . . . . . . 12

3 ANALYSIS AND DESIGN 13


3.1 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Non-Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 PROPOSED SYSTEM 15
4.1 Proposed System Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Proposed Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

v
4.4 Process Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5 Software Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5 IMPLEMENTATION 19
5.1 Output Screen Shots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6 CONCLUSION AND FUTURE WORK 22

REFERENCES 23

vi
List of Figures

1.1 Architecture of CNN [16] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


1.2 Architecture of DenseNet [17] . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Architecture of VGG16 [18] . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Architecture of Residual Networks [19] . . . . . . . . . . . . . . . . . . . . . 3
1.5 Architecture of inceptionNet [20] . . . . . . . . . . . . . . . . . . . . . . . . 3

4.1 Proposed System Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


4.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 process Flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.1 CNN graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19


5.2 ResNet graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.3 InceptionNet graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.4 Graph for comparison of models . . . . . . . . . . . . . . . . . . . . . . . . . 21

vii
List of Tables

5.1 Comparison between models . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

viii
Chapter 1
INTRODUCTION

This chapter contains the information about basic concepts,problem statement,scope and
objective of our project. Here we briefly explained about important concepts used in our
project and gave clear problem statement. We also explained about the scope and objective
of our project.

1.1 Basic Concepts


Image Preprocessing
Before training, we’ll first modify your images to be better suited for training a convo-
lutional neural network. For this task we’ll use the Keras ImageDataGenerator function to
perform data preprocessing and data augmentation.

Convolutional Neural Networks


Computer Vision can be realized using Convolutional neural networks (CNN) They are
neural networks making features extraction over an image before classifying it. The feature
extraction performed consists of three basic operations: Filter an image for a particular fea-
ture (convolution) Detect that feature within the filtered image (using the ReLU activation)
Condense the image to enhance the features (maximum pooling) .

Figure 1.1: Architecture of CNN [16]

1
DenseNet
Densenet is a convolutional network where each layer is connected to all other layers that
are deeper in the network: The first layer is connected to the 2nd, 3rd, 4th etc. The second
layer is connected to the 3rd, 4th, 5th etc.

Figure 1.2: Architecture of DenseNet [17]

Visual Geometry Group


Presented in 2014, VGG16 has a very simple and classical architecture, with blocks of 2
or 3 convolutional layers followed by a pooling layer, plus a final dense network composed of
2 hidden layers (of 4096 nodes each) and one output layer (of 1000 nodes). Only 3x3 filters
are used.

Figure 1.3: Architecture of VGG16 [18]

Residual Networks
ResNet, short for Residual Networks is a classic neural network used as a backbone for
many computer vision tasks. The fundamental breakthrough with ResNet was it allowed us
to train extremely deep neural networks with 150+layers successfully.

2
Figure 1.4: Architecture of Residual Networks [19]

InceptionNet
Inception net achieved a milestone in CNN classifiers when previous models were just
going deeper to improve the performance and accuracy but compromising the computational
cost. The Inception network, on the other hand, is heavily engineered. It uses a lot of tricks
to push performance, both in terms of speed and accuracy

Figure 1.5: Architecture of inceptionNet [20]

3
1.2 Problem Statement
• Pneumonia is one of the hazardous diseases that lead to life insecurity. It needs to be
diagnosed at the initial stages to prevent a person from more damage and help them
save their lives.

• In this we are using the Chest X-ray which is most widely used method to diagnose
pneumonia and is considered one of the most reliable approaches.

• To analyze chest X-ray images accurately, an expert radiologist needs expertise and
experience in the desired domain. However, human assisted approaches have some
drawbacks: expert availability, treatment cost, availability of diagnostic tools, etc.
Hence, the need for an intelligent and automated system comes into place that operates
on chest X-ray images and diagnoses pneumonia.

1.3 Scope
• The project is aimed to detect the pneumonia from X-ray images of human.

• The proposed model will provide better accuracy for detecting the pneumonia.

• This can be extended to develop a mobile application in future.

1.4 Objectives
• Our main objective is to develop a system that operates on chest X-ray images and
diagnoses pneumonia.

• This model first extracts useful features from the images and then classifies them in to
normal and pneumonia classes.

• To develop a dash stream application to detect the pneumonia.

1.5 Advantages
• The main advantage of this is to detect the pneumonia using the convolution neural
network.

• This will reduce the human error while examine the chest x-ray of the patient.

• By this method we can detect the disease early and take the necessary precautions.

4
Chapter 2
LITERATURE SURVEY

This chapter contains the list of research papers that we have studied under literature
survey. We focused on the approaches for maintaining accuracy in these papers. Our study
included the techniques used for developing and training the model.

2.1 A Novel Method for Multivariant Pneumonia Clas-


sification Based on Hybrid CNN-PCA Based Fea-
ture Extraction Using Extreme Learning Machine
With CXR Images [1]
MD. NAHIDUZZAMAN et.al [1] have studied three models for the detection of the
lung inflammation they are ELM on the x-ray images dataset, CNN-PCA model which is
based on the feature extraction, and the third one is CNN-PCA-ELM in which it increases the
contrast of the images. The ultimate model among these three suggestions yields a positive
outcome. It gets the multiclass pneumonia classification recall score of 98 percentage and
accuracy score of 98.32 percentage. Additionally, the suggested approach outperforms the
current approaches. The results have been compared using a number of metrics, including
recall, accuracy, and precision. Advantages:

• By using the ml model, the detection of pneumonia and it types with the improved
performance is developed.

• If the detection rate is correct, it can help doctors identify the illness and Early diag-
nosis of pneumonia increases survival rates for patients.

Disadvantages:

• Clahe technique which only adjust the contrast of the image there will be n numbers
of cases we can’t detect them using this method.

• There are other methods which are developed after CNN in which more number of
layers are added to the network so the accuracy can be increased.

5
2.2 Intelligent Pneumonia Identification From Chest
X-Rays: A Systematic Literature Review [2]
WASIF KHAN et.al [2] have studied the chest X-ray data set sizes, quality, and
us- ability as well as methods for dealing with imbalanced data-sets. Chest radiography
is an important diagnostic tool for chest-related diseases. Medical imaging research is cur-
rently embracing the automatic detection techniques used in computer vision. Over the past
decade, Deep Learning techniques have shown an enormous breakthrough in the field of
medical diagnostics. Various automated systems have been proposed for the rapid detection
of pneumonia on chest x-rays images Although such detection algorithms are many and var-
ied, they have not been summarized into a review that would assist practitioners in selecting
the best methods from a real-time perspective, perceiving the available datasets, and un-
derstanding the currently achieved results in this domain. This paper overviews the current
literature on pneumonia identification from chest x-ray images. After summarizing the topic,
the review analyzes the usability, goodness factors, and computational complexities of the
algorithms that implement these techniques. It also discusses the quality, usability, and size
of the available datasets, and ways of coping with unbalanced datasets.

Advantages:

• Deep-learning algorithms’ increased accuracy combined with their effective class bal-
ancing methods act as a nice example.

• The author has used different datasets for the detection of the disease.

Disadvantages:

• Researchers should concentrate on developing novel techniques for CXR-based intel-


ligent illness identification utilising simple algorithms that are effective at detecting
pneumonia and other chest-related disorders across various datasets.

6
2.3 Detection and Classification of lung diseases for
pneu- monia and Covid-19 using machine and deep
learn- ing techniques [3]
Shimpy Goyal et.al [3] have proposed a novel framework for the lung disease predic-
tions like pneumonia and Covid-19 from the chest X-ray images of patients. The framework
consists of dataset acquisition, image quality enhancement, adaptive and accurate region
of interest (ROI) estimation, features extraction, and disease anticipation. In dataset ac-
quisition, we have used two publically available chest X-ray image datasets. As the image
quality degraded while taking X-ray, we have applied the image quality enhancement using
median filtering followed by histogram equalization. For accurate ROI extraction of chest
regions, we have designed a modified region growing technique that consists of dynamic re-
gion selection based on pixel intensity values and morphological operations. For accurate
detection of diseases, robust set of features plays a vital role. We have extracted visual,
shape, texture, and intensity features from each ROI image followed by normalization. For
normalization, we formulated a robust technique to enhance the detection and classification
results. Soft computing methods such as artificial neural network (ANN), support vector
machine (SVM), K-nearest neighbour (KNN), ensemble classifier, and deep learning classifier
are used for classification. For accurate detection of lung disease, deep learning architecture
has been proposed using recurrent neural network (RNN) with long short-term memory
(LSTM). Experimental results show the robustness and efficiency of the proposed model in
comparison to the existing state-of-the-art methods.

Advantages:

• TComparative to other models like CNN author have used the artificial neural network,
SVM etc. which increase the accuracy.

• It has been discovered that the suggested F-RNNLSTM model offers superior accuracy
of about 95 percent with minimal computing effor

Disadvantages:

• Its ”black box” character, increased computational load, propensity for overfitting, and
the empirical nature of model creation are drawbacks.

• It can be difficult to optimise neural network models for production.

7
2.4 Interpretable Puemonia Detection by combining
Deep Learning and Explainable Models with Mul-
tisource data [4]
Hao Ren et.al [4] have researched and proposed that With the rapid development of
AI techniques, Computer-aided Diagnosis has attracted much attentionand has been success-
fully deployed in many applications of health care and medical diagnosis. For somespecific
tasks, the learning-based system can compare with or even outperform human experts’ per-
formance.The impressive performance owes to the excellent expressiveness and scalability of
the neural networks,although the models’ intuition usually can not be represented explicitly.
Interpretability is, however, veryimportant, even the same as the diagnosis precision, for
computer-aided diagnosis. To fill this gap, ourapproach is intuitive to detect pneumonia
interpretably. We first build a large dataset of community-acquiredpneumonia consisting
of 35389 cases (distinguished from nosocomial pneumonia) based on actual medicalrecords.
Second, we train a prediction model with the chest X-ray images in our dataset, capable of-
precisely detecting pneumonia. Third, we propose an intuitive approach to combine neural
networks withan explainable model such as the Bayesian Network. The experiment result
shows that our proposal furtherimproves the performance by using multi-source data and
provides intuitive explanations for the diagnosisresults.

Advantages:

• Results showed that this model was better than just using only images or only reports
It is used to predict the pneumonia in alternative way.

Disadvantages:

• some observable clinical features are needed. Symptoms such as fever, cough, and chest
pain are also very crucial to detect the disease, but they doesn’t provide the accuracy
to detect pneumonia.

8
2.5 Detection of Puemonia Infection in Lungs From
Chest X-ray images using Deep Convolutional Neu-
ral Network and content-based image Retrieval Tech-
niques [5]
T. Rajasenbagam et.al [5] have proposed Deep Convolutional Neural Networkto detect
Pneumonia infection in the lung using Chest X-ray images. The proposed Deep CNN models
were trained with a Pneumonia Chest X-ray Dataset containing 12,000 images of infected
and not infected chest X-ray images. The dataset was preprocessed and developed from the
Chest X-ray8 dataset. The Content-based image retrieval technique was used to annotate
the images in the dataset using Metadata and further contents. The data augmentation
techniques were used to increase the number of images in each of class. The basic ma-
nipulation techniques and Deep Convolutional Generative Adversarial Network (DCGAN)
were used to create the augmented images. The VGG19 network was used to develop the
proposed Deep CNN model. The classification accuracy of the proposed Deep CNN model
was 99.34 percent in the unseen chest X-ray images. The performance of the proposed
deep CNN was compared with state-of-the-art transfer learning techniques such as AlexNet,
VGG16Net and InceptionNet. The comparison results show that the classification perfor-
mance of the proposed Deep CNN model was greater than the other techniques. To extend
this different lung disease classes will include this model to detect various lung diseases using
the chest X-ray images. Also, the performance of the proposed Deep CNN model can be
improved with more number of layers and parameters. This will allow clinicians to recognize
lung diseases from chest X-ray images with lower prevalence at an earlier stage of the disease.

Advantages:

• VGG19 net gives better performance than Alex Net, VGG16Net and inception net.

Disadvantages:

• Finding radiological examiners in remote for analysis for more number of chest x-ray
is challenging.

9
2.6 Identification and classification of pneumonia dis-
ease using a deep learning-based intelligent com-
putational framework [6]
Rong Yi et.al [6] have explained that Various techniques are used to identify pneu-
monia,including chest X-ray, blood culture, sputum culture, fluid sample, bronchoscopy, and
pulse oximetry. Chest X-ray is themost widely used method to diagnose pneumonia and is
considered one of the most reliable approaches. To analyse chestX-ray images accurately, an
expert radiologist needs expertise and experience in the desired domain. However, human-
assisted approaches have some drawbacks: expert availability, treatment cost, availability of
diagnostic tools, etc. Hence,the need for an intelligent and automated system comes into
place that operates on chest X-ray images and diagnosespneumonia. The primary purpose of
technology is to develop algorithms and tools that assist humans and make their liveseasier.
This study proposes a scalable and interpretable deep convolutional neural network (DCNN)
to identify pneumoniausing chest X-ray images. The proposed modified DCNN model first
extracts useful features from the images and thenclassifies them into normal and pneumonia
classes. The proposed system has been trained and tested on chest X-ray imagesdataset.
Various performance metrics have been utilized to inspect the stability and efficacy of the
proposed model. Theexperimental result shows that the proposed model’s performance is
greater compared to the other state-of-the-artmethodologies used to identify pneumonia.
The performance of the proposed system has been measured with the help of 4 performance
metrics which include: accuracy, sensitivity, specificity, and ROC curve. The proposed
DCNN model performed exceptionally well by attaining the training accuracy of 98.02%,
and the validation accuracy of 96.09%, which is much higher than the existing approaches
and techniques. It is anticipated that this framework will be of great interest and value for
the doctors and other caregivers.

Advantages:

• Accuracy of DCNN (Proposed model)-96.09 percent. The death ratio caused by this
disease can be reduced if the patients are identified at the initial phases, and on-time
medication and treatment are provided to them.

Disadvantages:

• Human assisted approaches have some drawbacks: expert availability, treatment cost,
availability of diagnostic tools, etc.

10
2.7 Pneumonia Detection Proposing a Hybrid Deep
Convolutional Neural Network Based on Two Par-
allel Visual Geometry Group Architectures and
Machine Learning Classifiers [7]
Mohammad Yaselian et.al [7] have studied that various Deep Learning (DL) methods
have been developed for detection of pneumonia considering CAD system. In this regard, a
novel hybrid Convolutional Neural Network (CNN) model is proposed using three classifica-
tion approaches. In the first classification approach, Fully-Connected (FC) layers are utilized
for the classification of CXR images. This model is trained for several epochs and the weights
that result in the highest classification accuracy are saved. In the second classification ap-
proach, the trained optimized weights are utilized to extract the most representative CXR
image features and Machine Learning (ML) classifiers are employed to classify the images.
In the third classification approach, an ensemble of the proposed classifiers is created to
classify CXR images both VGG16 and VGG19 networks accept the same input images with
a dimension of 224 × 224 pixels in parallel and combine the features of CXR images. The
results suggest that the proposed ensemble classifier using Support Vector Machine (SVM)
with Radial Basis Function (RBF) and Logistic Regression (LR) classifiers has the best per-
formance with 98.55% accuracy. Ultimately, this model is deployed to create a web-based
CAD system to assist radiologists in pneumonia detection with a significant accuracy. The
current research study proposed a new hybrid CNN model, using VGG16 and VGG19 net-
works as feature extractors to classify CXR images. In this hybrid CNN model.

Advantages:

• This model had the best performance in terms of all performance metrics, compared
to the hybrid model with FC layers and all the ML classifiers.

Disadvantages:

• The performance of the proposed hybrid CNN model can be further improved by
developing new robust classifiers.

11
2.8 Pneumonia Detection Using Convolutional Neural
Networks [8]

The proposed methodology presents the architectural design that is divided into three
stages: pre-processing, handover learning and refinement, and classification. We have as-
sessed the performance of five CNN models namely; Alex Net, Google Net, Le Net, Res
Net, and VGG Net model. Four models achieved the highest accuracy rate ranging from 95
percent to 97 percent, Google Net and Le Net got the highest mark of 97 percent followed
by VGG Net with an accuracy rate of 96 percent and Alex Net model has the accuracy
rate of 96 percent. The Res Net model achieved the lowest accuracy rate with the mark
of 74 percent. Advantages are All the models have performed well on detecting pneumonia
and normal chest x-rays. Disadvantages are Convolutional neural network architectures like
Inception-v3, shuffle Net, and Mobile Net architectures for pneumonia detection must be im-
plemented and the optimization of hyper-parameters should also be considered to improve
the accuracy of the model.

Advantages:

• All the models have performed well on detecting pneumonia and normal chest x-rays.

Disadvantages:

• Convolutional neural network architectures like Inception-v3, shuffle Net, and Mobile
Net architectures for pneumonia detection must be implemented and the optimization
of hyper-parameters should also be considered to improve the accuracy of the model.

12
Chapter 3
ANALYSIS AND DESIGN

Software requirement that is needed by software to increase quality of software prod-


uct. These requirements are generally a type of expectation of users from software products
that is important and need to be fulfilled by software. Analysis means to examine something
in an organized and specific manner to know complete details about it. Therefore, Software
requirement analysis simply means complete study, analyzing, describing software require-
ments so that requirements that are genuine and needed can be fulfilled to solve problems.
There are several activities involved in analyzing Software requirements.
This chapter includes the analysis of requirements for the proposed project. This chapter
contains

• Functional Requirements.

• Non-Functional Requirements.

3.1 Functional Requirements


A Functional requirement defines a function of a system or its component. A function
is described as a set of inputs, the behavior, and outputs. Functional requirements may be
calculations, technical details, data manipulation and processing and other specific function-
ality that define what a system is supposed to accomplish. The functional requirement in
this project is disease classification.
Pneumonia Lung Infection Classification technique is used to predict wheather the person
has disease or not by taking Chest X-ray of the user as input and also predicts the percentage
of loss and accuracy for the each model used to classify the chest x ray data set.

3.2 Non-Functional Requirements


A non-functional requirement defines the quality attribute of a software system. They rep-
resent a set of standards used to judge the specific operation of a system. A non-functional
requirement is essential to ensure the usability and effectiveness of the entire software sys-
tem. Failing to meet non-functional requirements can result in systems that fail to satisfy
user needs. Non-functional Requirements allows you to impose constraints or restrictions on
the design of the system across the various agile backlogs. Non-functional requirements in
this project are the quality of the picture taken and whether the system is giving the correct

13
output or not. The distance of the person from the sensor to measure the temperature must
be less.
The Non-functional Requirements in our project are:
Usability: Usability defines how difficult it will be for a user to learn and operate the sys-
tem. It is assessed by using Efficiency of use, Intuitiveness, Low perceived workload.

Security: Security requirements ensure that the software is protected from unauthorized
access to the system and its stored data. It considers different levels of authorization and
authentication across different users roles. For instance, data privacy is a security charac-
teristic that describes who can create, see, copy, change, or delete information. Security also
includes protection against viruses and malware attacks.

Reliability: Reliability defines how likely it is for the software to work without failure
for a given period of time. Reliability decreases because of bugs in the code, hardware fail-
ures, or problems with other system components. To measure software reliability, you can
count the percentage of operations that are completed correctly or track the average period
of time the system runs before failing.

Performance: Performance is a quality attribute that describes the responsiveness of the


system to various user interactions with it. Poor performance leads to negative user experi-
ence. It also jeopardizes system safety when it is overloaded.

Availability: Availability is gauged by the period of time that the system’s functional-
ity and services are available for use with all operations. So, scheduled maintenance periods
directly influence this parameter. And it’s important to define how the impact of mainte-
nance can be minimized. When writing the availability requirements, the team has to define
the most critical components of the system that must be available at all time. You should
also prepare user notifications in case the system or one of its parts becomes unavailable.

Scalability: Scalability requirements describe how the system must grow without nega-
tive influence on its performance. This means serving more users, processing more data,
and doing more transactions. Scalability has both hardware and software implications. For
instance, you can increase scalability by adding memory, servers, or disk space. On the other
hand, you can compress data, use optimizing algorithms, etc.

14
Chapter 4
PROPOSED SYSTEM

This chapter consists of architecture,proposed methodology,process flow and software algo-


rithm of our project.

4.1 Proposed System Diagram

Figure 4.1: Proposed System Diagram

15
4.2 Architecture

Figure 4.2: Architecture

The below image explains about the architecture of our pneumonia prediction
model. First we preprocessed the input image using the preprocessing techniques and ap-
plied Image Data generator. We use Image data generator to preserve the original image size
. Then the input is given to InceptionNet model, Convolutional Neural Network Model and
ResNet whose architecture is modified to classify 2 classes .Here we have mainly convolution
layer, batch normalization , ReLu Layer and Pool Layer (Max or Avg Layer). Convolution
Layer has the simple application to apply the filter to the input. Batch normalization is
used to normalize the output of previous layer. ReLu Layer remove the negative values from
the filtered image and if any negative value exists it replace it with zero . Pooling Layer
is used to reduce the dimensions of the feature maps. Max pooling is a pooling operation
that selects the maximum element from the region of the feature map covered by the filter.
Thus, the output after max-pooling layer is the most prominent features of the previous
map. Average pooling computes the average of the elements present in the region of feature
map covered by the filter. Thus, while max pooling gives the most prominent feature in a
patch of feature map, average pooling gives the average of features in a patch .The Final
Fully Connected Layer can classify the input into two classes the chest x-ray of the person
is infected by the pneumonia or he is normal.

16
4.3 Proposed Methodology
Our proposed system is a Pneumonia infection classifier that is used for identifying
the type of Pneumonia infection that occur for an individual. Different types of models
on the given data set, for finding the model with the highest accuracy. Later, this model
with highest accuracy which is identified and all these three models are compared based
on accuracy. In this models we will calculate the loss, accuracy, val-loss, val-accuracy and
graphs are plotted for each model for loss and val-loss, accuracy and val-accuracy.

4.4 Process Flow Diagram

Figure 4.3: process Flow diagram

The flow diagram explains the sequence of actions that are to be done when for the
classification of Pneumonia Infection. Initially, Initially the data set is divided into three
folders for testing, training and validation purpose and the each folder is sub divided into
two sub-folders Normal and Pneumonia and after that we load the dataset and preprocess
the dataset.Now the pretrained model is added with some convolutional layers, Max pooling
layers respectively and is used for extraction of the features. Later it is tested on the testing
samples, and find the accuracy and plot the curves of validation loss etc. for evaluating the
model.

17
4.5 Software Algorithm
. The below algorithms are used for CNN based Model, Inception-Net and Res-Net
for classifying the lung infections. Later the Lung infection detection algorithm is used for
detecting the types of diseases.

Algorithm:
Step-1: Take input data set
Step-2: Perform data prepossessing on data sets using ImageDataGenerator
Step-3: Split the data into train and test
Step-4: Import Conv2D, Inceptionv3 and Resnet50 from the keras. applications
Step-5: Add a Global Pooling layer
Step-6: Add the Normalization layer to the model
Step-7: Add the flatten layer to the model
Step-8: Add the dense layer to the model
Step-9: Add soft-max & compilation function to the model
Step-10: Fit the model with the data set
Step-11: Return the accuracy and graphs for the loss and accuracy as the output
Step-12: End

18
Chapter 5
IMPLEMENTATION

5.1 Output Screen Shots


The Fig 5.1 shows the output graph when we apply convolutional nureal netwrok model on
the chest x ray data set the graphs are plotted on the values of the variables loss,val loss
and accuracy, val accuracy.

Figure 5.1: CNN graph

After applying the convolutional nureal network to the data set we got loss 0.1148 accuracy
0.8963 val loss 5.7643 and val accuracy 0.1200 and after fitting the data set to the created
model we have calculated the test accuracy and the train accuracy and we have the result
as 65.06% and 82.40%.

19
The Fig 5.2 shows the output graph when we apply ResNet model on the chest x ray
data set the graphs are plotted on the values of the variables loss,val loss and accuracy,
val accuracy.

Figure 5.2: ResNet graph

After applying the ResNet Model to the data set we got loss 0.1696 accuracy 0.7937
val loss 0.1036 and val accuracy 1.0000 and after fitting the data set to the created model
we have calculated the test accuracy and the train accuracy and we have the result as
62.18% and 73.77%.

The Fig 5.3 shows the output graph when we apply InceptionV3 model on the chest
x ray data set the graphs are plotted on the values of the variables loss,val loss and accuracy,
val accuracy.

Figure 5.3: InceptionNet graph

After applying the InceptionV3 Model to the data set we got loss 0.1299 accuracy 0.8700
val loss 0.1313 and val accuracy 0.9600 and after fitting the data set to the created model

20
we have calculated the test accuracy and the train accuracy and we have the result as
83.81% and 90.34%.

The detailed analysis of different models used for classifying the lung infections are given
in the below table. The metrics used for evaluating the model are loss, accuracy and val loss
and val accuracy.

Table 5.1: Comparison between models

Model Loss Accuracy Vall oss vala ccuracy Accuracy


InceptionResNetV3 0.1299 0.8700 0.1313 0.9600 90.34%
ResNet50 0.1696 0.7937 0.1036 1.0000 73.77%
CNN 0.1148 0.8963 5.7643 0.1200 82.40%

In above shown table 5.1, the summary of the performance of the models is analysed.
All the pre-trained models provide a better accuracy except the ResNet of the Chest X-rays.
It is observed that the InceptionResNetV3 model is possessing high accuracy (90.34%)
when compared to all the other models. Although, CNN is so close to the InceptionV3.
InceptionV3 its performance on the given dataset is far from better and it is outperformed
by CNN models such as ResNet etc.

Figure 5.4: Graph for comparison of models

The Fig 5.4 shows the bar plot of Mean absolute Error comparison of all the three models
we conclude that Inception model is performed well than CNN and ResNet.

21
Chapter 6
CONCLUSION AND FUTURE WORK

This chapter includes the conclusion of the project and future work

Deep learning is a cutting-edge approach for identifying patterns in images and diag-
nosing respiratory infections. In this study, We woked on the three different models called
Convolutional Neural Network (CNN), ResNet and the InceptionNet.by the above analysis
the InceptionNet acheived the highest accuracy which is used for diagnosing puemonia
with better accuracy. According to the experimental findings, the proposed model had a
90accuracy rate .The proposed model works more efficiently on the chest x-ray dataset
which is taken from kaggle. Among the three models even convolutional nureal network
was close to the inceptionNet but CNN could not perform better as inceptionNet on this
pirticular x-ray dataset. The future work includes to designing and development of a Dash
stream application . It will let users to upload chest x-ray images, and by determining
whether the person has puemonia or not, a voice message will be produced as a result.

22
REFERENCES

[1] M. Nahiduzzaman et al., ”A Novel Method for Multivariant Pneumonia Classifica-


tion Based on Hybrid CNN-PCA Based Feature Extraction Using Extreme Learning
Machine With CXR Images,” in IEEE Access, vol. 9, pp. 147512-147526, 2021, doi:
10.1109/ACCESS.2021.3123782.

[2] W. Khan, N. Zaki and L. Ali, ”Intelligent Pneumonia Identification From Chest X-
Rays ” : A Systematic Literature Review, in IEEE Access, vol. 9, pp. 51747-51771,
2021, doi: 10.1109/ACCESS.2021.3069937.

[3] Goyal, S., Singh, R. ” Detection and classification of lung diseases for pneumonia
and Covid-19 using machine and deep learning techniques”. J Ambient Intell Human
Comput (2021). https://doi.org/10.1007/s12652-021-03464-7.

[4] H. Ren et al., ”Interpretable Pneumonia Detection by Combining Deep Learning and
Explainable Models With Multisource Data,” in IEEE Access, vol. 9, pp. 95872-95883,
2021, doi: 10.1109/ACCESS.2021.3090215.

[5] Rajasenbagam, T., Jeyanthi, S. Pandian, J.A. ” 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 Human Comput (2021).
https://doi.org/10.1007/s12652-021-03075-2.

[6] Yi, R., Tang, L., Tian, Y. et al. ” Identification and classification of pneumonia dis-
ease using a deep learning-based intelligent computational framework”.Neural Comput
Applic (2021). https://doi.org/10.1007/s00521-021-06102-7.

[7] M. Yaseliani, A. Z. Hamadani, A. I. Maghsoodi and A. Mosavi, ”Pneumonia Detection


Proposing a Hybrid Deep Convolutional Neural Network Based on Two Parallel Visual
Geometry Group Architectures and Machine Learning Classifiers“, in IEEE Access, vol.
10, pp. 62110-62128, 2022, doi: 10.1109/ACCESS.2022.3182498.

[8] Sammy V. Militante, Brandon G. Sibbaluca “Pneumonia Detection Using Convolu-


tional Neural Networks” in IJSTR ,https://www.ijstr.org/final-print/apr2020/Pneumonia-
Detection-Using-Convolutional-Neural-Networks.pdf.

[9] J. Zhang et al., ”Viral Pneumonia Screening on Chest X-Rays Using Confidence-Aware
Anomaly Detection,” in IEEE Transactions on Medical Imaging, vol. 40, no. 3, pp.
879-890, March 2021, doi: 10.1109/TMI.2020.3040950.

23
[10] M. E. H. Chowdhury et al., ”Can AI Help in Screening Viral and COVID-19
Pneumonia?,” in IEEE Access, vol. 8, pp. 132665-132676, 2020, doi: 10.1109/AC-
CESS.2020.3010287.

[11] X. Qian et al., ”M3 Lung-Sys: A Deep Learning System for Multi-Class Lung Pneumo-
nia Screening From CT Imaging,” in IEEE Journal of Biomedical and Health Infor-
matics, vol. 24, no. 12, pp. 3539-3550, Dec. 2020, doi: 10.1109/JBHI.2020.3030853.

[12] S. Yang et al., ”Learning COVID-19 Pneumonia Lesion Segmentation From Im-
perfect Annotations via Divergence-Aware Selective Training,” in IEEE Journal of
Biomedical and Health Informatics, vol. 26, no. 8, pp. 3673-3684, Aug. 2022, doi:
10.1109/JBHI.2022.3172978.

[13] A. Serener and S. Serte, ”Deep learning for mycoplasma pneumonia discrimination from
pneumonias like COVID-19,” 2020 4th International Symposium on Multidisciplinary
Studies and Innovative Technologies (ISMSIT), 2020, pp. 1-5, doi: 10.1109/ISM-
SIT50672.2020.9254561.

[14] Y. Feng et al., ”Deep Supervised Domain Adaptation for Pneumonia Diagnosis From
Chest X-Ray Images,” in IEEE Journal of Biomedical and Health Informatics, vol. 26,
no. 3, pp. 1080-1090, March 2022, doi: 10.1109/JBHI.2021.3100119.

[15] Y. Feng, X. Yang, D. Qiu, H. Zhang, D. Wei and J. Liu, ”PCXRNet: Pneumonia
Diagnosis From Chest X-Ray Images Using Condense Attention Block and Multicon-
volution Attention Block,” in IEEE Journal of Biomedical and Health Informatics, vol.
26, no. 4, pp. 1484-1495, April 2022, doi: 10.1109/JBHI.2022.3148317.

[16] Available Online at https://medium.com/analytics-vidhya/image-classification-


withmobilenet-cc6fbb2cd470, last access on 02-10-2022.

[17] Available Online at https://media.arxiv-vanity.com/ render-output/6347767/Dense


Connect3.png

[18] Available Online at https://neurohive.io/wp-content/uploads/2018/11/vgg16.png,


last access on 09-10-2022.

[19] Available Online at https://miro.medium.com/max/704/11234/inceptionresnetv2.png,


last access on 08-10-2022.

[20] Available Online at https://www.google.com/imgres/www.mdpi.com.png, last access


on 11-10-2022.

24

You might also like