You are on page 1of 42

Collobration Tool Project Management Android App.

Project-II (IT07PPC21) report submitted to

Guru Ghasidas Vishwavidyalaya

in partial fulfilment for the award of the degree of

Bachelor of Technology

in

Information Technology

by

Suryam Kumar, Budh Kishor, Tejasvi Malvi

(20107066 GGV/20/01467, 20107015 GGV/20/01415, 20107070


GGV/20/01471 )

Under the supervision of

Dr. Rajesh Mahule

Department of Information Technology

Guru Ghasidas Vishwavidyalaya

October,2023

October 21, 2023


DECLARATION

I certify that

(a) The work contained in this report has been done by me under the guidance of
my supervisor.

(b) The work has not been submitted to any other Institute for any degree or
diploma.

(c) I have conformed to the norms and guidelines given in the Ethical Code of
Conduct of the Institute.

(d) Whenever I have used materials (data, theoretical analysis, figures, and text)
from other sources, I have given due credit to them by citing them in the text
of the thesis and giving their details in the references. Further, I have taken
permission from the copyright owners of the sources, whenever necessary.

Date: October 21, 2023 (Suryam Kumar, Budh Kishor, Tejasvi Malvi )
Place: Bilaspur (20107066 GGV/20/01467, 20107015 GGV/20/01415, 20107070
GGV/20/01471 )

i
DEPARTMENT OF INFORMATION TECHNOLOGY
GURU GHASIDAS VISHWAVIDYALAYA
BILASPUR - 495009, INDIA

CERTIFICATE

This is to certify that the project report entitled “Collobration Tool Project
Management Android App.” submitted by Suryam Kumar, Budh Kishor,
Tejasvi Malvi (Roll No. 20107066 GGV/20/01467, 20107015 GGV/20/01415,
20107070 GGV/20/01471 ) to Guru Ghasidas Vishwavidyalaya towards partial ful-
filment of requirements for the award of degree of Bachelor of Technology in In-
formation Technology is a record of bonafide work carried out by him under my
supervision and guidance during October,2023.

Dr. Rajesh Mahule


Date: October 21, 2023 Department of Information Technology
Place: Bilaspur Guru Ghasidas Vishwavidyalaya
Bilaspur - 495009, India

ii
Abstract

Name of the student: Suryam Kumar, Budh Kishor, Tejasvi Malvi Roll No:
20107066 GGV/20/01467, 20107015 GGV/20/01415, 20107070
GGV/20/01471
Degree for which submitted: Bachelor of Technology
Department: Department of Information Technology
Thesis title: Collobration Tool Project Management Android App.
Thesis supervisor: Dr. Rajesh Mahule
Month and year of thesis submission: October 21, 2023

In the modern, networked business environment, effective project management de-


pends on the use of collaboration technologies. These tools serve as the digital
backbone of the project teams, enabling efficient task delegation, communication,
and progress tracking. They promote honesty, accountability, and efficiency, all of
which are necessary for producing fruitful project results. Trello, Asana, and Slack
are popular team collaboration applications that provide customizable platforms for
teams to interact, exchange documents, and monitor project status in real time.
By enhancing team members’ capacity to coordinate their work regardless of where
they are physically located, they support a more adaptable and flexible project man-
agement process. In an era where remote work and cross-functional teams are more
prevalent, these collaboration solutions are crucial for effective project management.

iii
Acknowledgements
Dr. Rohit Raja, the head of the information technology department, has our sincere
gratitude for giving us this chance.
All the esteemed faculty members, Dr. Rohit Raja (HoD), Dr. Amit Khaskalam,
Dr. Rajesh Mahule, Mr. Santosh Soni, Mr. Deepak Netam, Mr. Abhishek Jain,
Mr. Agnivesh Pandey, Mr. Pankaj Chandra, Mr. Suhel Ahamed, Mrs. Akansha
Gupta Mrs. Aradhana Soni for their continued support effort.
The Dean of Institute of Technology, Guru Ghasidas Vishwavidyalaya , for providing
all the necessary facilities.

We would also want to thank our mentor Dr.Rajesh Mahule sir, an assistant profes-
sor in the department of information technology, for his time, effort, and assistance
during the course of the semester. We truly appreciated your helpful recommen-
dations and assistance as we finished the project. We will always be grateful to
you for this. We really appreciate Dr.Rajesh Mahule Sir unwavering assistance and
ongoing encouragement throughout the project; without his direction and steadfast
assistance, this report would not have been feasible.

