.Amit Report
.Amit Report
on
Deep Learning
at NIT Kurukshetra
in
Computer Science & Engineering
by
Amit Shukla
Roll No. 202065
Batch 2020-24
Name
Amit Shukla
202065
About Institute
Contact Details
1. Description
2. Detected Pneumonia from Chest X-ray images using a
Custom Deep Convolutional Neural Network and by
retraining the pre-trained model “InceptionV3” with 5856
images of X-ray (1.15GB).
Tools / Libraries:
Languages: Python
Tools/IDE : Anaconda
Libraries: Keras, TensorFlow, Inception, ImageNe
Onboarding E-Mail
ACKNOWLEDGEMENT
I would like to thank Prof. Phool Singh, the dean of the Central University of
Haryana's School of Engineering and Technology, for his steadfast support and
encouragement during this endeavor. His vision and guidance have guided my
academic trajectory.
I would like to express my sincere gratitude to Dr. Rakesh Kumar, the head of
the Department of Computer Science and Engineering, for his tremendous
advice and assistance. I have been greatly motivated by his profound knowledge
of the topic and his capacity to motivate pupils.
Additionally, I would like to thank the dataset suppliers and several open-source
libraries for their contributions. Their resources have greatly aided and enriched
this project's growth. We especially appreciate the commitment to open research
and technology shown by the developers and maintainers of these programs and
datasets.
The heart of this project lies in the meticulously designed CNN architecture.
Comprising multiple convolutional layers, max-pooling layers, and dense
layers, this model excels in classifying X-ray images into 'Normal' and
'Pneumonia' categories. Detailed analysis, comprehensive documentation, and
evaluation metrics showcased in the accompanying notebook provide an
insightful understanding of the model's performance, including accuracy, loss,
and visualization of results.
Users can effortlessly upload X-ray images, allowing rapid analysis and prompt
results. The intuitive drag-and-drop functionality simplifies the diagnostic
process, offering a glimpse into the future of medical technology's intersection
with user-centric design.
vi
List of Figures
vii
Table of Contents
Certificate i
Internship Certificate ii
Declaration iii
Acknowledgment iv
Abstract V
List of Figures vi
Chapter 1 Overview of the Company 1
1.1 Purpose of internship 1
1.2 Research and Development 1
1.3 About us 2
Chapter 2 Overview of the Department 3
2.1 It includes the details about the work being carried out in each department 3
2.2 List the technical specifications of major equipment used in each department 3
2.3 Explain in detail about each stage of production 4
Chapter 3 Introduction to Project 6
3.1 Summary of Project 6
3.2 Purpose 6
3.3 Objective 6
3.4 Scope 7
3.5 Technology and Literature Review 8
3.6 Project / Internship Planning 8
Chapter 4 System Analysis 10
4.1 Study of Current System 10
4.2 Algorithms & Techniques 10
4.3 Dependencies 11
4.4 Features of the Proposed System 11
Chapter 5 System Design 13
5.1 System Design & Methodology 13
5.2 Datasets 13
5.3 Process Design and Flowchart 18
5.4 Wow Factor in Solution 18
viii
Chapter 6 Implementation 19
6.1 Code Description 19
6.2 Result & Outcomes 20
6.3 Video Demo Link 20
6.4 Result Analysis 20
6.5 Screenshots from the Application 20
Chapter 7 Conclusion 24
7.1 Achievements 24
7.2 Future Prospective 24
References 25
Appendix 1 – NOC Letter 26
ix
Overview of the Company
CHAPTER 1
2.1 It includes the details about the work being carried out in each department.
The work being carried out in each department at the GTU – Software Technology and Emerging
Group
Artificial Intelligence (AI) and Machine Learning (ML)
This department focuses on cutting-edge research and practical applications of AI and ML.
Projects may involve creating intelligent chatbots, recommendation systems, and image
recognition algorithms.
Internet of Things (IoT)
The IoT department explores the interconnected world of devices, sensors, and data. Projects
could include building smart sensors, developing energy-efficient protocols, and analyzing
real-time data streams.
Data Science
Data science is all about extracting valuable insights from large datasets. Projects might
involve analyzing customer behavior, predicting stock market trends, or optimizing supply
chain logistics.
SAP ABAP Programming
ABAP (Advanced Business Application Programming) is a programming language used in
SAP systems. Projects could include creating custom modules, integrating external systems,
and improving business processes.
3
Overview of the Department
Arduino Kits
Arduino boards for sensor interfacing and basic IoT projects.
Specifications
Microcontroller ATmega328P
Digital I/O Pins 14
Analog Input Pins 6
Connectivity USB, UART
Data Science
Data Servers
These servers store and manage large datasets.
Specifications
CPU Dual Intel Xeon processors
Storage RAID-configured HDDs (Hard Disk Drives)
Database PostgreSQL, MySQL
Jupyter Notebooks
Used for data exploration and
analysis. Specifications
CPU Intel Core i7 or AMD Ryzen
RAM 32 GB
Storage SSD
SAP ABAP Programming
SAP Development Servers
These servers run the SAP NetWeaver ABAP
stack. Specifications
CPU Intel Xeon
RAM 128 GB
Storage SAN (Storage Area Network)
Database SAP HANA
4
Overview of the Department
This stage involves brainstorming and defining the purpose of the product. It includes
identifying the problem the product aims to solve, understanding user needs, and
envisioning the desired outcome.
Design and Planning
Design lays the foundation for the product’s functionality, aesthetics, and user experience.
Define user flows and interactions. Define architecture, components, and technologies
.
This stage involves turning design concepts into a functional product. Connect front-end and back-
end components. Develop server-side logic (using languages like Python, Java, or Node.js).Set up
databases (SQL, NoSQL). Implement APIs and third-party services.
Ensure the product meets requirements, functions correctly, and is free of defects. Test, verify &
Validate the components. Involve users to test real-world scenarios. Deployment and Release
Make the product available to users. Deploy the product to a staging server for final testing.
Deploy the product to the live server. Monitor performance, security, and scalability. Address any
issues promptly.
5
Introduction to Project
3.2 Purpose
Early Detection Early detection of pneumonia is crucial for timely treatment and
management, especially in vulnerable populations such as children and the elderly. CNNs
can analyze X-ray images quickly and accurately, potentially identifying pneumonia at an
earlier stage than traditional methods.
Automation and Efficiency Automating the detection process through deep learning
algorithms reduces the need for manual interpretation of X-ray images by radiologists. This
can significantly increase the efficiency of diagnosis, especially in settings where access to
radiologists is limited.
Improving Patient Outcomes By enabling earlier detection and more accurate diagnoses,
CNN-based pneumonia detection systems have the potential to improve patient outcomes.
Timely identification of pneumonia can lead to prompt initiation of treatment, reducing the
risk of complications and improving overall prognosis.
3.3 Objective
Unified Classification Through the utilization of Convolutional Neural Networks, the
project endeavors to classify X-ray images into 'Normal' and 'Pneumonia' categories,
encapsulating both bacterial and viral pneumonia cases. This unified classification
6
Introduction to Project
framework simplifies the diagnostic process, aiding in swift and accurate identifications for
medical practitioners.
Enhanced User Experience An inherent aspect of this project involves the development
of a user-friendly GUI that encapsulates the intricacies of pneumonia detection while
ensuring a seamless and enriching experience for medical professionals. By leveraging
intuitive design elements and straightforward functionalities, the application promises to
simplify complex diagnostic procedures.
Continuous Improvement and Community Engagement Beyond its current state, this
project stands as an evolving endeavor. It invites community engagement, feedback, and
contributions, fostering an environment of constant improvement. Bug reporting, issue
tracking, and active collaboration are encouraged, fueling the drive toward enhancing the
application's efficacy and user experience.
Intersection of Technology and Medicine At its core, the project represents a
convergence of technology and medicine, leveraging the capabilities of deep learning and
graphical interface design to bridge the gap between innovation and healthcare. It strives to
not only deliver diagnostic results but also contribute to the evolution of medical diagnostics
through modern technological advancements.
3.4 Scope
Research and Development There is ongoing research and development in improving the
performance and robustness of CNN models for pneumonia detection. This includes
optimizing network architectures, exploring novel training techniques, and investigating
ways to enhance the interpretability of model predictions.
Education and Training CNN-based pneumonia detection can also be integrated into
medical education and training programs for radiologists, physicians, and other healthcare
professionals. By providing access to annotated datasets and training resources, these
systems can help trainees develop the skills necessary for accurate interpretation of X-ray
images.
Continuous Improvement Continuous monitoring and evaluation of CNN-based
pneumonia detection systems are essential to ensure their ongoing effectiveness and
reliability. This includes monitoring performance metrics, gathering user feedback, and
incorporating updates and improvements based on evolving clinical needs and technological
advancements.
7
Introduction to Project
8
System Analysis
9
System Analysis
4.3 Dependencies
The dependencies for the XRay-Pneumonia-Detection-GUI project involve a set of essential
libraries and frameworks required to run the project successfully. These dependencies
facilitate the development, training, and deployment of the deep learning model and the
graphical user interface (GUI) application. Here are the core dependencies
Python (programming language)
Python serves as the primary programming language used in this project.
Pip (package manager for Python)
Pip is utilized for installing and managing Python libraries and packages.
TensorFlow
TensorFlow, an open-source machine learning framework, is a fundamental
component used for training the X-ray pneumonia classification model.
NumPy
NumPy is a library for numerical computing in Python. It is used for efficient
handling of arrays and data manipulation.
OpenCV (Open Source Computer Vision Library)
OpenCV is a popular computer vision library employed for various image processing
and analysis tasks.
Matplotlib
Matplotlib is a plotting library used for generating visualizations from data,
potentially used for model performance visualization in this project.
Kivy
Kivy is an open-source Python library used for developing crossplatform graphical
user interface (GUI) applications.
KivyMD
KivyMD is a library that provides Material Design components specifically designed
for Kivy applications.
Speed CNN-based algorithms can process X-ray images quickly, enabling rapid
diagnosis and treatment decisions.
Scalability Deep learning models can be scaled to handle large volumes of X-ray images,
making them suitable for use in healthcare settings with high patient throughput.
Adaptability Deep learning models can be adapted and fine-tuned for specific patient
populations or imaging modalities, enhancing their applicability across different healthcare
settings.
Continuous improvement As more data becomes available and algorithms are refined,
CNN-based pneumonia detection systems can continuously improve their performance and
accuracy over time.
11
System Design
12
System Design
13
System Design
Performance Analysis
Based on the evaluation metrics, the model demonstrates superior performance in predicting
the 'PNEUMONIA' class (94% accuracy) compared to the 'NORMAL' class (72.2%
accuracy). However, it is important to note that the model's performance can be further
enhanced through optimizations and improvements.This comprehensive model architecture
aims to accurately identify pneumonia cases in X-ray images, providing a valuable tool for
medical professionals in automating and expediting the pneumonia diagnosis process.
5.2 Datasets
The dataset used in the XRay-Pneumonia-Detection-GUI project is a critical component in
training and evaluating the machine learning model for pneumonia detection in X-ray
images. Let's delve into the details of the datasets utilized in this project.
Datasets Used Chest X-Ray Images (Pneumonia) from Kaggle.
Dataset Link Kaggle Dataset Link
14
System Design
Description This dataset contains chest X-ray images collected from various
sources, including pediatric and adult patients. It includes images categorized into
two classes "Normal" and "Pneumonia." The "Pneumonia" class encompasses X-
ray images depicting both bacterial and viral pneumonia cases. The dataset has a
substantial number of X-ray images belonging to each category, enabling robust
training and validation of the model.
In this model a dataset from Kaggle was used. It contained 5863 Chest X-Ray
Images in Jpeg format and the images were categorized into a) Train b) Test and c)
Validate categories. These were further broken into 2 categories, Pneumonia and
Normal. The dataset covers both Normal X-Ray images and X-Ray images with
Pneumonia.
16
System Design
17
Implementation
CHAPTER 6 IMPLEMENTATION
File Structure
The application code is organized into various files and folders, each serving a specific
purpose
Main Python Script (main-GUI.py)
This script initiates the application and handles the primary functionalities of the
GUI.
It might include imports, configuration settings, and the main application class.
Kivy Language File (design.kv)
This file defines the graphical layout and design of the application using the Kivy
language.
It contains instructions for creating widgets, defining their properties, positioning
elements, and managing the GUI's appearance.
Model File (model-N/)
Directory containing the pre-trained deep learning model and its related files required
for inference.
Includes the architecture, weights, and other necessary components of the trained
neural network model.
Configuration File (config.json)
JSON file storing various configuration parameters used by the application, such as
model paths, window settings, and performance metrics.
Assets and Resources (Images, etc.)
Additional files or resources necessary for the application's functionalities, such as
images for the interface, icons, or any other required media.
18
Implementation
19
Implementation
20
Implementation
21
Implementation
22
Conclusion
CHAPTER 7 CONCLUSION
7.1 Achievements
Automated Pneumonia Detection The project achieved automation in pneumonia
detection by utilizing deep learning techniques, enabling efficient and rapid classification of
X-ray images.
User-Friendly Interface The user-friendly GUI simplified the process of uploading X-ray
images, providing intuitive functionalities for medical professionals to obtain quick and
reliable results.
Model Performance The developed CNN model showcased promising performance,
accurately classifying pneumonia cases with high accuracy, thus contributing to early and
accurate diagnoses.
23
References
REFERENCES
4. Glozman, T., Liba, O. Hidden Cues Deep Learning for Alzheimer’s Disease
Classification CS331B project final report (2016)
5. Kumar, A., Sangwan, S.R., Arora, A., Nayyar, A., Abdel-Basset, M. Sarcasm
detection using soft attention-based bidirectional long short-term memory model
with convolution network. IEEE Access 7, 23319–23328 (2019)
6. Neuman M., Lee E., Bixby S., Diperna S., Hellinger J., Markowitz R., et al.
Variability in the interpretation of chest radiographs for the diagnosis of
pneumonia in children. Journal Of Hospital Medicine. 7, 294–298 (2012) pmid
22009855
7. Stephen O., Sain M., Maduh U. & Jeong D. An efficient deep learning approach
to pneumonia classification in healthcare. Journal Of Healthcare Engineering.
2019 (2019) pmid 31049186
24
Apendix
Code-
RESEARCH GAPS
1. Model Architecture: While both studies propose advanced deep learning models for chest X-
ray image classification, there is a research gap in exploring alternative architectures beyond
Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs). Investigating newer
architectures like graph convolutional networks or attention mechanisms could provide further
improvements in accuracy and efficiency.
2. Dataset Diversity: The first study focuses on a benchmark dataset containing four classes:
Normal, COVID-19, Pneumonia-Viral, and Pneumonia-Bacterial. However, there is a research
gap in evaluating model performance on more diverse datasets with additional classes or
variations in demographics. Incorporating datasets from different regions or populations could
reveal potential biases or variations in model performance.
3. Interpretability: Both studies highlight the importance of accurate chest X-ray classification for
medical diagnoses. However, there is a research gap in addressing the interpretability of the deep
learning models. Exploring techniques for model explainability and providing insights into the
features driving classification decisions could enhance clinical trust and the adoption of these
models.
Clinical Validation: While the studies demonstrate promising results in terms of accuracy and efficiency, there is
a research gap in conducting rigorous clinical validation of the proposed models