We would like to highlight that we did all of the work on this project and not
someone else.

iv
Contents

Declaration i

Certificate ii

Abstract iii

Acknowledgements iv

Contents v

List of Figures viii

List of Tables ix

Abbreviations x

1 Introduction and foundation 1


1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Foundation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Decoding Lung Opacity in Pneumonia: Understanding The Con-


nection 7
2.1 Understanding Lung Opacity in Pneumonia . . . . . . . . . . . . . . 7
2.2 Diagnostic Significance of Lung Opacity . . . . . . . . . . . . . . . . 8
2.3 Clinical Implications and Patient Management . . . . . . . . . . . . 8
2.4 Lung Opacity in Differential Diagnosis . . . . . . . . . . . . . . . . . 9

3 Unlocking Insights into Used Dataset 10


3.1 Overview of the Dataset . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Data Augmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

v
Contents vi

3.3 Dataset Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . 11


3.4 Additional Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5 Image Data Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 DenseNet-121: Empowering Pneumonia Detection with Dense Con-


nectivity and CNNs 13
4.1 DenseNet-121 Architecture . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 DenseNet-121 for Pneumonia Detection . . . . . . . . . . . . . . . . 14
4.3 CNNs in Medical Imaging Analysis . . . . . . . . . . . . . . . . . . . 14
4.4 Design OF DenseNet121 . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.4.1 Dense Connectivity Pattern . . . . . . . . . . . . . . . . . . . 15
4.4.2 Dense Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4.3 Transition Layers . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4.4 Bottleneck Layers . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4.5 Final Classification Layer . . . . . . . . . . . . . . . . . . . . 17
4.5 Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5.1 Class Distribution Analysis . . . . . . . . . . . . . . . . . . . 17
4.5.2 Visualization of Class Distribution . . . . . . . . . . . . . . . 18
4.5.3 Dataset Augmentation for Balanced Representation . . . . . . 18
4.5.4 Creation of Comprehensive Training Dataset . . . . . . . . . . 19
4.6 How Image Augmentation is performed? . . . . . . . . . . . . . . . . 20
4.7 How the augmented data (approx. 24000 images) is divided into
Batch before using it for training model? . . . . . . . . . . . . . . . . 21

5 Model Architecture 23
5.1 Model Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1.1 Loading Pre-Trained DenseNet121 Model . . . . . . . . . . . . 23
5.1.2 Transfer Learning . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.1.3 Sequential Model Initialization . . . . . . . . . . . . . . . . . . 24
5.1.4 Adding Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.1.5 Model Compilation . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.3 Results Of Model Training . . . . . . . . . . . . . . . . . . . . . . . . 26

A Features Overview 29
A.1 Creating Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.2 Including New People . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.3 Video Chat and Calling . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.4 Progress Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
A.5 Task Delegation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Contents vii

Bibliography 31
List of Figures

3.1 Example Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


3.2 showing the areas affected . . . . . . . . . . . . . . . . . . . . . . . . 12

4.1 Example Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


4.2 6. Basic architecture of the DenseNet convolutional neural network
model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3 visual representation of the class distribution in the dataset . . . . . . 19
4.4 Centres of Lung Opacity rectangles (brown) over rectangles (yellow)
Sample size 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.1 Model Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25


5.2 Model summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3 Results Of Model Training . . . . . . . . . . . . . . . . . . . . . . . . 28

viii
List of Tables

ix
Abbreviations

UI User Interface
UX User Experience
API Application Programming Interface
SDK Software Development Kit
RTC Real - Time Communication
HTTPS Hypertext Transfer Protocol Secure
FCM Firebase Cloud Messaging
AR Augmented Reality
VR Virtual Reality
ML Machine Learning
JS JavaScript
XML Xtensible Markup Language

x
Chapter 1

Introduction and foundation

1.1 Introduction

Pneumonia, a prevalent respiratory infection affecting millions worldwide, neces-


sitates timely detection for prompt intervention and effective management. Tradi-
tional diagnostic approaches, reliant on radiographic imaging and clinical interpreta-
tion, are often labor-intensive and prone to variability. In recent years, advancements
in deep learning methodologies have spurred a paradigm shift in medical image anal-
ysis, offering the potential for automated and accurate detection of pneumonia from
chest X-ray images.

This research endeavors to explore the applicability of the DenseNet architecture,


renowned for its efficacy in image classification tasks, in the domain of pneumonia
detection. By harnessing the power of deep learning and leveraging a vast and diverse
dataset of chest X-ray images, the study aims to develop and optimize a pneumonia
detection model capable of achieving high accuracy and reliable performance.

?.

1
Chapter 1. Introduction and foundation 2

1.2 Purpose

The primary purpose of this study is twofold: firstly, to investigate the effectiveness
of the DenseNet architecture in pneumonia detection, and secondly, to develop a
robust pneumonia detection model through deep learning techniques. By utilizing
the RSNA Pneumonia Detection Dataset, comprising over 26,000 annotated chest
X-ray images, the research seeks to train and fine-tune the model to accurately
classify images and identify cases of pneumonia. The ultimate goal is to contribute
to the advancement of automated pneumonia detection algorithms, facilitating early
diagnosis and intervention.

1.3 Scope

The scope of this research encompasses the development and evaluation of a pneu-
monia detection model using the DenseNet architecture and the RSNA Pneumonia
Detection Dataset. The focus lies on leveraging deep learning methodologies to ac-
curately classify chest X-ray images and identify pneumonia cases. Furthermore, the
research aims to assess the generalizability of the developed model by evaluating its
performance on a held-out test set. This evaluation will provide insights into the
model’s ability to detect pneumonia in unseen X-ray images, thus determining its
potential for real-world clinical applications.

1.4 Method

To achieve the objectives outlined above, a structured methodology was employed,


encompassing several key steps:
Chapter 1. Introduction and foundation 3

Data Collection: The RSNA Pneumonia Detection Dataset served as the primary
data source, providing a comprehensive collection of chest X-ray images with pneu-
monia annotations.

Data Preprocessing: Preprocessing steps, including resizing images to a standard


size of 224x224 pixels, normalization of pixel values, and augmentation techniques
such as rotation and flipping, were applied to enhance model compatibility and
performance.

Model Architecture: The DenseNet architecture, renowned for its densely connected
layers and effectiveness in image classification tasks, was chosen as the foundation
for the pneumonia detection model.

Transfer Learning: Transfer learning techniques were employed to leverage pre-


trained weights from the ImageNet dataset, facilitating the initialization of the
DenseNet model with learned features and patterns.

Model Training: The model was trained with the objective of optimizing its perfor-
mance in pneumonia detection. The Adam optimizer and binary cross-entropy loss
function were utilized for training, suitable for binary classification tasks.

Interpretability Analysis: In addition to performance evaluation, interpretability


analysis techniques, including visualization and analysis of regions within X-ray
images contributing to model predictions, were explored. This analysis aimed to en-
hance transparency and facilitate clinician validation of the model’s decision-making
process.

1.5 Objective

The overarching objective of this project is to develop and evaluate a pneumonia


detection model utilizing the DenseNet architecture and deep learning techniques
applied to chest X-ray images. This objective encompasses several specific aims:
Chapter 1. Introduction and foundation 4

Exploration of DenseNet Effectiveness: The primary aim is to investigate the ef-


fectiveness of the DenseNet architecture, renowned for its densely connected layers,
in the domain of pneumonia detection. By leveraging DenseNet’s capabilities in
capturing intricate image features and patterns, we seek to assess its suitability for
accurately classifying chest X-ray images and identifying pneumonia cases.

Model Development and Optimization: Building upon the foundation of DenseNet,


the project aims to develop a robust pneumonia detection model through meticulous
model development and optimization. This involves training the model on a compre-
hensive dataset of chest X-ray images annotated for pneumonia, with the objective
of achieving high accuracy and reliable performance in pneumonia detection.

Utilization of RSNA Pneumonia Detection Dataset: The project utilizes the RSNA
Pneumonia Detection Dataset, a rich and diverse collection of over 26,000 chest X-
ray images with pneumonia annotations, as the primary data source. By leveraging
this extensive dataset, the objective is to train and fine-tune the pneumonia detec-
tion model to effectively distinguish between normal and pneumonia-affected X-ray
images.

Evaluation of Model Generalizability: Another key objective is to assess the gener-


alizability of the developed model by evaluating its performance on a held-out test
set. This evaluation provides insights into the model’s ability to accurately detect
pneumonia in unseen X-ray images, thereby determining its potential for real-world
clinical applications and its robustness across diverse patient populations and imag-
ing conditions.

Interpretability Analysis: In addition to performance evaluation, the project aims to


conduct interpretability analysis to enhance transparency and understanding of the
model’s decision-making process. By employing visualization techniques and ana-
lyzing regions within X-ray images contributing to model predictions, the objective
is to provide clinicians with insights into how the model arrives at its diagnostic
decisions, thereby fostering trust and facilitating clinical validation.
Chapter 1. Introduction and foundation 5

1.6 Foundation

Deep Learning Techniques:

– Utilization of artificial neural networks with multiple layers.

– Ability to automatically learn hierarchical representations of data.

– Well-suited for complex tasks like image classification.

DenseNet Architecture:

– Characterized by densely connected layers.

– Introduces dense connections between all layers within a block.

– Facilitates feature reuse, information flow, and efficient training.

– Demonstrated effectiveness in image classification tasks.

Pneumonia Detection from Chest X-ray Images:

– Pneumonia characterized by inflammation and consolidation of lung tissue.

– Manual interpretation of X-ray images can be subjective and time-consuming.

– Automating pneumonia detection using deep learning aims to enhance diag-


nostic accuracy, reduce interpretation variability, and expedite treatment ini-
tiation.

RSNA Pneumonia Detection Dataset:

– Large collection of chest X-ray images annotated for pneumonia.


Chapter 1. Introduction and foundation 6

– Provides a diverse and comprehensive dataset for model training and evalua-
tion.

– Serves as the primary data source for training and optimizing the pneumonia
detection model.
Chapter 2

Decoding Lung Opacity in


Pneumonia: Understanding The
Connection

2.1 Understanding Lung Opacity in Pneumonia

Lung opacity in pneumonia arises from the inflammatory response within the lungs.
When the lung tissue becomes inflamed due to infection, there is an accumulation
of fluid, pus, or inflammatory substances in the air sacs (alveoli) or tissues of the
lungs. This accumulation leads to a decrease in the amount of air in the affected
areas and an increase in density, resulting in the appearance of opacity on imaging.
The extent and severity of lung opacity vary depending on the stage and severity of
pneumonia, as well as the underlying cause of infection.

7
Chapter 2. Decoding Lung Opacity in Pneumonia: Understanding The Connection8

2.2 Diagnostic Significance of Lung Opacity

Radiologists and healthcare providers play a pivotal role in analyzing lung opacity
patterns and distribution for pneumonia diagnosis and monitoring. The presence
and characteristics of lung opacity on imaging can provide valuable diagnostic in-
formation, aiding in the identification of pneumonia and assessment of its severity.
Radiographic findings such as consolidation, airspace opacities, and interstitial in-
filtrates are indicative of pneumonia and guide treatment decisions.

Furthermore, the distribution and morphology of lung opacity can help differentiate
between different types of pneumonia, such as bacterial, viral, or fungal. Bacte-
rial pneumonia often presents with lobar consolidation, while viral pneumonia may
exhibit diffuse interstitial infiltrates. Understanding these patterns is essential for
tailoring treatment regimens and predicting patient outcomes.

2.3 Clinical Implications and Patient Manage-


ment

Lung opacity in pneumonia has significant clinical implications for patient manage-
ment. Healthcare providers use imaging findings to assess treatment response, track
infection progression, and identify complications such as pleural effusion or abscess
formation. Serial imaging studies allow clinicians to monitor changes in lung opacity
over time, guiding adjustments to treatment plans and ensuring appropriate care for
individuals with pneumonia.

Additionally, lung opacity serves as a prognostic indicator, with severe or extensive


opacities correlating with increased morbidity and mortality. By closely monitoring
lung opacity and adjusting treatment strategies accordingly, healthcare providers
can optimize patient outcomes and reduce the risk of adverse events.
Chapter 2. Decoding Lung Opacity in Pneumonia: Understanding The Connection9

2.4 Lung Opacity in Differential Diagnosis

While lung opacity is commonly associated with pneumonia, it is important to recog-


nize that it can occur in other respiratory conditions or diseases as well. Differential
diagnoses for lung opacity include pulmonary edema, atelectasis, pulmonary em-
bolism, and lung malignancies. Therefore, a comprehensive evaluation by healthcare
professionals, including clinical assessment, laboratory tests, and imaging studies,
is necessary to establish an accurate diagnosis and guide appropriate management
strategies.

Differentiating between various causes of lung opacity is crucial for initiating timely
and targeted interventions, minimizing the risk of misdiagnosis or inappropriate
treatment. Close collaboration between radiologists, pulmonologists, and infectious
disease specialists is essential for accurate diagnosis and optimal patient care.
Chapter 3

Unlocking Insights into Used


Dataset

3.1 Overview of the Dataset

The dataset consists of approximately 30,000 chest X-ray images, each meticulously
annotated to indicate the presence or absence of pneumonia. However, for our
analysis, we have opted to work with a subset of 12,000 images. This subset has
been carefully selected to represent a balanced distribution of pneumonia-affected
and normal (non-pneumonia) images, ensuring a comprehensive representation of
both classes in our analysis.

3.2 Data Augmentation

In order to increase the diversity and robustness of our dataset, we have augmented
the selected subset of 12,000 images. Through augmentation techniques such as
rotation, flipping, and scaling, we have effectively doubled the size of our dataset

10
Chapter X. Unlocking Insights into Used Dataset 11

to 24,000 images. This augmented dataset provides a more varied and comprehen-
sive training dataset for our machine learning models, improving their ability to
generalize to unseen data and enhancing their overall performance.

3.3 Dataset Partitioning

To facilitate effective model training and evaluation, we have partitioned the aug-
mented dataset into two subsets: a training set and a validation/test set. The
training set comprises 80% of the data and is used to train our machine learning
models, while the remaining 20% constitutes the validation/test set, which is used
to assess the performance of our trained models on unseen data. This partitioning
strategy helps prevent overfitting and ensures the reliability and generalizability of
our models.

3.4 Additional Metadata

In addition to the chest X-ray images and their corresponding annotations, the
dataset also includes metadata such as patient ID, age, gender, and supplementary
clinical information. This additional metadata provides valuable contextual infor-
mation that can be leveraged to gain deeper insights into the relationship between
patient characteristics and the diagnosis of pneumonia. By incorporating these nu-
merical features into our analysis, we can explore potential correlations and patterns
that may further inform our understanding of pneumonia detection.

3.5 Image Data Display


Chapter X. Unlocking Insights into Used Dataset 12

Figure 3.1: Example Image

Figure 3.2: showing the areas affected


Chapter 4

DenseNet-121: Empowering
Pneumonia Detection with Dense
Connectivity and CNNs

4.1 DenseNet-121 Architecture

This section provides an in-depth exploration of the DenseNet-121 architecture.


DenseNet-121 comprises multiple dense blocks, each consisting of several convolu-
tional layers, batch normalization, and a transition layer. The dense connectivity
pattern facilitates the direct flow of information between layers by concatenating the
output feature maps from all previous layers. This design promotes feature reuse,
facilitates gradient flow, and significantly reduces the number of parameters com-
pared to traditional architectures. The architecture’s efficiency and power in image
classification tasks, owing to its dense connectivity, are elaborated upon.

13
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 14

4.2 DenseNet-121 for Pneumonia Detection

Here, the focus is on the application of DenseNet-121 in pneumonia detection from


chest X-rays. DenseNet-121’s ability to capture both local and global features is
highlighted as a key factor contributing to its effectiveness in identifying lung opac-
ities and diagnosing pneumonia. The hierarchical feature learning process enables
DenseNet-121 to extract relevant features that discriminate between normal and
abnormal lung conditions. The architecture’s dense connectivity pattern plays a
crucial role in leveraging the learned representations to make accurate predictions,
making it a robust framework for pneumonia detection.

4.3 CNNs in Medical Imaging Analysis

This section contextualizes the role of CNNs, including DenseNet-121, in revolu-


tionizing medical imaging analysis. It discusses how CNNs automate the process
of identifying abnormalities in medical images, thus assisting clinicians in making
accurate diagnoses. The ability of CNNs to learn hierarchical representations from
images is emphasized, highlighting their significance in improving diagnostic ac-
curacy and efficiency. DenseNet-121’s role as a powerful tool within this broader
framework is underscored.

4.4 Design OF DenseNet121

DenseNet-121 is a convolutional neural network (CNN) architecture designed for im-


age classification tasks, particularly in the domain of medical imaging such as pneu-
monia detection from chest X-rays. The architecture is a variant of the DenseNet
family, known for its dense connectivity pattern, which facilitates the direct flow of
information across layers.
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 15

Figure 4.1: Example Image

4.4.1 Dense Connectivity Pattern

The hallmark of DenseNet-121 is its dense connectivity pattern, which enables the
direct connections between all layers within a dense block. Unlike traditional CNN
architectures where each layer is connected only to the subsequent layer, DenseNet-
121 connects each layer to every other layer in a feed-forward fashion. This dense
connectivity promotes feature reuse, facilitates gradient flow, and reduces the num-
ber of parameters, making the model more efficient and powerful.
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 16

4.4.2 Dense Blocks

DenseNet-121 is composed of multiple dense blocks, each consisting of a series of


densely connected convolutional layers. Within each dense block, the output feature
maps from all preceding layers are concatenated together and passed as input to the
subsequent layers. This dense connectivity allows the network to exploit the fea-
tures learned at different depths, promoting information flow and enhancing feature
representation.

4.4.3 Transition Layers

In between dense blocks, DenseNet-121 incorporates transition layers to reduce the


spatial dimensions of the feature maps while maintaining the number of feature
maps. This transition layer typically consists of a convolutional layer followed by
batch normalization and a pooling layer. By reducing the spatial dimensions, the
transition layer helps control the number of parameters and computational complex-
ity of the network, while still preserving valuable information.

4.4.4 Bottleneck Layers

To further reduce the model’s computational cost, DenseNet-121 employs bottleneck


layers within each dense block. These bottleneck layers consist of 1x1 convolutional
layers that reduce the number of input channels before applying the standard 3x3
convolution operation. This design choice helps in reducing the computational bur-
den while still capturing complex patterns and features in the input data.
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 17

4.4.5 Final Classification Layer

At the end of the network, DenseNet-121 includes a global average pooling layer
followed by a fully connected layer with softmax activation for classification. The
global average pooling layer aggregates the feature maps across spatial dimensions,
producing a single feature vector for each channel. This feature vector is then fed
into the fully connected layer for classification into different classes.

Figure 4.2: 6. Basic architecture of the DenseNet convolutional neural network


model

4.5 Data Analysis

4.5.1 Class Distribution Analysis

Understanding the distribution of classes within the RSNA Pneumonia Detection


dataset is essential for ensuring a balanced and unbiased model training process. In
this analysis, the dataset comprising 30,000 images was examined to ascertain the
proportion of normal and pneumonia cases.

Out of the total 30,000 images in the dataset, the majority, approximately 27,000,
were labeled as normal cases. This indicates a significant class imbalance, with
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 18

the normal class dominating the dataset. Conversely, only around 6,000 images
were classified as pneumonia cases, representing a much smaller proportion of the
dataset.

This imbalance in class distribution could have significant implications for model
training and performance. Models trained on imbalanced datasets tend to exhibit
biases towards the majority class, resulting in suboptimal performance in accurately
predicting minority classes. In the context of pneumonia detection, such biases could
lead to the underrepresentation of pneumonia cases and potentially compromise the
model’s ability to accurately identify and classify pneumonia-related abnormalities
in chest X-ray images.

Addressing this class imbalance is crucial to ensure the model’s robustness and ef-
fectiveness in real-world applications. Strategies such as class balancing techniques,
dataset augmentation, or specialized training algorithms may be employed to miti-
gate the effects of imbalance and improve the model’s predictive performance across
all classes.

4.5.2 Visualization of Class Distribution

To gain further insights into the dataset’s composition, a visual representation of


the class distribution was generated. The plot provided a clear overview of the
proportion of normal and pneumonia cases, facilitating a deeper understanding of
the dataset’s imbalance. Additionally, it enabled researchers to assess the need for
class balancing techniques to ensure fair model training.

4.5.3 Dataset Augmentation for Balanced Representation

To mitigate the effects of class imbalance, a decision was made to select an equal
number of images from each class for model training. This involved choosing 6,000
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 19

Figure 4.3: visual representation of the class distribution in the dataset

normal images to match the number of pneumonia images. Furthermore, to ex-


pand the dataset and enhance its diversity, various augmentation techniques such as
rotation, shifting, shearing, zooming, and horizontal flipping were applied to both
normal and pneumonia images. The augmented dataset, comprising 12,000 images
for each class, ensured a balanced representation of both normal and pneumonia
cases.

4.5.4 Creation of Comprehensive Training Dataset

By combining the original and augmented images, a comprehensive training dataset


of 24,000 images was curated. This dataset, with an equal representation of normal
and pneumonia cases, served as the foundation for training the pneumonia detec-
tion model. The careful curation and augmentation of the dataset aimed to create
a balanced and diverse training dataset, enabling the model to effectively learn and
generalize across different classes. This approach enhanced the model’s performance
and reliability in accurately classifying pneumonia cases while considering the con-
text of normal cases.
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 20

Figure 4.4: Centres of Lung Opacity rectangles (brown) over rectangles (yellow)
Sample size 2000

4.6 How Image Augmentation is performed?

Image augmentation is performed using the ImageDataGenerator class from the


Keras library. Here, Augmentation involves applying a set of transformations to the
original images to create new variations. These transformations include rotation,
width and height shifting, shearing, zooming, and horizontal flipping. By applying
these transformations, the dataset becomes more diverse, which can improve the
model’s ability to generalize and handle different variations in the data. The aug-
mented images are then saved to an output directory for further use in training or
evaluation
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 21

4.7 How the augmented data (approx. 24000 im-


ages) is divided into Batch before using it for
training model?

Data Preprocessing and Batch Generation

The data is divided into batches using the Keras ImageDataGenerator class. This
class facilitates real-time data augmentation and batch processing during model
training.

• The image size is set to 224 × 224, the batch size is set to 32, and the number
of classes is 2.

• Two instances of the ImageDataGenerator class are created: one for training
data (train datagen) and one for testing data (test datagen).

• The rescale parameter is set to 1/255, which normalizes the pixel values of
the images to the range [0, 1].

• For the training data generator, the flow from directory() method is called.
It takes the DIRECTORY path, target size (IMG SIZE, IMG SIZE), batch size
(BATCH SIZE), class mode set to ’categorical’ (since there are multiple classes),
and the list of class names (CATEGORIES) as arguments. The subset parameter
is set to ’training’, indicating that this generator will be used for training data.

• Similarly, for the testing data generator, the flow from directory() method
is called with the same parameters, except for the subset parameter set to
’validation’, indicating that this generator will be used for testing data.
Chapter 1. DenseNet-121: Empowering Pneumonia Detection with Dense
Connectivity and CNNs 22

During model training, the generators are used to load data in batches. Each batch
contains a set number of images (defined by BATCH SIZE) along with their corre-
sponding labels. The data is loaded and preprocessed on-the-fly, which allows for
efficient memory usage.
Chapter 5

Model Architecture

5.1 Model Architecture

The code snippet defines a model using the Sequential API from Keras. The model
architecture is based on the DenseNet121 pre-trained model, with additional layers
added on top.

5.1.1 Loading Pre-Trained DenseNet121 Model

The DenseNet121 model is loaded using the DenseNet121() function. The include top
parameter is set to False to exclude the top (fully connected) layers of the model.
Pre-trained weights from the ImageNet dataset are loaded using the weights pa-
rameter. The input shape of the model is specified as (224, 224, 3), representing
RGB images with a size of 224 × 224 pixels.

23
Chapter 5. Model Architecture 24

5.1.2 Transfer Learning

Next, the first 100 layers of the DenseNet model are frozen by setting their trainable
attribute to False. This allows for transfer learning, where the pre-trained weights
are kept fixed during the initial training.

5.1.3 Sequential Model Initialization

A Sequential model is created using the Sequential() function.

5.1.4 Adding Layers

The DenseNet model is added to the Sequential model using the add() method,
treating it as a single layer within the architecture. A Flatten layer is added to
the Sequential model using the add() method, which converts the output from the
DenseNet model into a 1D vector. Dense layers with 64 units and ’relu’ activation
are sequentially added to the Sequential model using the add() method, performing
linear transformations followed by rectified linear activation. Another Dense layer
with 256 units and ’relu’ activation is added to further transform the output from the
previous layer. Finally, a Dense layer with softmax activation is added to produce
the output probabilities for the classification task.

5.1.5 Model Compilation

The model is compiled using the compile() method. The Adam optimizer with a
learning rate of 0.001 is used. The loss function is set to ’categorical crossentropy’
since it is a multi-class classification problem. The accuracy metric is specified to
evaluate the model’s performance during training.
Chapter 5. Model Architecture 25

In summary, the model is based on the DenseNet121 architecture with some mod-
ifications. It has multiple Dense and Flatten layers, followed by a softmax output
layer. The model is compiled with the Adam optimizer and categorical cross-entropy
loss function. The model is trained using the batches of data in an iterative manner,
with each batch contributing to the optimization of the model’s parameters. This
approach allows for efficient utilization of computational resources and enables the
training of models on large datasets.

5.2 Summary

Figure 5.1: Model Code

In summary, the model is based on the DenseNet121 architecture with some mod-
ifications. It includes multiple Dense and Flatten layers, followed by a softmax
output layer. The model is compiled with the Adam optimizer and categorical
cross-entropy loss function. During training, the model utilizes batches of data in
an iterative manner, with each batch contributing to the optimization of the model’s
Chapter 5. Model Architecture 26

Figure 5.2: Model summary

parameters. This approach enables efficient utilization of computational resources


and facilitates the training of models on large datasets.

5.3 Results Of Model Training

The code snippet demonstrates the training of a deep learning model for pneumonia
detection using the DenseNet121 architecture. Here’s a detailed explanation of the
training process:

1. Training Configuration: The model is trained using the fit() method,


which takes the training data generator (train generator) as input. The
number of epochs is set to 30, indicating the number of complete passes
through the training dataset. Additionally, the validation data generator
(test generator) is provided to evaluate the model’s performance on unseen
data during training.
Chapter 5. Model Architecture 27

2. Training Progress: During training, progress updates are displayed for


each epoch. For each epoch, the model processes batches of training data
(train generator) and updates its parameters to minimize the loss function.
The loss and accuracy metrics are calculated for both the training and valida-
tion datasets.

3. Epoch-by-Epoch Results: The training progress is reported epoch by epoch.


For each epoch, the following information is displayed:

• Epoch Number: Indicates the current epoch number out of the total
number of epochs.

• Batch Processing: The training data is divided into batches, and each
batch is processed sequentially. The number of batches processed in the
current epoch is displayed.

• Metrics: The training metrics, including loss (measured by categori-


cal cross-entropy) and accuracy, are reported for both the training and
validation datasets.

• Validation Performance: The validation loss and accuracy metrics


indicate how well the model generalizes to unseen data. These metrics
help monitor overfitting and guide model training.

4. Training Duration: The time taken to complete each epoch is displayed.


This provides insights into the computational resources required for training
the model.

5. Conclusion: After 30 epochs, the model achieves a final validation accuracy


of approximately 73.93%. This indicates that the model can accurately classify
pneumonia cases from chest X-ray images with a certain degree of accuracy.
However, further analysis may be needed to optimize the model’s performance
and address any potential issues such as overfitting.
Chapter 5. Model Architecture 28

Overall, the training process involves iteratively optimizing the model’s parameters
to minimize the loss function and improve its ability to classify pneumonia cases. By
monitoring the training progress and validation performance, researchers can assess
the effectiveness of the model and make informed decisions to refine the training
process and enhance the model’s performance.

Figure 5.3: Results Of Model Training


Appendix A

Features Overview

A.1 Creating Boards

Description: Using this tool, users may arrange jobs and projects visually on boards.
Use: Users may make boards to efficiently organise and manage their tasks.

A.2 Including New People

Description: This feature allows users to create project teams and invite and add
new members. Usage: By inviting team colleagues, stakeholders, or clients, users
may promote cooperation.

A.3 Video Chat and Calling

Description: This feature makes it easier to communicate visually in real time within
the programme.

29
Appendix A. Appendix 30

Usage: To ensure smooth communication with team members and stakeholders,


users may start video calls and chats.

A.4 Progress Monitoring

Description: This feature gives users the ability to keep an eye on the state and
advancement of tasks and projects.
Use: Users are able to monitor project milestones, spot bottlenecks, and guarantee
on-time completion.

A.5 Task Delegation

Description: This feature enables users to designate particular tasks to members of


their team.
Use: By assigning roles, users may guarantee responsibility and clarity in the
project’s execution.
Bibliography

31

You might also like