0% found this document useful (0 votes)
24 views101 pages

Mani Final

The project report focuses on utilizing image enhancement techniques and deep learning to improve tuberculosis (TB) diagnosis through chest X-ray analysis. By employing Convolutional Neural Networks (CNNs), the project aims to automate feature extraction and enhance detection accuracy, particularly in resource-limited settings. The integration of these technologies represents a significant advancement in public health efforts to combat TB globally.

Uploaded by

chilkamadhu
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)
24 views101 pages

Mani Final

The project report focuses on utilizing image enhancement techniques and deep learning to improve tuberculosis (TB) diagnosis through chest X-ray analysis. By employing Convolutional Neural Networks (CNNs), the project aims to automate feature extraction and enhance detection accuracy, particularly in resource-limited settings. The integration of these technologies represents a significant advancement in public health efforts to combat TB globally.

Uploaded by

chilkamadhu
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/ 101

A Project Report on

Tuberculosis Risk Assessment By Image Enhancing Using Deep Learning

Submitted in partial fulfillment of the requirements for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY

Submitted By

B.J.V.S.Manikanta -21JR5A1204

Under the Guidance of


Miss.N.M.V.Nirmala M.TECH
Assistant professor Department of IT

DEPARTMENT OF INFORMATION TECHNOLOGY

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES


(Autonomous)
Vinjanampadu (V), Vatticherukuru (M), Guntur (Dt), A.P-522017.

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY


:KAKINADA

APRIL – 2024.
KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES
(Autonomous)
Vinjanampadu (V), Vatticherukuru (M), Guntur (Dt), A.P-522017.

CERTIFICATE

This is to certify that this project report entitled “Tuberculosis Risk Assessment By
Image Enhancement Using Deep Learning” submitted by B.J.V.S.Manikanta
(21JR5A1204) to Jawaharlal Nehru University Kakinada, through KKR & KSR Institute
of Technology and Sciences for the award of the Degree of Bachelor of Technology in
INFORMATION TECHNOLOGY is a bonafide record of project work carried out by
them under my supervision during the year 2024.

SUPERVISOR HEAD OF THE DEPARTMENT

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
DECLARATION

We here by declare that the project “Tuberculosis Risk Assessment By Image


Enhancing Using Deep Learning ” has been carried out by me and this work has been
submitted to KKR & KSR Institute of Technology and Sciences (A), Vinjanampadu,
affiliated to Jawaharlal Nehru Technological University, Kakinada in partial fulfillment
of the requirements for the award of degree of Bachelor of Technology in Information
Technology.We further declare that this project work has not been submitted in full or
part for the award of any other degree in any other educational institutions.

21JR5A1204 B.J.V.S.Manikanta

iii
ACKNOWLEDGEMENT

We would like to express our profound gratitude towards Miss.N.M.V.Nirmala,


Department of Information Technology, who played a supervisory role to at most
perfection, enabled us to seek through our IV-II B. Tech project and for guidance as an
internal guide methodically and meticulously.

We express our gratitude towards all the faculty members and non-teaching
faculty members, the Department of INFORMATION TECHNOLOGY.

We are highly indebted to Dr. M. Srinivasa Sesha Sai, Head of the Department,
Department Of Information Technology for providing us with all the necessary
support.

We render our deep sense of gratitude to Dr. P. BABU, Principal and Dr. K. Hari
Babu, Director Academics for permitting us to carry out our main project works. We
would like to express our sincere thanks to Information Technology staff for lending us
their time to help us complete the work successfully.

We are very much thankful to the Sri K. SUBBARAO, Chairman and Sri K. SHEKAR,
Secretary for their continuous support and facilities provided. We would also like to
thank our staff, parents and friends for their enduring encouragement and assistance
whenever required.

21JR5A1204 B.J.V.S.Manikanta

iv
INSTITUTE VISION AND MISSION

INSTITUTION VISION
• To produce eminent and ethical Engineers and Managers for society by imparting quality
professional education with an emphasis on human values and holistic excellence.

INSTITUTION MISSION
• To incorporate benchmarked teaching and learning pedagogies in the curriculum.
• To ensure the all-around development of students through a judicious blend of curricular,
co-curricular, and extra-curricular activities.
• To support the cross-cultural exchange of knowledge between industry and academy.
• To provide higher/continued education and research opportunities to the employees of the
institution.

v
DEPARTMENT OF INFORMATION TECHNOLOGY

VISION OF THE DEPARTMENT

• To produce competent professionals in the field of Information Technology to meet the


global needs of industry and society.

MISSION OF THE DEPARTMENT

DM1 Strengthen the Core Competence through the state-of-the-art concepts in a


congenial Environment.
DM2 Promote innovative research and development for the application of IT to the
Economic, Social and Environmental users.

DM3 Inculcate professional behaviour, lifelong learning and strong ethical values
to meet the challenges in Information Technology
DM4 Establish centers of excellence in leading areas of Information Technology

PROGRAM SPECIFIC OUTCOME (PSO’S)


PSO1: Application Development
Able to develop the business solutions through Latest Software Techniques and
tools for real time Applications.
PSO2: Professional and Leadership
Able to practice the profession with ethical leadership as an entrepreneur through
participation in various events like Ideathon, Hackathon, project expos and
workshops.
PSO3: IT infrastructure
Ability to Analyze and recommend the appropriate IT infrastructure required for
the implementation of a project

vi
Program Educational Objectives (PEOs)
PEO 1:
Domain Knowledge: Have a strong foundation in areas like mathematics, science
and engineering fundamentals so as to enable them to analyse and solve engineering
problems and prepare the students to careers, R&D and studies of higher level.

PEO 2:
Professional Employment: Have the ability to analyse and understand the
requirements of software, and technical specifications required and provide novel
engineering solutions to the problems associated with hardware and software.

PEO 3:
Higher Degrees: Have exposure to cutting edge technologies thereby making them
to achieve excellence in the areas of their studies.

PEO 4:
Engineering Citizenship: Work in teams on multi-disciplinary projects with effective
communication skills and leadership qualities.
PEO 5:
Lifelong Learning: Have a successful career wherein they strike a balance between
ethical values and commercial values.

vii
PROGRAM OUTCOMES (POS)

1. Engineering knowledge:

Apply the knowledge of mathematics, science, engineering fundamentals, and an


engineering specialization to the solution of complex engineering problems.

2. Problem analysis:

Identify, formulate, research literature, and analyze complex engineering problems reaching
substantiated conclusions using the first principles of mathematics, natural sciences, and
engineering sciences.

3. Design/development of solutions:

Design solutions for complex engineering problems and design system components or
processes that meet the specified needs with appropriate consideration for public health and
safety, and cultural, societal, and environmental considerations.

4. Conduct investigations of complex problems:

Use research-based knowledge and research methods including design of experiments,


analysis and interpretation of data, and synthesis of the information to provide valid
conclusions.

5. Modern tool usage:

Create, select, and apply appropriate techniques, resources, and modern engineering and IT
tools including prediction and modeling to complex engineering activities with an

understanding of the limitations.

6. The engineer and society:

Apply reasoning informed by the contextual knowledge to assess societal, health, safety,
legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.

viii
7. Environment and sustainability:

Understand the impact of professional engineering solutions in societal and environmental


contexts, and demonstrate the knowledge of, and need for sustainable development.

8. Ethics:

Apply ethical principles and commit to professional ethics and responsibilities and norms of
the engineering practice.
9. Individual and team work:

Function effectively as an individual, and as a member or leader in diverse teams, and in


multidisciplinary settings.

10. Communication:

Communicate effectively on complex engineering activities with the engineering community


and with society at large, such as being able to comprehend and write effective reports and
design documentation, make effective presentations, and give and receive clear instructions.

11. Project management and finance:

Demonstrate knowledge and understanding of the engineering and management principles


and apply these to one‟s own work, as a member and leader in a team, to manage projects
and in multidisciplinary environments.

12. Life-long learning:

Recognize the need for, and have the preparation and ability to engage in independent and
life-long learning in the broadest context of technological change.

ix
Course Outcomes (COs)

CO421.1: Perform system of examinations to identify problem.

CO421.2: Review the literature/Related work.

CO421.3: Defining the problem & it's area of domain.

CO421.4: Proposal of solution for the selected area/methodology.

CO421.5: Analysis of the proposed work & documentation.

CO421.6: Acquire collaborative learning, leadership qualities & presentation skills

Course Outcomes - Program Outcomes mapping

PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 PSO1
2 3
CO421.1 2 3 2 2 3
CO421.2 3 2 2 3 2
CO421.3 3 2 3 3 1 2 1
CO421.4 2 3 2 2 2 1 2 3 2
CO421.5 2 2 2 2 2
CO424.6 1 2 2 2 2 2 3

3: High 2: Medium 1: Low

Program Educational Objectives – Program Specific Outcomes correlation

PSO1 PSO2 PSO3


PEO1 2 1 3
PEO2 3 2
PEO3 1 2 3
PEO4 3 2
PEO5 1 3 2
3: High 2: Medium 1: Low

x
CO-PO Mapping with Reasons
1. CO421.1 is mapped with PO1, PO2 and PO4, PO6, PO7 as basic knowledge of
Engineering and problem Analysis activities are highly essential to conduct
examinations on existing systems which have been using in industries as a part of and
to define the problem of proposed system.

2. CO421.2 is mapped with PO1, PO2, PO4 and PO6, PO9, PO10, PO11 as for
identification, gathering analysis and classification of requirements for the proposed
system, basic knowledge of engineering and Analysis steps along with complex
problem analysis through the efforts of team work in order to meet the specific needs
of the customer.
3. CO421.3 is mapped with PO2, PO5 and PO12 as to conduct the literature review and
to examine the relevant systems to understand and identify the merits and demerits of
each to enhance and develop the proposed as per the need.
4. CO421.4 is mapped with PO1, PO2, PO3, PO4, PO5 and PO7, PO8, PO9, PO10
because modularization and design of the project is needed after requirements
elicitation. For modularization and design of the project, Basic knowledge of
Engineering, Analysis capabilities, Design skills and communication is needed between
team members as different modules are designed individually before integration.
5. CO421.5 is mapped with PO3, PO5, PO7, PO9, PO11 and PO12 as to construct the
project latest technologies are needed. The development of project is done individually
and in groups with well-defined communication by using the engineering and
management principles.
6. CO421.6 is mapped with PO6, PO10 and PO12 because during and after completion
of the project, documentation is needed along with proper methods of presentation
through understanding and application of engineering and management principles,
which in turn needs well defined communication between the team members with all
the ethical values. Even the project development team defines the future enhancements
as a part of the project development after identifying the scope of the project.

xi
CO-PSOs Mapping with Reasons

1. CO421.1 is mapped with PSO1 as examining of existing systems and identification of the
problem is a part of Application Development activity and identification of evolutionary
changes in latest technologies.
2. CO421.2 is mapped with PSO1, PSO2 and PSO3as identifying and classifying the
requirements is a part of Application development and evolutionary computing changes and
also follows ethical principles.
3. CO421.3 is mapped with PSO1, PSO3 as review of literature is a part of application
development activity by recognizing the computing technologies and their evolutionary
changes.
4. CO421.4 is mapped with PSO1, PSO3 because modularization and logical design is also a
part of Application development and follows computing changes using Deep learning
technology.
5. CO421.5 is mapped with PSO1, PSO2 as Testing, Development and Integration of project
activities are part of Application development and follows ethical principles.
6. CO424.6 is mapped with PSO2 as for project documentation and presentation; the project
team members apply the professional and leadership quality.

xii
ABSTRACT

The project targets Tuberculosis (TB) using image enhancement techniques and deep neural
networks. TB, driven by Mycobacterium tuberculosis, stands as a major global health challenge.
Employing image enhancement methods enhances the clarity of chest X-rays, thereby aiding in
the detection of TB. A varied dataset is utilized to train a deep neural network architecture,
encompassing both TBpositive and negative cases. This architecture, leveraging Convolutional
Neural Networks (CNNs), automates feature extraction, enabling precise TB prediction from
chest X-ray images. The project's primary objective is to significantly enhance the accuracy and
efficiency of TB diagnosis.

Automated systems based on deep learning algorithms provide swift interpretations of X-ray
images, offering crucial support in settings with limited access to radiologists.This assistance is
particularly vital in resource-constrained environments. The integration of image enhancement
techniques and deep learning algorithms within the project represents a significant advancement
in TB diagnosis. Its potential to augment detection accuracy and aid global TB control efforts
underscores its importance. Through innovative technology, the project contributes to improved
public health outcomes and the alleviation of TB's burden worldwide.

Keywords: Tuberculosis (TB), image enhancement techniques, deep neural networks, chest X-
rays, varied dataset, Convolutional Neural Networks (CNNs), feature extraction, TB diagnosis,
X-ray images interpretation, resource-constrained environments.

Xii
INDEX

CHAPTERS PAGE NO
ABSTRACT 1
1. INTRODUCTION
1.1 Introduction of the Project 2
1.2 Existing System 2
1.3 Proposed System 3
1.4 Potential Users 4
1.5 Unique features of the System 4
1.6 Demand for the product 5
1.7 Protection of Idea 6
2. ANALYSIS
2.1 Literature Review 7
2.2 Requirements Analysis 11
2.2.1 Functional Requirement Analysis 11
2.2.2 User Requirements 11
2.2.3 Non-Functional Requirements 12
2.2.4 System Requirements 13
2.3 Modules Description 13
2.4 Feasibility Study 14
2.4.1 Technical Feasibility 14
2.4.2 Operational Feasibility 14
2.4.3 Behavioral Feasability 15
2.5 Process Model Used 15
2.6 Hardware and Software Requirements 19
2.7 SRS Specification 21
3. DESIGN PHASE 21
3.1 Design Concepts and Constraints 22
3.2 Design Diagram of the System 23
3.2.1 Use Case Diagram 24
3.2.2 Class Diagram 25
3.3 Conceptual Design 25
3.4 Logical Design 25
3.5 Sequence Diagram 26
3.6 Activity Diagram 27
3.7 Architecture Design 27
3.7.1 Dataset Training Model 28
3.7.2 yolo model timeline 30
3.7.3 yolo model architecture 31
3.8 Algorithms Design 34
3.9 Module Design Specifications 35
4. CODING & OUTPUT SCREENS
4.1 Sample Coding 38
4.2 Output Screens 45
5. TESTING
5.1 Introduction to testing 48
5.2 Types of Testing 48
5.3 Test Cases and Test Reports 51
6. IMPLEMENTATION
6.1 Implementation Introduction 58
6.2 Implementation Procedure and Steps 58
6.3 User Manual 62
7. CONCLUSIONS AND FUTURE ENHANCEMENTS
7.1 Conclusions 64
7.2 Future Enhancements 64
8. BIBLIOGRAPHY
8.1 References 73
8.2 Books Referred 75
8.3 Websites Visited 75
LIST OF FIGURES

FIG NO FIGURE NAME PAGE NO

1 Process of CNN Model 24


3.2.2 Use Case Diagram 25
3.5.1 Class Diagram 26
3.6.1 Sequence Diagram 27
3.7.1 Activity Diagram 28
3.7.1.1 Collaboration Diagram 30
3.7.2.1 System Architecture 30
3.7.3.1 Data flow Diagram for User 31
3.7.3.2 Sign up Page 32
4.1 Login Page 41
4.2 Drag and drop file 45
4.3 Choosing the image 45
4.4 Image processing 47
4.5.1 Extracted data 47
4.5.2 Stored in Database 48
4.5.3 Logged out from account 48
4.5.4 Directs to home page 49
4.5.5 Build and generated signed 49
4.6 Environment is bulided 50

xiv
LIST OF TABLES

TABLE NO TABLE NAME PAGE NO

5.3.1 Test case for User Login 51


5.3.2 Test case for Admin Login 52
5.3.3 Test case for Registration 53
5.3.4 Test case for functionality of search 54
5.3.5 Test case to add data 55
5.3.6 Test case on location Analysis 56
5.3.7 Test case on Output 57

xv
Department Of Information Technology

CHAPTER – 1
INTRODUCTION

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 1


Department Of Information Technology
CHAPTER-1
INTRODUCTION
1.1 Introduction of the project
The integration of deep learning marks a transformative shift in addressing the global health
challenge posed by Tuberculosis (TB). Traditionally, TB diagnosis relied on methods that were
often slow and not consistently accurate, leading to delays in treatment and potential
complications. However, with the advent of deep learning technologies, there has been a
significant improvement in TB diagnostics. These technologies enable the development of
automated systems that can rapidly analyze medical imaging data, such as chest X-rays, and
accurately detect TB infections. By leveraging deep neural networks and advanced algorithms,
these systems automate the process of TB diagnosis, providing faster and more reliable results
compared to traditional methods. This not only expedites the identification of TB cases but also
facilitates timely intervention and treatment, ultimately reducing the spread of the disease and
improving patient outcomes. Furthermore, the scalability of deep learning-based solutions
holds promise for addressing TB in resource-constrained environments where access to skilled
healthcare professionals may be limited. Overall, the integration of deep learning technologies
represents a significant advancement in combating TB, offering hope for more effective control
and management of this life-threatening disease on a global scale.

1.2 Existing System

The Traditional methods for diagnosing tuberculosis (TB) are slow and often inaccurate,
leading to delays in treatment and potential spread of the disease.Limited access to high-quality
and diverse datasets.Additionally, TB chest X-ray (CXR) images are frequently low in contrast,
making accurate interpretation challenging.To address these issues,we go with the image
enhancement algorithms,which can enhance the accuracy and efficiency of TB detection from
CXR images.

1.3 Proposed System

Our Data Preparation involves collecting and preprocessing a diverse dataset of chest X-ray
images specifically for TB detection. This dataset must encompass a wide range of cases to
ensure the robustness and generalization of the model. Preprocessing involves standardizing
the size and resolution of the images to ensure uniformity across the dataset. This step is crucial
for effective training of the deep learning model, as it ensures that the model can learn from
the data consistently without being influenced by variations in image dimensions.

1.4 Introduction of the project


KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 2
Department Of Information Technology
The integration of deep learning marks a transformative shift in addressing the global health
challenge posed by Tuberculosis (TB). Traditionally, TB diagnosis relied on methods that were
often slow and not consistently accurate, leading to delays in treatment and potential
complications. However, with the advent of deep learning technologies, there has been a
significant improvement in TB diagnostics. These technologies enable the development of
automated systems that can rapidly analyze medical imaging data, such as chest X-rays, and
accurately detect TB infections. By leveraging deep neural networks and advanced algorithms,
these systems automate the process of TB diagnosis, providing faster and more reliable results
compared to traditional methods. This not only expedites the identification of TB cases but also
facilitates timely intervention and treatment, ultimately reducing the spread of the disease and
improving patient outcomes. Furthermore, the scalability of deep learning-based solutions
holds promise for addressing TB in resource-constrained environments where access to skilled
healthcare professionals may be limited. Overall, the integration of deep learning technologies
represents a significant advancement in combating TB, offering hope for more effective control
and management of this life-threatening disease on a global scale.

1.5 Existing System

The Traditional methods for diagnosing tuberculosis (TB) are slow and often inaccurate,
leading to delays in treatment and potential spread of the disease.Limited access to high-quality
and diverse datasets.Additionally, TB chest X-ray (CXR) images are frequently low in contrast,
making accurate interpretation challenging.To address these issues,we go with the image
enhancement algorithms,which can enhance the accuracy and efficiency of TB detection from
CXR images.

1.6 Proposed System

Our Data Preparation involves collecting and preprocessing a diverse dataset of chest X-ray
images specifically for TB detection. This dataset must encompass a wide range of cases to
ensure the robustness and generalization of the model. Preprocessing involves standardizing
the size and resolution of the images to ensure uniformity across the dataset. This step is crucial
for effective training of the deep learning model, as it ensures that the model can learn from
the data consistently without being influenced by variations in image dimensions.

Image Enhancement Integration involves implementing various techniques on the dataset to


enhance features relevant to TB detection. Three specific techniques commonly used for this

purpose are Unsharp Masking, High-Frequency Emphasis Filtering, and Contrast Limited
Adaptive Histogram Equalization (CLAHE).
KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 3
Department Of Information Technology

1. Unsharp Masking: This technique involves sharpening the edges and details in an image by
subtracting a blurred version of the image from the original. By enhancing the edges and
details, unsharp masking can improve the visibility of subtle features in chest X-ray images
that may be indicative of TB infection.

2. High-Frequency Emphasis Filtering: High-frequency emphasis filtering accentuates high-


frequency components in an image, thereby enhancing fine details and textures. This technique
can be particularly useful for highlighting abnormalities or patterns associated with TB
infection in chest X-ray images.

3. Contrast Limited Adaptive Histogram Equalization (CLAHE): CLAHE is a contrast


enhancement technique that improves the visibility of details in an image by redistributing
pixel intensities. Unlike traditional histogram equalization, CLAHE limits the amplification of
noise by dividing the image into small regions and applying histogram equalization
independently to each region. This helps to enhance local contrast while preserving the overall
image characteristics, making it suitable for enhancing features relevant to TB detection in
chest X-ray images.

By integrating these image enhancement techniques into the preprocessing pipeline, we can
improve the quality and informativeness of the chest X-ray images for TB detection. This, in
turn, can enhance the performance and robustness of the deep learning model trained on the
dataset, ultimately leading to more accurate and reliable TB detection results. settings.

1.7 Potential Users


The The potential users for a user interface designed for swift tuberculosis (TB) detection in
chest X-ray images could include various healthcare professionals and stakeholders involved
in TB screening and diagnosis. Here are some potential users:

1. Radiologists: Radiologists are trained medical professionals specialized in interpreting


medical images, including chest X-rays. They could use the interface as a tool to aid in the
rapid screening of chest X-ray images for TB.

2. Primary Care Physicians: Primary care physicians often encounter patients with respiratory
symptoms and may order chest X-rays as part of the diagnostic workup. They could utilize the

interface to quickly assess whether TB is present in the images and guide further management

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 4


Department Of Information Technology
decisions.

3. TB Clinics and Centers: Healthcare facilities dedicated to TB diagnosis and treatment, such
as TB clinics and centers, could integrate the interface into their workflow to streamline the
screening process and improve efficiency in TB detection.

4. Healthcare Workers in Resource-Constrained Settings: In settings with limited access to


radiologists or specialized TB diagnostic services, general healthcare workers could use the
interface to screen chest X-ray images for TB, enabling early detection and timely intervention.

5. Public Health Authorities: Public health authorities responsible for TB control programs
may utilize the interface to screen large volumes of chest X-ray images in population-based
screening initiatives, aiding in the early detection of TB cases and facilitating targeted
interventions to prevent transmission.

6. Researchers and Developers: Researchers and developers working on TB detection


algorithms and technologies could use the interface as a testing platform to evaluate the
performance of their algorithms and refine their systems for clinical use.

Overall, the potential users for a UI designed for swift TB detection in chest X-ray images
encompass a broad spectrum of healthcare professionals, from radiologists and primary care
physicians to healthcare workers in resource-constrained settings and public health authorities
involved in TB control efforts.

1.5. Unique features of the System


1. Utilization The system boasts several unique features tailored for tuberculosis (TB) detection
in chest X-ray (CXR) images:

1. Image Upload : Allows secure and easy upload of CXR images for analysis.

2. Image Preprocessing : Enhances image quality before analysis, ensuring accuracy.

3. Deep Learning Model Integration : Integrates cutting-edge models for precise TB detection.

4. Tuberculosis Detection : Analyzes images to identify TB presence swiftly and reliably.

5. Result Visualization : Presents detection outcomes intuitively for clear interpretation.

6. Reporting and Exporting : Generates summary reports and allows export for documentation.

These features collectively empower healthcare professionals with efficient tools for prompt
and accurate TB diagnosis.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 5


Department Of Information Technology
1.6. Demand for the product
The Demand for automated TB detection systems is on the rise within the healthcare industry
due to the pressing need for efficient diagnostic tools and the escalating volume of medical
imaging data. Our TB detection project caters to this demand by providing a reliable and
scalable solution for TB detection using deep learning concepts. Healthcare facilities and
medical imaging centers are expected to adopt our system to enhance diagnostic accuracy,
alleviate the workload of healthcare professionals, and improve patient care outcomes.

Medical Need: There is a significant demand for accurate and timely TB detection in healthcare
settings worldwide, particularly in regions with high TB prevalence. With the global burden of
TB, healthcare professionals require efficient diagnostic tools to ensure early detection and
prompt treatment, ultimately improving patient outcomes and preventing transmission.

Efficiency and Productivity: Manual interpretation of chest X-ray images for TB detection is
labor-intensive and time-consuming. The demand for automated TB detection systems arises
from the need to streamline diagnostic workflows, reduce the workload of healthcare
professionals, and enhance overall efficiency in TB diagnosis and treatment.

Accuracy and Reliability: The demand for reliable TB detection solutions is driven by the
challenges associated with manual interpretation of chest X-ray images. Automated systems
utilizing deep learning concepts offer the potential for enhanced accuracy and consistency in
TB diagnosis, meeting the stringent standards of medical professionals and ensuring reliable
patient care.

Technological Advancements: With advancements in deep learning and computer vision


technologies, there is growing interest in leveraging these tools for medical image analysis,
including TB detection. The demand for projects like ours reflects the desire to harness cutting-
edge technology to address critical healthcare challenges and improve TB control efforts
globally.

Market Opportunity: The market for medical imaging solutions, including TB detection
systems, is expanding globally as healthcare institutions seek to enhance their diagnostic
capabilities. With the increasing emphasis on TB control and the need for early detection, there
is a significant market opportunity for our TB detection project to make a meaningful impact
in healthcare settings worldwide.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 6


Department Of Information Technology

1.7. Protection of Idea


To protect our idea and intellectual property, we plan to explore options such as patents,
copyrights, and non-disclosure agreements. Additionally, we will adhere to best practices for
data security and privacy to ensure the confidentiality and integrity of patient information
processed by our system. Furthermore, we may consider partnering with reputable institutions
or organizations to further validate and commercialize our system in accordance with legal and
ethical standards.
Intellectual Property Rights: Consider applying for patents, copyrights, or trademarks to
protect unique aspects of the project, such as novel algorithms, software code, or proprietary
technologies used in the fracture detection system. Consult with legal experts specializing in
intellectual property law to assess the eligibility for protection and initiate the necessary filings.
Non-Disclosure Agreements (NDAs): Implement non-disclosure agreements with
collaborators, developers, or partners involved in the project to ensure confidentiality and
prevent the unauthorized sharing of sensitive information or trade secrets related to the fracture
detection system. NDAs legally bind parties to maintain confidentiality and protect proprietary
information.
Restricted Access and Data Security: Implement robust access controls and data security
measures to safeguard project-related information, including datasets, algorithms, and software
code. Utilize encryption, secure authentication mechanisms, and access permissions to limit
unauthorized access and mitigate the risk of data breaches or intellectual property theft.
Confidentiality Policies: Establish internal policies and procedures governing the handling
and dissemination of confidential project information within the team or organization. Educate
project members on the importance of maintaining confidentiality and adhering to established
protocols to prevent unauthorized disclosure of sensitive details.
Strategic Partnerships and Licensing Agreements: Explore opportunities to collaborate
with reputable organizations, research institutions, or industry partners through strategic
partnerships or licensing agreements. Negotiate terms that protect intellectual property rights
while enabling mutually beneficial collaborations or commercialization opportunities for the
fracture detection system.
Documentation and Records Management: Maintain comprehensive documentation of
project-related activities, research findings, development processes, and intellectual property
disclosures. Keep detailed records of inventions, innovations, and project milestones to
establish a clear trail of ownership and support potential legal claims or disputes in the future.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 7


Department Of Information Technology

CHAPTER – 2
ANALYSIS PHASE

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 8


Department Of Information Technology
CHAPTER 2

ANALYSIS PHASE

2.1. Literature Review:

Tuberculosis remains a significant health threat, especially with opportunistic infections and
drug-resistant strains. Traditional diagnostics are slow and unreliable. Our automated approach
for TB detection uses graph cut segmentation for lung extraction and texture/shape features for
classification. The system's performance is evaluated on datasets from local health departments
in the US and Shenzhen Hospital, China. [1]

The U.S. National Library of Medicine provides datasets of chest radiographs for research in
pulmonary diseases, including TB. The datasets, from Montgomery County, Maryland, USA,
and Shenzhen No. 3 People’s Hospital in China, contain normal and abnormal chest X-rays
with TB manifestations and radiologist readings. [2]

This study explores the impact of convolutional network depth on large-scale image
recognition accuracy. It reveals that deeper networks with small convolution filters outperform
prior configurations, leading to state-of-the-art results. The findings from ImageNet Challenge
2014, where the team secured top places, validate the effectiveness of the proposed
architecture. [3]

Deeper neural networks present training challenges, which a residual learning framework
addresses. It reformulates layers as learning residual functions, improving optimization and
accuracy, even with increased depth. Residual nets achieve remarkable performance, with an
ensemble reaching 3.57% error on the ImageNet test set. [4]

TB is a major global health threat, necessitating early diagnosis. Computer-aided diagnosis


(CAD) systems using deep learning offer promise in TB screening. However, traditional CAD
algorithms rely on engineered features, while deep learning approaches show potential for
improved performance and generalization. [5]

Clinical documents play a crucial role in research and education, but easy access to relevant
content is essential. This paper introduces a collection of radiology examinations, including
images and narrative reports, made publicly available for research. The de-identified Indiana
chest X-ray collection is accessible through the National Library of Medicine.[6]

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 9


Department Of Information Technology

This study evaluates deep convolutional neural networks (DCNNs) for TB detection on chest
radiographs. Utilizing multiple datasets and augmentation techniques, the efficacy of DCNNs,
including AlexNet and GoogLeNet, is assessed. Pretrained networks and various preprocessing
methods contribute to the evaluation. [7]

Machine learning, particularly deep learning, is gaining traction in medical imaging. Deep
learning's success is attributed to its ability to directly learn from image data without feature
extraction. The overview discusses the impact of deep learning in medical imaging,
highlighting its potential in various applications. [8]

Early TB detection is critical, yet cost-effective diagnosis methods are lacking. Automation
using computational techniques offers promise, but deep learning's application in TB diagnosis
remains limited. Addressing this gap could significantly improve TB diagnosis and treatment
outcomes. [9]

Chest X-rays (CXRs) are vital for diagnosing heart and lung abnormalities. However, lack of
standardized datasets hinders comparison of detection methods. This study utilizes publicly
available datasets and deep convolutional networks, achieving high accuracy in detecting chest
X-ray abnormalities, including TB. [10]

Chest X-ray databases offer valuable data for building high-precision computer-aided
diagnosis systems. The "ChestX-ray8" dataset introduced in this paper contains over 100,000
X-ray images with eight disease labels, facilitating research in automated disease detection and
localization. [11]

Dense Convolutional Networks (DenseNets) connect each layer to every other layer,
alleviating training challenges and enhancing feature propagation. With fewer parameters than
traditional networks, DenseNets achieve superior performance on object recognition
benchmarks, showcasing their efficiency and effectiveness. [12]

A large convolutional neural network trained on ImageNet achieves top-tier performance in


image classification tasks, outperforming previous state-of-the-art models. Dropout
regularization and efficient GPU implementation contribute to the network's success,
demonstrating its superiority in various applications. [13]

Deep learning frameworks offer diagnostic tools for screening retinal diseases, achieving
performance comparable to human experts. By highlighting recognized regions, the framework
provides transparent and interpretable diagnoses. The AI system aids in early detection and
treatment of treatable conditions, improving clinical outcomes. [14]

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 10


Department Of Information Technology

Deep convolutional neural networks are evaluated for automatic detection of cardiomegaly in
chest X-rays. Different architectures are fine-tuned and their softmax probability correlation
with disease severity is investigated. The study utilizes publicly available datasets for
evaluation. [15]

Inception modules in convolutional networks serve as intermediaries between regular and


depthwise separable convolutions. Inspired by this, Xception architecture replaces Inception
modules with depthwise separable convolutions, achieving superior performance on object
recognition benchmarks with fewer parameters[16]

CheXNet, a convolutional neural network, surpasses radiologists in pneumonia detection on


chest X-rays. Trained on a large dataset, CheXNet achieves state-of-the-art results on 14
diseases, demonstrating its potential as a diagnostic tool in clinical settings. [17]

Customized convolutional neural networks are evaluated for pneumonia detection and
classification. Visualization strategies highlight relevant regions for model predictions,
improving interpretability and generalization. The model outperforms existing approaches,
demonstrating enhanced accuracy and reduced bias. [18]

A robust lung segmentation method using nonrigid registration-driven adaptive lung models is
proposed for TB detection in chest X-rays. The method achieves state-of-the-art performance,
surpassing existing techniques in detecting lung boundaries and facilitating computer-aided
diagnosis. [19]

CheXpert, a large dataset of chest radiographs, is introduced for training convolutional neural
networks in detecting various chest pathologies. Different approaches to utilizing uncertainty
labels are explored, achieving performance comparable to expert radiologists and serving as a
benchmark for model evaluation. [20]

2.2. Requirement analysis:


Requirement Analysis, also known as Requirement Engineering, is the process of defining user
expectations for new software being built or modified. Requirements analysis encompasses
those tasks that go into determining the needs or conditions to meet for a new or altered product
or project, taking account of the possibly conflicting requirements of the various stakeholders,
analyzing, documenting, validating and managing software or system requirements.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 11


Department Of Information Technology

2.2.1. Functional Requirement Analysis:


Functional requirements describe the specific behavior or functions that a software system must
perform to meet the needs of its users. functional requirements would outline the specific
operations and capabilities that the system must have to accurately detect TB in CXR images.
Here are some functional requirements tailored for this project:

Image Upload:

- Users should have the capability to securely upload chest X-ray images for tuberculosis (TB)
analysis.

- The system should support various image formats commonly used in medical imaging, such
as DICOM or JPEG.

TB Detection:

- The system should employ deep learning algorithms to analyze uploaded chest X-ray images
for the presence of TB.

- It should provide binary classification indicating whether TB is present or absent in the X-


ray images.

- Additionally, the system should localize areas indicative of TB within the images, offering
coordinates or bounding boxes for identified regions.

Integration with Healthcare Systems:

- Integration with existing healthcare IT infrastructure, including Picture Archiving and


Communication Systems (PACS) and Electronic Health Record (EHR) systems, should be
supported for seamless data exchange and interoperability.

- The system should adhere to healthcare data standards and protocols to ensure compatibility
and compliance with existing systems.

2.2.2. User requirements :


User requirements outline the needs and expectations of the system's users., user requirements
focus on the features and capabilities that users, such as medical professionals and system
administrators, expect from the system. Here are some user requirements for the project:

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 12


Department Of Information Technology

1. Accessibility:
- Users, including medical professionals and system administrators, should have easy access
to the TB detection system via a user-friendly interface.
- The interface should be accessible through web browsers on both desktop and mobile devices,
ensuring flexibility and convenience.

2. Security:
- Users' login credentials and personal information must be securely stored and encrypted to
prevent unauthorized access.
- The system should adhere to stringent data privacy standards and comply with healthcare
regulations such as HIPAA to ensure patient confidentiality and privacy.

3. Usability:
- The user interface should be intuitive and straightforward, catering to users with varying
levels of technical expertise within healthcare settings.
- Users should be able to upload chest X-ray images and initiate TB detection processes with
minimal complexity, facilitating efficient workflow integration and usage.

2.2.3. Non-functional requirement analysis:


Non-functional requirements define the system properties and constraints that affect how the
system operates, rather than specific behaviors or functionalities., non-functional requirements
focus on aspects such as performance, reliability, security, and usability. Here are some non-
functional requirements for the project:

1. Availability:
• The system should be available 24/7, ensuring uninterrupted access for users.
• System downtime for maintenance or updates should be minimized and scheduled during
off-peak hours.

2. Recoverability:
• The system should have mechanisms in place to recover from failures and data loss.
• Regular backups of data should be performed to prevent loss of X-ray images and detection
results.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 13


Department Of Information Technology

3. Maintainability:
• The system should be easy to maintain and update, with modular components that can be
modified or replaced without affecting the overall functionality.
• Codebase should be well-documented and adherent to coding standards to facilitate
maintenance by developers.

2.2.4. System requirements:


Hardware:

- A powerful computer system with sufficient RAM and a dedicated GPU for efficient
processing of chest X-ray images.

- High-resolution display monitor for clear visualization of images, aiding accurate analysis.

Software:

- Compatibility with TensorFlow or PyTorch for deep learning model development.

- Access to diverse, annotated chest X-ray datasets for training and validation.

- User-friendly interfaces for easy image uploading, TB detection initiation, and result
interpretation.

- Integration with existing healthcare IT infrastructure, such as PACS, for seamless clinical
workflow incorporation.

2.3. Module description:

It describes the major functionalities of each module.


• Image Upload: Allows users to securely upload CXR images for analysis.
• Image Preprocessing: Enhances image quality by resizing, noise reduction, and contrast
enhancement.
• Deep Learning Model Integration: Integrates deep learning models trained for tuberculosis
detection.
• Tuberculosis Detection: Analyzes preprocessed images using integrated models to detect
tuberculosis presence.
• Result Visualization: Presents detection results in a user-friendly format, highlighting detected
areas.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 14


Department Of Information Technology

• Reporting and Exporting: Generates and exports summary reports in PDF or CSV format
for sharing and archival.

2.4. Feasibility Study


A Feasibility studies for software enhancements involve a structured analysis. First, clearly
define the project scope, outlining new modules or debugging goals. Next, gather information
through system documentation, stakeholder interviews, and resource assessment (hardware,
software, personnel). This information fuels the evaluation of technical (compatibility,
resources), operational (workflow impact, costbenefit, staffing), and user adoption (training,
interface) feasibility. A cost-benefit analysis then compares project expenses with anticipated
gains. Finally, a welldocumented report summarizes these findings and recommends
proceeding, modifying the scope, or abandoning the project altogether.
● Technical feasibility
● Economic feasibility
● Operational feasibility
● Behavioral feasibility

2.4.1. Technical Feasibility:


• Assess the availability of technology and resources required to develop the system.
• Evaluate the feasibility of implementing image processing and machine learning algorithms
for fracture detection.
• Determine if existing software tools and libraries can be leveraged for development.
• Consider any technical challenges or limitations that may affect the project's success.

2.4.2. Economic Feasibility:


• Estimate the costs associated with developing, deploying, and maintaining the system.
• Calculate the potential return on investment (ROI) or cost savings resulting from improved
fracture detection.
• Consider alternative solutions and their cost-effectiveness compared to developing the system
in-house.
• Conduct a cost-benefit analysis to determine if the benefits outweigh the costs of the project.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 15


Department Of Information Technology

2.4.3. Operational Feasibility:


• Evaluate the impact of the system on existing workflows and processes within healthcare
organizations.
• Assess the readiness of users to adopt and integrate the system into their daily operations.

• Identify any training needs or organizational changes required to support the


implementation of the system.
• Consider the long-term sustainability of the system and its ability to adapt to changing user
needs and technological advancements

2.4.4. Behavioral feasibility:


Furthermore, behavioral feasibility involves considering any required behavioral changes or
training necessary for users to effectively utilize the system. Providing comprehensive training
and support resources can help users become proficient in using the system and mitigate any
apprehension or resistance towards adopting new technology.

Overall, assessing this feasibility involves understanding user acceptance, usability, and
potential behavioral changes required for successful adoption and utilization of the "Human
Fracture Detection" system. By addressing these factors, the project can ensure that the system
aligns with user needs and preferences, ultimately leading to successful implementation and
improved fracture diagnosis outcomes.

2.5. Process model used:


The process model which would be helpful for the development of the proposed system is the
agile process model. The Agile model was primarily designed to help a project to adapt to
change requests quickly. So, the main aim of the Agile model is to facilitate quick project
completion. To accomplish this task agility is required. Agility is achieved by fitting the
process to the project, removing activities that may not be essential for a specific project. Also,
anything that is a waste of time and effort is avoided. Actually, Agile model refers to a group
of development processes. These processes share some basic characteristics but do have
certain subtle differences among themselves.

Principles of Agile model:

1. Customer satisfaction through early and continuous delivery of valuable software: Agile
emphasizes the importance of delivering working software to customers frequently, enabling
them to provide feedback and shape the product throughout its development lifecycle. This
KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 16
Department Of Information Technology
iterative approach ensures that customer needs are met effectively and that the delivered
software adds tangible value.

2. Welcome changing requirements, even late in development: Agile acknowledges the


inevitability of changing requirements in software projects, whether due to evolving market
dynamics, shifting user needs, or new insights gained during development. Embracing change
allows Agile teams to remain responsive to customer feedback and adapt their plans
accordingly, ultimately delivering solutions that better align with stakeholders' goals.

3. Deliver working software frequently, with a preference for shorter timescales: Agile
promotes a time-boxed approach to development, where incremental releases of functional
software are delivered at regular intervals. By prioritizing shorter development cycles, Agile
teams can minimize time-to-market, gather feedback more frequently, and respond to changing
requirements more effectively.

4. Business people and developers must work together daily throughout the project: Agile
emphasizes close collaboration between business stakeholders and development teams
throughout the project lifecycle. Regular communication and alignment between these groups
ensure that development efforts remain focused on delivering business value and meeting
customer expectations.

5. Build projects around motivated individuals: Agile recognizes the importance of motivated
and empowered team members in driving project success. By providing a supportive
environment, fostering autonomy, and encouraging personal growth, Agile teams are better
equipped to tackle challenges, innovate, and deliver high-quality solutions.

6. The most efficient and effective method of conveying information to and within a
development team is face-to-face conversation: Agile values direct, face-to-face
communication as the most effective means of conveying information and resolving issues
within a development team. By promoting open dialogue and collaboration, Agile teams can
quickly address challenges, share knowledge, and make informed decisions.

7. Working software is the primary measure of progress: Agile emphasizes tangible outcomes
over theoretical progress metrics. The delivery of working software serves as a concrete
measure of project advancement, enabling stakeholders to gauge the team's productivity and
assess the project's trajectory based on demonstrable results.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 17


Department Of Information Technology

8. Agile processes promote sustainable development: Agile recognizes the importance of


maintaining a sustainable pace of work to avoid burnout and ensure long-term project success.
By prioritizing work-life balance, technical excellence, and continuous improvement, Agile
teams can sustainably deliver value over the project's duration.

9. Continuous attention to technical excellence and good design enhances agility: Agile
encourages a focus on technical excellence and sound design principles to ensure that software
remains adaptable, maintainable, and scalable over time. By investing in quality craftsmanship
and robust engineering practices, Agile teams can respond to changing requirements with
greater agility and confidence.

10. Simplicity—the art of maximizing the amount of work not done—is essential: Agile
advocates for simplicity in both software design and project management. By minimizing
unnecessary complexity, avoiding over-engineering, and prioritizing essential features, Agile
teams can deliver solutions that are easier to understand, maintain, and evolve.

11. The best architectures, requirements, and designs emerge from self-organizing teams:
Agile empowers self-organizing teams to collaborate, innovate, and make decisions
collectively. By enabling teams to take ownership of their work, leverage their diverse skills
and perspectives, and adapt their approach based on evolving needs, Agile fosters creativity
and fosters the emergence of optimal solutions.

12. At regular intervals, the team reflects on how to become more effective, then tunes and
adjusts its behavior accordingly: Agile encourages continuous reflection and improvement
through regular retrospectives. By periodically evaluating their processes, identifying areas for
enhancement, and implementing changes iteratively, Agile teams can adapt and evolve,
maximizing their effectiveness and delivering greater value with each iteration.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 18


Department Of Information Technology

Figure 2.5.1 : Agile model work flow in our project

In conclusion, the Agile model offers a flexible and iterative approach to software
development, fostering collaboration, adaptability, and continuous improvement throughout the
project lifecycle. Unlike the Waterfall Model, Agile embraces changing requirements and
encourages frequent delivery of working software, enabling stakeholders to provide feedback
early and often. By prioritizing customer satisfaction, responsiveness, and sustainable
development practices, Agile teams can deliver value more efficiently and effectively. While
the Agile model may not be suitable for all projects, particularly those with highly regulated or
stable requirements, its emphasis on teamwork, communication, and delivering incremental
value makes it a preferred choice for many modern software development endeavors.
Ultimately, the decision to adopt Agile should be based on the project's unique needs,
considering factors such as complexity, stakeholder involvement, and the degree of uncertainty
involved.

2.6. Hardware and software requirements:


The following are the software and hardware requirements to execute or to implement our
project:

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 19


Department Of Information Technology

Software Requirements: (for development)


The software requirements for developing a software project can vary depending on the specific
project needs and technologies chosen. However, here is a general list of software requirements
commonly needed:
Integrated Development Environment (IDE): A suitable IDE for coding, debugging, and
building the software. Popular options include:
Visual Studio Code
IntelliJ IDEA
Eclipse
PyCharm
Xcode
Programming Languages: The choice of programming languages depends on the project
requirements and technologies. Common programming languages include:
Python
Java
C/C++
JavaScript
Version Control System (VCS): A VCS helps track changes to source code and collaborate
with team members. Popular VCS options include:
Git
Subversion (SVN)
Mercurial
Web Development Frameworks: If your project involves web development, you may need
frameworks and libraries such as:
Django (Python)
Flask (Python)
Operating Systems supported: (for end user)
Windows 7 or higher
MacOS
Linux
Mobile Platforms:
• iOS (for developing iOS applications)
• Android (for developing Android applications)

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 20


Department Of Information Technology

Web-based Applications:
Supported web browsers (Chrome, Firefox, Safari, Edge) on various operating systems
Debugger and Emulator:
A debugger emulator is a software tool or utility used by developers to analyze and debug
programs or applications. It allows developers to step through the code, inspect variables, and
identify issues such as bugs or logical errors. Here are some commonly used debugger
emulators:
GDB (GNU Debugger):
GDB is a powerful debugger for Unix-like operating systems.
It supports various programming languages such as C, C++, and Fortran.
GDB provides features like breakpoints, watchpoints, and stack tracing for debugging.
It can be used from the command line or integrated into IDEs like Eclipse and Visual Studio.
Hardware Requirements:
The hardware requirements for developing a software project can vary depending on factors
such as the complexity of the project, the development tools used, and the target platform.
However, here are some general hardware requirements that are commonly needed for software
development:
Computer:
A desktop or laptop computer capable of running the chosen operating system and development
tools.
Processor: Intel Core i5 or AMD Ryzen 5 processor (or higher) for faster compilation and
execution of code.
Memory (RAM): At least 8 GB of RAM for smooth multitasking and running development
tools simultaneously.
Storage: Solid-state drive (SSD) with sufficient storage capacity (256 GB or higher) for storing
project files, libraries, and development environments.
Monitor:
A high-resolution monitor (1920x1080 pixels or higher) for better visibility and productivity.
Multiple monitors can enhance productivity by providing more screen real estate for code,
documentation, and debugging tools.
Keyboard and Mouse:
A comfortable keyboard and mouse or trackpad for inputting code and navigating development
environments.
Consider ergonomic options to reduce strain during long coding sessions.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 21


Department Of Information Technology

Development Devices:
If developing software for specific hardware platforms (e.g., mobile apps, embedded systems),
additional development devices may be required.
For example, smartphones or tablets for mobile app development, microcontrollers or
development boards for embedded systems.
Internet Connection:
A stable internet connection for accessing online resources, downloading updates, and
collaborating with team members using version control systems and communication tools
2.7. SRS Specification:
A software requirements specification (SRS) is a description of a software system to be
developed. It lays out functional and non-functional requirements, and may include a set of use
cases that describe user interactions that the software must provide.
Our software will fulfil every requirement needed for the user and concentrates on internal and
external requirements in the final system.
Benefits of a good SRS:
● Clear User Expectations: The SRS ensures user needs are clearly documented. This
includes functionalities like uploading invoices, specifying data fields for extraction
(vendor, date, amount), and exporting extracted data in desired formats (CSV, Excel).
By outlining these clearly, the final system aligns with user expectations and streamlines
invoice processing workflows.
● Reduced Development Ambiguity: The SRS eliminates ambiguity in development
by defining both functional and non-functional requirements. Functional requirements
like supported file formats and data extraction accuracy guide development efforts.
Non-functional requirements like processing speed and security measures ensure the
system performs efficiently and protects sensitive invoice data.
● Improved System Maintainability: A well-documented SRS becomes a valuable
asset for future maintenance and upgrades. If new invoice layouts or data fields need
to be accommodated, the SRS provides a clear reference point
for developers. This facilitates modifications and ensures the system remains adaptable
to evolving needs.
● Enhanced Project Management: The SRS serves as a roadmap for project planning
and resource allocation. By understanding the functionalities and complexities
outlined in the SRS, developers can provide more accurate time and resource
estimates. This enables effective project management and helps avoid potential scope
creep or delays.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 22


Department Of Information Technology

Overview:
The project targets Tuberculosis (TB) using image enhancement techniques and deep neural
networks. TB, driven by Mycobacterium tuberculosis, stands as a major global health
challenge. Employing image enhancement methods enhances the clarity of chest X-rays,
thereby aiding in the detection of TB. A varied dataset is utilized to train a deep neural
network architecture, encompassing both TBpositive and negative cases.

Purpose:

The purpose of Tuberculosis Risk Assessment By Image Enhancing Using Deep Learning is
to develop deep-learning-based segmentation and classification models for accurate and precise
detection of tuberculosis on chest X-ray images.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 23


Department Of Information Technology

CHAPTER -3
DESIGN PHASE

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 24


Department Of Information Technology

CHAPTER -3
DESIGN PHASE

Input design:

The input design is the link between the information system and the user. It comprises the
developing specification and procedures for data preparation and those steps are necessary to
put transaction data into a usable form for processing can be achieved by inspecting the computer
to read data from a written or printed document or it can occur by having people keying the data
directly into the system. The design of input focuses on controlling the amount of input required,
controlling the errors, avoiding delay, avoiding extra steps and keeping the process simple. The
input is designed in such a way that it provides security and ease of use while retaining privacy.
Input Design considered the following things:

● What data should be given as input?


● How should the data be arranged or coded?
● The dialog to guide the operating personnel in providing input.
● Methods for preparing input validations and steps to follow when error occurs

Output design:
A quality output is one, which meets the requirements of the end user and presents the
information clearly. In any system results of processing are communicated to the users and to
other systems through outputs. In output design it is determined how the information is to be
displaced for immediate need and also the hard copy output. It is the most important and direct
source information to the user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.

3.1. Design concepts & Constraints

1. Abstraction
This refers to the level of detail used to describe something. In software development,high-level
abstraction focuses on the overall solution using problem-domain language, while lower-level
abstraction dives into technical details. Data abstraction defines how data is structured and
manipulated.
2. Architecture

The complex structure of the software is known as software architecture. Structure provides
conceptual integrity for a system in a number of ways and the architecture is nothing but the
structure of program modules where they interact with each other in a specialized way.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 25


Department Of Information Technology
3. Design Patterns:

These are reusable solutions to common software design problems. They provide a proven
approach to structuring code and solving specific challenges faced by developers.
4. Modularity:

This principle breaks down software into smaller, independent components (modules) that can
be developed, tested, and maintained more easily. These modules work together to achieve the
overall system functionality.
5. Information Hiding:

Modules are designed to encapsulate their internal data and functionality. Other modules can
only interact with the module through its well-defined interface, promoting better maintainability
and security.
6. Functional Independence:

This concept emphasizes creating modules that perform a single, well-defined function with
minimal interaction with other modules. This is achieved through:

i) Cohesion: A module should be highly cohesive, meaning it focuses on a single task with
minimal internal complexity.

ii) Coupling: Modules should have loose coupling, meaning they rely minimally on other
modules, promoting better maintainability and reducing the impact of changes in one module on
others.

7. Refinement: This refers to the top-down design approach where a high-level system function
is progressively broken down into smaller, more detailed sub-functions until they can be
implemented in the chosen programming language.
8. Refactoring: This is the process of improving the internal structure of existing code without
altering its external behavior. It aims to make the code more readable, maintainable, and
efficient.
9. Design Classes: These are blueprints representing real-world entities or concepts relevant to
the problem domain. They define the attributes (data) and methods (functions) that encapsulate
the behaviour of these entities within the software system.

Design Constraints
Design constraints are the limitations of a design. These include imposed limitations that you
don’t control and limitations that are self-imposed as a way to improve design.
There are several types of design constraints and they are as follows

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 26


Department Of Information Technology
1. Commercial Constraints:

● Time: There might be a deadline for completing the project, which can limit the
complexity of the features implemented.
● Budget: Financial limitations may restrict the choice of hardware, software licenses, or
the amount of data used to train the OCR model.

2. Requirements:

In the requirements phase we consider the functional requirements of a system and they
specify the results of a system.
● Non-Functional Requirements:
○ The system should process invoices with a certain level of accuracy (e.g., 95%
accuracy for critical data fields).
○ It should have acceptable processing speed for handling a specific invoice volume.
○ The system should be secure and protect sensitive invoice data.
○ It should be user-friendly and easy to learn for the target users.

3. Compliance:

There might be regulations regarding data privacy and security depending on the type of invoice
data being processed (e.g., PCI-DSS for financial data).

4. Style:

The user interface might need to adhere to a specific style guide for consistency with existing
software within the organization.

5. Usability:

● The system should be intuitive and easy for users with varying technical skills to
navigate.
● Data entry for invoices with non-standard layouts should be minimal.
● Error messages and feedback should be clear and actionable for users.

6.Principles:

● The design should prioritize user-centricity, ensuring the system caters to user needs and
workflows effectively.
● The development process should follow best practices for building maintainable and
scalable software systems.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 27


Department Of Information Technology
7.Integration:

The system might need to integrate with existing accounting or enterprise resource planning
(ERP) systems for seamless data transfer of extracted invoice data.

3.2.1 Use case diagram

Use case diagram at its simplest is a representation of a user’s interaction with the system that
shows the relationship between the user and the different use cases in which the user is involved.
A use case diagram can identify the different types of users of a system and the different use
cases and will often be accompanied.

Figure 3.2.1 : use case diagram for end user

3.2.2 Class diagram


Class diagram in the Unified Modeling Language (UML) is a type of static structure diagram
that describes the structure of a system by showing the system's classes, their attributes,
operations (or methods), and the relationships among objects.

Figure 3.2.2 Class Diagram

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 28


Department Of Information Technology

3.3 Conceptual Design:


The conceptual design of the system encompasses several key components. Firstly, the system
architecture is devised to accommodate data ingestion, preprocessing, model training,
inference, and result visualization, with a focus on scalability and modularity. A robust data
pipeline is established to handle image flow, incorporating preprocessing steps and ensuring
compliance with data management standards and regulations. The fracture detection model
employs deep learning architectures, tailored for object detection techniques like YOLO, and
is fine-tuned using annotated datasets to achieve accurate and generalizable results. The user
interface is intuitively designed for seamless interaction, featuring image upload, result
visualization, and diagnostic access. Integration into existing healthcare IT infrastructure is
prioritized, alongside considerations for deployment options, monitoring, and compliance with
ethical and legal standards, ensuring the system's effectiveness, usability, and adherence to
regulatory requirements.
3.4 Logical Design:
The logical design of the system entails a comprehensive framework encompassing key
elements for effective fracture identification and diagnosis. At its core, the system employs
advanced deep learning algorithms, specifically tailored for object detection tasks, to analyze
medical images and pinpoint fractured areas with precision. These algorithms are implemented
within a robust software architecture, comprising modules for image preprocessing, model
training, inference, and result visualization. The data pipeline is meticulously designed to
handle image input, ensuring proper preprocessing steps are applied to enhance model
performance. The user interface is intuitively crafted, offering seamless interaction for
healthcare professionals to upload images, view detection results, and access diagnostic
insights. Integration with existing healthcare IT infrastructure is prioritized, enabling
interoperability with systems such as Picture Archiving and Communication Systems (PACS)
or Electronic Health Record (EHR) platforms. Throughout the design process, stringent
adherence to ethical and legal considerations is maintained, safeguarding patient privacy, data
security, and compliance with regulatory standards such as HIPAA and GDPR. By
encompassing these elements, the logical design of the system ensures its effectiveness,
usability, and ethical integrity in clinical practice.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 29


Department Of Information Technology

Figure 3.4.1 Logical design


3.5 Sequence diagram:
A sequence diagram for the system depicts the flow of interactions between its components
and actors during the fracture detection process. It typically begins with a healthcare
professional uploading a medical image through the user interface. The backend server then
preprocesses the uploaded image, which involves normalization and resizing. Next, the
preprocessed image is passed to the fracture detection model for analysis, where deep learning
algorithms identify fractured areas. Once the detection process is complete, the results,
including bounding boxes and diagnostic information, are returned to the user interface for
visualization by the healthcare professional. Throughout this process, interactions may also
occur with external systems, such as PACS or EHR systems, for data integration and
interoperability. Error handling mechanisms ensure the reliability of the system, facilitating
effective fracture detection in clinical settings.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 30


Department Of Information Technology

Figure 3.5.1 : sequence diagram for entire procedure

3.6 Activity diagram


Activity diagrams are graphical representations of workflows of stepwise activities and actions
with support for choice, iteration and concurrency

Figure 3.6.1 : activity diagram

3.7 Database Design:

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 31


Department Of Information Technology

The architectural design of the system revolves around three main layers: presentation, application,
and data. Database design is the organization of data according to a database model. The designer
determines what data to be stored and how the data elements interrelate. Database management
system manages the data accordingly. Database design involves classifying data and identifying the
interrelationships.
Data Flow Diagram:
A data-flow diagram (DFD) is a way of representing the flow of data of a process or a
system. The DFD also provides information about the outputs and inputs of each entity and the
process itself. A data-flow diagram has no control flow, there are no decision rules and no loops.
Specific operations based on the data can be represented by a flowchart.
Components of a Data flow diagram:
The different components of it are:
Process:
The process is part of a system that transforms inputs to outputs. The symbol of a process is
a circle, an oval, a rectangle or a rectangle with rounded corners.
Data Flow:
Data flow shows the transfer of information from one part of the system to another.
The symbol of the flow is the arrow.
Warehouse:
The warehouse is used to store data for later use. The symbol of the store is two horizontal
lines.
Terminator:

The Terminator is an external entity that communicates with the system and stands outside of
the system.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 32


Department Of Information Technology

Figure 3.7.1: architectural Design

3.7.1 Dataset Training Model Procedure

The dataset training model procedure for tuberculosis (TB) detection involves a meticulous and
iterative process aimed at harnessing the power of deep learning to accurately identify TB from
chest X-ray images. Let's delve deeper into each step:

1. Data Collection: Gathering a comprehensive dataset is crucial, as it forms the foundation of the
model. The dataset should include a diverse range of chest X-ray images, covering both TB-
positive and TB-negative cases. These images should represent various demographics, conditions,
and imaging variations to ensure the model's robustness and generalization capability.

2. Data Preprocessing: Once collected, the raw X-ray images undergo preprocessing to standardize
their format, size, and quality. This step involves tasks such as resizing images to a uniform
resolution, normalizing pixel values, and removing artifacts or noise that may interfere with the
model's ability to extract relevant features.

3. Data Augmentation: Data augmentation techniques are applied to enrich the dataset and improve
the model's ability to generalize to unseen data. Augmentation methods such as rotation, flipping,
zooming, and adding noise introduce variations to the images, effectively expanding the training
dataset and reducing the risk of overfitting.

4. Model Selection: Choosing the right deep learning architecture is critical for achieving optimal
performance. Convolutional Neural Networks (CNNs) are commonly employed for image
classification tasks due to their ability to automatically learn hierarchical features from input
images. The selection process may involve experimenting with different architectures

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 33


Department Of Information Technology

and configurations to identify the most suitable model for the task.

5. Model Training: With the dataset prepared and the model architecture selected, training begins.
During this phase, the model learns to map input X-ray images to their corresponding TB
classification labels. The training process involves feeding batches of images through the network,
adjusting the model's weights based on the disparity between predicted and actual labels using
optimization algorithms like gradient descent.

6. Hyperparameter Tuning: Fine-tuning the model's hyperparameters is crucial for optimizing its
performance. Hyperparameters such as learning rate, batch size, and optimizer choice significantly
impact training dynamics and convergence speed. Experimenting with different values and
monitoring the model's performance on a validation set helps identify the optimal hyperparameter
configuration.

7. Validation and Evaluation: Once trained, the model's performance is evaluated using a separate
validation dataset. Performance metrics such as accuracy, sensitivity, specificity, and receiver
operating characteristic (ROC) curves are computed to assess the model's ability to correctly
classify TB-positive and TB-negative cases. This step helps identify potential overfitting and
ensures the model's generalization ability.

8. Model Optimization: Before deployment, the trained model undergoes optimization to enhance
its efficiency and suitability for real-world deployment. Techniques such as model pruning,
quantization, and compression are applied to reduce the model's size and computational
complexity without compromising performance.

9. Documentation and Reporting: Documenting the entire training process is essential for
reproducibility and transparency. Detailed reports covering data sources, preprocessing steps,
model architecture, hyperparameters, training dynamics, and evaluation results provide valuable
insights for stakeholders and future reference.

10. Deployment and Integration: Finally, the trained model is deployed into production
environments, where it integrates seamlessly with existing healthcare systems or applications.
Ensuring compatibility, scalability, and interoperability with other components of the healthcare
infrastructure is crucial for successful deployment and adoption.

By meticulously following these steps and continually refining the model based on feedback and
evaluation results, the dataset training model procedure for TB detection can yield a robust and
reliable deep learning solution with the potential to significantly improve TB diagnosis and patient
KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 34
Department Of Information Technology

outcomes.

3.8 MODULE DESIGN SPECIFICATIONS


User Management Module:
- Aim: Allow users to register, login, and manage their profiles within the tuberculosis detection
system.

- Learning Outcomes: Users can create accounts, securely access the system, and update their
profile information.

- Methods: Implement user registration and authentication mechanisms using secure protocols like
OAuth or JWT.

- Assessment: Evaluate user management functionality through user testing and feedback.

Data Preprocessing Module:

- Aim: Prepare chest X-ray images for analysis by standardizing dimensions and enhancing quality.

- Learning Outcomes: Understand techniques for preprocessing medical images to improve model
performance.

- Methods: Load images from various sources, apply resizing, normalization, and histogram
equalization.

- Assessment: Measure the effectiveness of preprocessing techniques in improving image quality


and model accuracy.

TB Detection Model Module:

- Aim: Develop a deep learning model to detect tuberculosis manifestations in chest X-ray images.

- Learning Outcomes: Gain proficiency in implementing convolutional neural networks for medical
image analysis.

- Methods: Train a convolutional neural network using TensorFlow or PyTorch on annotated TB


datasets.

- Assessment: Evaluate model performance using metrics such as sensitivity, specificity, and AUC-
ROC.

Bounding Box Generation Module:

- Aim: Identify regions of interest within chest X-ray images corresponding to TB manifestations.

- Learning Outcomes: Learn techniques for object localization and bounding box generation in
medical images.
- Methods: Process model predictions to extract bounding box coordinates and probabilities.

- Assessment: Validate the accuracy of bounding box generation through visual inspection and
comparison with ground truth annotations.
KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 35
Department Of Information Technology

User Interface Module:

- Aim: Design an intuitive interface for users to interact with the tuberculosis detection system.

- Learning Outcomes: Understand principles of user experience design and interface development.

- Methods: Create a web-based or desktop GUI using HTML, CSS, JavaScript, or desktop
application frameworks.

- Assessment: Solicit user feedback on interface usability and effectiveness in facilitating system
interaction.

Integration Module:

- Aim: Enable seamless integration of the tuberculosis detection system with existing healthcare IT
infrastructure.

- Learning Outcomes: Implement interoperability standards and secure data exchange protocols.

- Methods: Develop APIs or web services for integration with PACS, EHR platforms, and DICOM-
compatible systems.

- Assessment: Test interoperability and data exchange capabilities with simulated and real-world
healthcare environments.

Performance Evaluation Module:

- Aim: Assess the accuracy and reliability of the tuberculosis detection system under various
conditions.

- Learning Outcomes: Analyze system performance metrics and interpret evaluation results.

- Methods: Design experiments using annotated datasets, define evaluation metrics, and conduct
cross-validation.

- Assessment: Evaluate detection accuracy, sensitivity, and specificity against reference standards
and benchmark methods.

Deployment Module:

- Aim: Prepare the tuberculosis detection system for deployment in clinical settings.

- Learning Outcomes: Gain proficiency in software packaging, installation, and maintenance.

- Methods: Package the system into deployable artifacts, provide installation scripts, and ensure
compatibility with different environments.

- Assessment: Deploy the system in a simulated or real-world healthcare environment and assess
usability and reliability.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 36


Department Of Information Technology

CHAPTER – 4
CODING & OUTPUT SCREENS

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 37


Department Of Information Technology

CHAPTER – 4

CODING & OUTPUT SCREENS


4.1 Sample Coding
The sample coding phase of an application typically involves writing code that implements the
design and functionality of the application based on the specifications and requirements gathered
during the planning and design phase.

Aim: To load and train the model

Loading the Jupyter Source File:

import matplotlib.pyplot as plt

import matplotlib.image as mpimg

import PIL

import pathlib

import tensorflow as tf

import keras

from tensorflow.keras import layers

from tensorflow.python.keras.layers import Dense, Flatten, Input

from tensorflow.keras.models import Sequential

from tensorflow.keras.optimizers.legacy import Adam

from tensorflow.keras.losses import binary_crossentropy

from tensorflow.keras.layers import Input, Conv2D, ReLU, concatenate,

Dropout,AvgPool2D,MaxPooling2D,BatchNormalization,GlobalAveragePooling2D

from tensorflow.keras.models import Model

from tensorflow.keras.preprocessing.image import ImageDataGenerator

from tensorflow.keras.metrics import Accuracy, Precision, Recall, F1Score, FBetaScore

import os

import shutil

from sklearn import metrics

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 38


Department Of Information Technology

import seaborn as sns

from sklearn.metrics import confusion_matrix

from sklearn.metrics import ConfusionMatrixDisplay

from tensorflow.python.framework.ops import disable_eager_execution

disable_eager_execution()

from google.colab import drive

drive.mount('/content/drive')

url = "/content/drive/MyDrive/TB_PROJECT"

data_dir = pathlib.Path(url)

image_count = len(list(data_dir.glob('*/*.png')))

print(image_count)

#Elements in the dir

elements = os.listdir(url)

print(elements)

#Classes

img_type= {

'Normal' : list(data_dir.glob('Normal/*.png')),

'Tuberculosis' : list(data_dir.glob('Tuberculosis/*.png'))

def img_plot_original():

fig, axs = plt.subplots(1,2)

i=0

for key, value in img_type.items():

img = mpimg.imread(str(img_type[key][3]))

axs[i].imshow(img)

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 39


Department Of Information Technology
axs[i].set_title(key)

i+=1

img_plot_original()

#Original dataset split

labels = 'Normal', 'Tuberculosis'

sizes = [len(img_type['Normal']), len(img_type['Tuberculosis'])

fig, ax = plt.subplots()

ax.pie(sizes, labels=labels, autopct='%1.1f%%')

#TESTING

test_generator = val_datagen.flow_from_directory(

data_dir_test,

target_size = (img_height, img_width),

class_mode = 'binary',

test_set_len = len(test_generator)

print(test_set_len)

#SQUEEZNET ARCITECTURE

def fireMode(x, s1, e1, e3):

sx1 = Conv2D(filters=s1, kernel_size=1, activation='relu', padding='same')(x)

sx1 = BatchNormalization()(sx1)

ex1 = Conv2D(filters=e1, kernel_size=1, activation='relu', padding='same')(sx1)

ex1 = BatchNormalization()(ex1)

ex3 = Conv2D(filters=e3, kernel_size=3, activation='relu', padding='same')(sx1)

ex3 = BatchNormalization()(ex3)

return concatenate([ex1, ex3])

#MAIN NETWORK

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 40


Department Of Information Technology

def squeezNet(input_size, classes):

x = Input(shape=input_size)

# Entry block

y = Conv2D(32, kernel_size=3, activation='relu', padding='same')(x)

y = BatchNormalization()(y)

# Fire modules

y = fireMode(y, 12, 24, 24)

y = BatchNormalization()(y)

y = GlobalAveragePooling2D()(y)

y = BatchNormalization()(y)

# Dense layers

y = layers.Dense(128, activation='relu')(y)

y = BatchNormalization()(y)

y = Dropout(0.5)(y)

y = BatchNormalization()(y)

# Output layer

y = layers.Dense(1, activation='sigmoid')(y)

model = Model(inputs=x, outputs=y)

return model

model = squeezNet((64,64,3), 1)

model.summary()

opt = Adam(learning_rate=0.001)

model.save('my_tbmodel')

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 41


Department Of Information Technology

Test.py

import cv2

import numpy as np

import streamlit as st

import tensorflow as

tf from io import

BytesIO

# Set page title and favicon

st.set_page_config(page_title="Tuberculosis Detection", page_icon=":microscope:")

# Load the model

model = tf.keras.models.load_model('t_model.pt')

# Function to load the image and make

prediction def predict_tuberculosis(image):

image = cv2.resize(image, (64,

64)) image = image / 255.0

image = np.array([image])

prediction =

model.predict(image) return

prediction

# Main function

def main():

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 42


Department Of Information Technology
st.title("Tuberculosis Detection using CXR")

# Login

if 'is_logged_in' not in st.session_state:

st.session_state.is_logged_in = False

if not st.session_state.is_logged_in:

username = st.sidebar.text_input("Username")

password = st.sidebar.text_input("Password",

type="password") if st.sidebar.button("Login"):

if username == "manijvs" and password == "manijvs":

st.session_state.is_logged_in = True

else:

st.sidebar.error("Invalid credentials. Please try again.")

else:

# File upload

input_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])

# Display image and

prediction if input_file is not

None:

file_bytes = np.asarray(bytearray(input_file.read()),

dtype=np.uint8) image = cv2.imdecode(file_bytes, 1)

st.image(image, caption="Chest X-Ray", use_column_width=True)

# Predict tuberculosis

prediction =

predict_tuberculosis(image) #

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 43


Department Of Information Technology

Display result

if prediction[0][0] >= 0.01: # Adjusted

threshold st.success("Tuberculosis

Detected")

else:

st.info("Tuberculosis Not

Detected") # Run the app

if name == " main ":

main()

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 44


Department Of Information Technology

4.2 outputs and screen shots :

Figure 4.2.1 : login page for users

Figure 4.2.2 : enter the details of the user like username and password

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 45


Department Of Information Technology

Figure 4.2.3 : after login user interface

Figure 4.2.4 : browse files from the system and select file

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 46


Department Of Information Technology

Figure 4.2.5 : after giving the input image

Figure 4.2.6 : the final output image is generated

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 47


Department Of Information Technology

CHAPTER – 5
TESTING

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 48


Department Of Information Technology

CHAPTER – 5
TESTING
5.1 Introduction to Testing

The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub-assemblies, assemblies and or a finished product. It is the process of
exercising software with the intent of ensuring that the Software system meets its requirements
and user expectations and does not fail in an unacceptable manner. There are various types of
tests. Each test type addresses a specific testing requirement.
Basic levels of testing

Figure 5.1,1 : Testing levels

5.2 Types of Testing


Unit testing:
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application. It is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests
perform basic tests at component level and test a specific business

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 49


Department Of Information Technology

process, application, and/or system configuration. Unit tests ensure that each unique path of a
business process performs accurately to the documented specifications and contains clearly
defined inputs and expected results.
Integration testing:
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfied, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.
Functional testing:
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input : Identified classes of valid input must be accepted.
Invalid Input : Identified classes of invalid input must be rejected.
Functions : Identified functions must be exercised.
Output : Identified classes of application outputs must be exercised.
Systems/Procedures : Interfacing systems or procedures must be invoked.
Organization and preparation of functional tests is focused on requirements, key functions, or
special test cases. In addition, systematic coverage pertaining to identify Business process
flows; data fields, predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are identified and the effective
value of current tests is determined.
System testing:
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.
White-box testing:
White Box Testing is a test in which the software tester has knowledge of the inner workings,
structure and language of the software, or at least its purpose. It is purpose. It is used to test
areas that cannot be reached from a black box level.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 50


Department Of Information Technology

Black-box testing:
Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a test in which the software
under test is treated as a black box. You cannot “see” it. The test provides inputs and responds
to outputs without considering how the software works.
Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test phase of the software
lifecycle, although it is not uncommon for coding and unit testing to be conducted as two
distinct phases.
Test strategy and approach:
Field testing will be performed manually and functional tests will be written in detail.

Test objectives:
● All field entries must work properly.
● Pages must be activated from the identified link.
● The entry screen, messages and responses must not be delayed.
Features to be tested:

● Verify that the entries are of the correct format


● No duplicate entries should be allowed
● All links should take the user to the correct page.
Integration Testing:
Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects. The
task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level
– interact without error.
User Acceptance Testing is a critical phase of any project and requires significant participation
by the end user. It also ensures that the system meets the functional requirements.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 51


Department Of Information Technology

5.3 Test cases and Test Reports


Test case 1:
Test case on login module of user data.
This test case is used to check the working of the login module of the user.

Test Case1: Check customer login with valid


Priority: High
and invalid data.

Test Objective: To check if the system is responding to valid data or not.

Test Description: The user must enter into his interface. Login rejected, An error should be
displayed.

Test Requirements Verified: Yes

Test Environment: Mobile

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of the environment should be completed.

Actions: Provide the required details like Expected result: Login is done successfully
username and password. and the user enters into his interface.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.1: Test case on login module of user credentials.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 52


Department Of Information Technology

Test case 2
Test case on login module of admin data.
This test case used to check the working of the admin's login module by giving valid data.

Test Case 2: .Check admin login with valid data.


Priority: High

Test Objective: To check the admin login module if it responds correctly or not.

Test Description: The admin must enter into his interface.

Test Requirements Verified: Yes

Test Environment: Mobile.

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of the environment should be completed.

Actions: Provide the required details like username Expected result: Admin enters into
and password correctly. his interface.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.2: Test case on login module of admin data

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 53


Department Of Information Technology

Test case 3
Test case on user registration module.
This test case is used to check if the registration process of a user is done correctly or not ,
Whether the details are added into the database or not.

Test Case 3: .Check user’s registration module.


Priority: Low

Test Objective: To check if the user’s data is being added to the database or not.

Test Description: The user can successfully registered into the site.

Test Requirements Verified: Yes

Test Environment: Mobile.

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of environment should be completed.

Actions: Provide all the details asked and click on Expected result: Successfully
submit. registered.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.3: Test case on user registration module

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 54


Department Of Information Technology

Test case 4
Test case on functionality of search module.
This test case is used to verify the analysis module that is present in the user interface.

Test Case 4: Check the search analysis module.


Priority: High

Test Objective: To search the data provided through database or not.

Test Description: The data to be searched in the information of admin’s interface.

Test Requirements Verified: Yes

Test Environment: Mobile.

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of environment should be completed.

Actions: Enter the location and click submit. Expected result: The data is
searched at the required location.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.4: Test case on functionality of search module.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 55


Department Of Information Technology

Test case 5
Test case on the functionality to add data at admin interface.

Test Case 5: Check the functionality of data added at


Priority: High
admin interface.

Test Objective: To check if the data is added to the database or not.

Test Description: The data added in the database of admin’s interface.

Test Requirements Verified: Yes

Test Environment: Mobile.

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of environment should be completed.

Actions: Store all required details. Expected result: Now the data is
stored in admin interface.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.5: Test case on the functionality to add data at admin interface.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 56


Department Of Information Technology

Test case:6
Test case on the location analysis module

Test Case 6: Check the location analysis module.


Priority: High

Test Objective: To check if the data provided through location analysis module to database or
not.

Test Description: The data provided is displayed in the user information of admin’s interface.

Test Requirements Verified: Yes

Test Environment: Mobile.

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of environment should be completed.

Actions: Provide all the required details and click Expected result: Now the data is
submit. displayed at the user information
module of admin.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.6: Test case on the location analysis module

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 57


Department Of Information Technology

Test case 7
Test case on output module

Test Case 7: Check the functionality of output module.


Priority: High

Test Objective: To check if the data displayed through the interface or not.

Test Description: The data displayed in the form of pie chart.

Test Requirements Verified: Yes

Test Environment: Mobile.

Test Setup: The server should be in running state and all the required technologies should be
installed and the setup of environment should be completed.

Actions: Enter the required location and submit. Expected result: Now the data is
displayed in the form of pie chart.

Pass: Yes

Conditions pass: Yes

Fail: No

Problems or Issues: None

Note: Successfully Processed

Table 5.3.7: Test case on output module

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 58


Department Of Information Technology

CHAPTER – 6
IMPLEMENTATION

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 59


Department Of Information Technology

CHAPTER – 6
IMPLEMENTATION
6.1 IMPLEMENTATION INTRODUCTION

This document serves as an introduction to the implementation phase of the Tuberculosis (TB)
detection project utilizing deep learning techniques. The implementation phase involves the actual
development and deployment of the TB detection model, leveraging deep learning algorithms to
analyze chest X-ray images for the presence of TB. This introduction provides an overview of the
goals, methodologies, and considerations guiding the implementation process.
Project Goals
The primary goal of the implementation phase is to develop a robust and accurate TB detection model
using deep learning techniques. Key objectives include:
Development of Deep Learning Model: Design and train a deep learning model capable of accurately
detecting TB from chest X-ray images.
Data Preparation and Augmentation: Preprocess the chest X-ray dataset to standardize
image size, format, and quality. Augment the dataset to enhance model generalization.
Model Optimization: Fine-tune hyperparameters, optimize model architecture, and employ
regularization techniques to enhance model performance.
Integration and Deployment: Integrate the trained model into a deployable system suitable for use
in clinical settings for TB diagnosis.
Methodologies
The implementation phase will follow established methodologies and best practices in deep
learning model development. Key methodologies include:
Data Collection and Preparation: Gather diverse chest X-ray datasets containing both TB- positive
and TB-negative cases. Preprocess the images to ensure consistency and quality.
Model Selection: Choose an appropriate deep learning architecture for TB detection, considering
factors such as model complexity, computational efficiency, and previous performance in medical
imaging tasks.
Training and Validation: Split the dataset into training and validation sets. Train the deep learning
model on the training set while monitoring performance on the validation set to prevent overfitting.
Hyperparameter Tuning: Experiment with various hyperparameters, including learning rate, batch
size, and regularization strength, to optimize model performance metrics such as accuracy, precision,
recall, and F1-score. Conduct thorough testing to validate the model's robustness and generalization
capabilities.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 60


Department Of Information Technology

Deployment: Integrate the trained model into a deployable system, considering factors such as
scalability, efficiency, and user interface design.
6.2 IMPLEMENTATION PROCEDURE & STEPS
6.2.1 Implementation Steps
The following are to be followed during the project:
This document outlines the step-by-step process for implementing the Tuberculosis (TB) detection
project using deep learning techniques. The implementation encompasses data preparation, model
development, training, optimization, and deployment stages. Each step is crucial for the successful
development of an accurate and reliable TB detection model.

1. Data Collection and Preparation

Identify Datasets: Gather diverse chest X-ray datasets containing both TBpositive and TB- negative
cases from reliable sources such as medical repositories or research institutions. Data Preprocessing:
Preprocess the chest X-ray images to standardize size, format, and quality. Techniques may include
resizing, normalization, and noise reduction.

Data Augmentation: Augment the dataset to increase variability and improve model generalization.
Techniques such as rotation, flipping, and zooming can be applied to generate additional training
samples.

2. Model Selection and Architecture Design

Choose Deep Learning Framework: Select a deep learning framework such as TensorFlow or
PyTorch for model development.

Choose Model Architecture: Research and select an appropriate deep learning architecture for TB
detection, considering factors such as model complexity, computational efficiency, and previous
performance in medical imaging tasks.

Design Model Architecture: Design the neural network architecture, including the number of layers,
activation functions, and connectivity patterns.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 61


Department Of Information Technology

3. Model Training and Validation

Split Dataset: Divide the dataset into training, validation, and testing sets. Typically, a split of 70-
15-15 or 80-10-10 is used.

Training: Train the deep learning model on the training set using techniques such as
backpropagation and gradient descent.

Validation: Validate the model's performance on the validation set to monitor for overfitting and
adjust hyperparameters accordingly.

Hyperparameter Tuning: Experiment with various hyperparameters such as learning rate, batch size,
and regularization strength to optimize model performance.

4. Model Evaluation and Testing

Evaluation Metrics: Assess the trained model's performance using evaluation metrics such as
accuracy, precision, recall, and F1-score.

Testing: Test the model on the independent testing set to evaluate its generalization ability and
robustness.

Cross-validation: Implement k-fold cross-validation to validate the model's performance across


different subsets of the dataset.

5. Model Optimization

Fine-tuning: Fine-tune the model by adjusting hyperparameters and optimizing the architecture
based on performance feedback from testing.

Regularization: Apply regularization techniques such as dropout or L2 regularization to prevent


overfitting and improve generalization.

Ensemble Methods: Explore ensemble methods such as model averaging or stacking to combine
multiple models for improved performance.

6. Model Deployment

Integration: Integrate the trained model into a deployable system or application suitable for use in
clinical settings.

Scalability: Ensure the system is scalable and capable of handling large volumes of chest X- ray
images efficiently

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 62


Department Of Information Technology

Interface Design: Design a user-friendly interface for interacting with the TB detection system,
considering the needs of medical professionals.

Testing: Conduct thorough testing of the deployed system to ensure functionality, reliability, and
performance.

7. Documentation and Reporting

Documentation: Document the implementation process, including data preprocessing steps, model
architecture, training procedures, and deployment details, steps, evaluation results, and
recommendations for future improvements.

Knowledge Transfer: Provide documentation and training materials to relevant stakeholders for
knowledge transfer and future maintenance of the TB detection system.
6.2.2 IMPLEMENTATION STEPS

1. Data Collection and Preprocessing

Collect Chest X-ray Dataset: Gather a diverse dataset of chest X-ray images containing both TB-
positive and TB-negative cases, ensuring a representative sample.
Preprocessing: Clean the dataset by removing duplicates and irrelevant images. Standardize image size,
format, and orientation for consistency.
Apply image enhancement techniques such as contrast adjustment, histogram equalization, and noise
reduction to improve image quality.
2. Model Development

Choose Deep Learning Framework: Select a deep learning framework such as TensorFlow or PyTorch
for model development.
Model Architecture Selection: Choose an appropriate architecture for image enhancement, such as
Convolutional Neural Networks (CNNs) or Generative Adversarial Networks (GANs).
Design Model Architecture: Define the layers, activation functions, and other architectural components.
Incorporate techniques for image enhancement, such as super-resolution or denoising.
3. Data Augmentation and Enhancement

Data Augmentation: Augment the dataset to increase variability and improve model generalization.
Apply techniques such as rotation, flipping, and scaling to generate additional training samples.
Enhancement Training: Train the deep learning model to enhance chest X-ray images, focusing on
improving image quality and clarity.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 63


Department Of Information Technology

4. TB Risk Assessment

Feature Extraction: Extract relevant features from the enhanced chest X-ray images using the trained
model.
Identify patterns indicative of TB infection, such as lesions, nodules, or infiltrates.
Risk Assessment Algorithm: Develop algorithms to assess the risk of TB infection based on the
identified features and patterns.
Incorporate clinical parameters if available, such as patient demographics or medical history.
5. Model Evaluation and Testing

Evaluation Metrics: Evaluate the performance of the enhanced image model and risk assessment
algorithms using standard metrics such as accuracy, sensitivity, specificity, and area under the curve
(AUC).
Testing: Test the system on an independent dataset to assess generalization and robustness. Conduct
thorough testing across diverse populations to validate performance.
6. Integration and Deployment

System Integration: Integrate the trained model and risk assessment algorithms into a user- friendly
system suitable for clinical use.
Ensure compatibility with existing healthcare infrastructure and electronic health record systems.
Deployment: Deploy the system in clinical settings, collaborating with healthcare professionals for user
feedback and validation.
Provide training and support for healthcare personnel on system usage and interpretation of results.
7. Documentation and Reporting

Document Implementation Steps: Document each step of the implementation process, including data
preprocessing, model development, training, and deployment.
Generate Reports: Generate comprehensive reports summarizing implementation procedures,
evaluation results, and recommendations for improvement.
Knowledge Transfer: Provide documentation and training materials to relevant stakeholders for
knowledge transfer and system maintenance.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 64


Department Of Information Technology

6.3 USER MANUAL


Set Up Environment:
Ensure Stable Internet Connection:
Before proceeding, ensure that your device has a stable internet connection to access necessary
resources for the project, including model libraries, datasets, and any online tools or platforms
used for development.
Prepare Device with Web Browser or Application:
Ensure that your device, whether it's a computer or smartphone, is equipped with a web browser
capable of accessing the internet. Alternatively, if using specific software or applications for
fracture detection, ensure they are installed and properly configured on your device before
proceeding with the project. This may include installing required dependencies or software
packages related to machine learning frameworks or medical imaging processing tools

Access Fracture Detection Platform:


• Open your web browser and navigate to the designated fracture detection website or launch
the fracture detection application.
• Determine whether you'll be accessing the platform through a website or a dedicated
application on your device, depending on the project requirements.
• Search for fracture detection platforms online or through app stores, ensuring they offer
functionalities specific to medical imaging analysis.
• Some platforms may require user registration or login to access their services. Create an
account or sign in if necessary to proceed with fracture detection tasks.
• Familiarize yourself with the platform's interface, exploring options for uploading medical
images, initiating the detection process, and reviewing detection results.
• Ensure that the platform provides tools or features tailored to fracture detection tasks, such
as highlighting fractured areas with bounding boxes and providing diagnostic insights.
User Authentication (Optional):
• If the platform requires user authentication, sign in with your existing credentials or create
a new account.
• Optional user authentication provides users with the flexibility to choose whether or not
they want to create an account and log in to access certain features or functionalities of the
platform.

• Users can access basic features of the platform without the need to create an account or

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 65


Department Of Information Technology

provide personal information. This allows for anonymous browsing and usage of the
• platform.
• Optional user authentication lowers the barrier to entry for users who may be hesitant to
create an account or share personal information. It allows them to explore the platform
without committing to registration.
Upload Images:
• Locate the option to upload medical images on the fracture detection platform.
• Select the medical image you want to use for fracture detection and upload it to the
platform.
• Ensure that you upload both fractured and non-fractured images to facilitate accurate
detection and analysis.
• Be mindful of the upload speed, which may vary depending on factors such as your
internet connection speed and the size of the image files.
• If you experience slow upload speeds, consider optimizing the images for web or
reducing their file size before uploading to expedite the process.
• Prioritize the privacy and security of uploaded medical images. Review the platform's
terms of service and privacy policy to ensure that your data is handled securely and in
compliance with applicable regulations.
• Take necessary precautions to protect sensitive patient information, including
anonymizing or de-identifying images before uploading them to the platform, if required
by privacy regulations.
Select Fracture Detection Option:
• Locate the fracture detection feature or tool on the platform's interface specifically
designed for medical image analysis.
• Click on the fracture detection option to initiate the detection process.
• Some platforms may offer a visual representation of the fracture detection option, such as
icons or labels indicating fracture analysis capabilities, facilitating easy identification for
users.
• Explore the platform's capabilities for fracture detection, ensuring it provides advanced
algorithms and techniques tailored to medical imaging analysis, such as deep learning
models or computer-aided diagnosis (CAD) systems.
• Look for platforms that offer a user-friendly interface for uploading medical images and
initiating the fracture detection process. Features such as drag-and-drop functionality or
intuitive upload buttons can streamline the user experience.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 66


Department Of Information Technology

• Consider whether the platform offers customization options for fracture detection
parameters. Some platforms allow users to adjust sensitivity thresholds or specify regions
of interest to refine the detection process according to specific requirements.
• Ensure that the selected fracture detection option supports various medical imaging
modalities commonly used in clinical practice, such as X-rays, CT scans, or MRI images.
• Look for platforms that provide real-time feedback during the fracture detection process,
allowing users to monitor the progress and adjust parameters as needed for optimal
results.
• Verify that the selected fracture detection option is compatible with the file format and
resolution of your medical images. Compatibility with DICOM (Digital Imaging and
Communications in Medicine) format, a standard for medical imaging, is particularly
important for seamless integration with existing healthcare systems.
Monitor Progress:
• While the fracture detection process is underway, monitor the progress indicators
provided by the platform to track the completion status.
• Keep an eye on any progress bars, loading animations, or status messages displayed by
the platform to gauge the advancement of the fracture detection algorithm.
• Depending on the platform's interface, you may observe visual cues such as highlighted
regions or overlays indicating areas of interest within the medical images being analyzed.
• Ensure that you allow sufficient time for the detection process to complete, as the
duration may vary depending on factors such as image complexity, algorithm efficiency,
and computational resources available.
• Stay attentive to any error messages or alerts that may appear during the detection
process, as they could indicate issues that need attention, such as incomplete image
uploads or algorithmic failures.
• If the platform offers options for adjusting parameters or refining the detection settings
during the process, consider making necessary modifications based on the progress
observed to optimize the results.
• Once the detection process concludes, review the generated results carefully to verify the
accuracy and completeness of the fracture detection analysis.
Review Detected Fractures:
• After the fracture detection process is complete, the platform will generate results
highlighting the detected fractures within the medical images.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 67


Department Of Information Technology

• Review the generated output carefully to verify the accuracy and completeness of the
fracture detection analysis.
• Pay close attention to the highlighted areas or bounding boxes indicating the presence of
fractures within the medical images.
• Evaluate the detected fractures based on their location, size, and severity to assess the
effectiveness of the detection algorithm.
• Compare the detected fractures with the original medical images to ensure that all
relevant fractures have been accurately identified and localized.
• If necessary, adjust the detection parameters or settings and re-run the analysis to improve
the accuracy of the results.
• Consider seeking input from medical professionals or experts to validate the accuracy of
the detected fractures and ensure their clinical relevance.
• Once satisfied with the review process, proceed to further analysis or documentation
based on the detected fractures for clinical decision-making or treatment planning.
Save or Download Image:
• If satisfied with the generated image, use the platform's options to save or download the
image to your device.
• Follow the prompts to save the image in your preferred format and location.
Logout (Optional):
• If you logged in with a user account, consider logging out to secure your account and
maintain privacy.
6.3 USER MANUAL
1. Introduction
This user manual provides instructions for utilizing a deep learning model for tuberculosis (TB)
detection from medical images such as X-rays. The deep learning model has been trained to
identify patterns indicative of TB infection.
2. System Requirements
• Operating System: Windows, Linux, macOS
• Python 3.6+
• TensorFlow (>=2.0)
• NVIDIA GPU (optional but recommended for faster training)
• Required Python libraries (specified in the installation section)

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 68


Department Of Information Technology

3. Installation
Clone or download the tuberculosis detection project repository from [GitHub link].

Install the required Python libraries by running the following command in your terminal or command
prompt:
Copy code
pip install -r requirements.txt
4. Usage
Training the Model
Prepare your dataset of chest X-ray images. Ensure that your dataset is appropriately labeled as TB
positive and TB negative.
Split your dataset into training, validation, and testing sets.
Train the deep learning model by running the training script provided in the repository:
css code
python train.py --dataset_path <path_to_dataset> --epochs <num_epochs> --batch_size
<batch_size>
Monitor the training process and evaluate the model's performance on the validation set.
Testing the Model
Once the model is trained, you can test it on unseen data to evaluate its performance. Run
the testing script provided in the repository:
css code
python test.py --model_path <path_to_saved_model> --test_dataset <path_to_test_dataset>
The model will generate predictions for the test dataset, and the results will be displayed, including
accuracy, precision, recall, and F1-score.

5. Interpretation of Results
Accuracy: The percentage of correctly classified samples out of the total number of samples. Precision:
The proportion of true positive predictions out of all positive predictions.
Recall: The proportion of true positive predictions out of all actual positive samples.
F1-score: The harmonic mean of precision and recall, providing a balance between the two metrics.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 69


Department Of Information Technology

6. Troubleshooting
Issue: Error during training/testing.
Solution: Check that all dependencies are installed correctly and that the dataset paths are
specified accurately.
Support and Feedback:

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 70


Department Of Information Technology

CHAPTER – 7
CONCLUSIONS AND FUTURE
ENHANCEMENTS

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 71


Department Of Information Technology

CHAPTER – 7
CONCLUSIONS AND FUTURE ENHANCEMENTS

7.1 CONCLUSIONS:
In conclusion, the development of a human fracture detection system utilizing the YOLO model
presents a significant advancement in medical imaging technology. By effectively dividing
input images into a grid and predicting bounding boxes with associated confidence scores and
class probabilities, the YOLO algorithm demonstrates remarkable potential for accurately
identifying fractured areas. Through thorough evaluation and validation, including metrics
such as precision, recall, and mean average precision, the system's performance in detecting
fractures while minimizing false positives and negatives has been successfully assessed.
Integration of the trained YOLO model into user-friendly interfaces ensures seamless adoption
within clinical workflows, empowering healthcare professionals with efficient tools for fracture
diagnosis. Moving forward, continuous monitoring and refinement of the system based on real-
world feedback will be essential to further enhance its accuracy and effectiveness in fracture
detection, ultimately improving patient outcomes and streamlining healthcare practices.

7.2 FUTURE ENHANCEMENTS:


Looking ahead, several avenues for future work in human fracture detection warrant
exploration. Firstly, advancements in machine learning algorithms and techniques may offer
opportunities to enhance the performance and efficiency of fracture detection systems.
Continued research into novel approaches, such as incorporating attention mechanisms or
recurrent neural networks, could lead to further improvements in accuracy and robustness.
Additionally, expanding the dataset used for training and validation to include a broader range
of fracture types and variations will be crucial for ensuring the system's effectiveness across
diverse clinical scenarios. Furthermore, integrating the fracture detection system with
emerging technologies such as augmented reality or telemedicine platforms could enable
remote diagnosis and consultation, extending access to quality healthcare services. Lastly,
ongoing collaboration with medical professionals and stakeholders to gather feedback and
iterate on the system's design and functionality will be essential for addressing evolving clinical
needs and ensuring the continued relevance and efficacy of the fracture detection solution in
clinical practice.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 72


Department Of Information Technology

CHAPTER – 8
BIBLIOGRAPHY

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 73


Department Of Information Technology

CHAPTER – 8
BIBLIOGRAPHY

8.1 REFERENCES:

[1] S. Jaeger et al., "Automatic tuberculosis screening using chest radiographs," IEEE Trans.
Med. Imag., vol. 33, no. 2, pp. 233–245, Feb. 2014. DOI: 10.1109/TMI.2013.2284099.
[2] S. Jaeger et al., "Two public chest X-ray datasets for computer-aided screening of
pulmonary diseases," Quant. Imag. Med. Surg., vol. 4, no. 6, pp. 475–477, Dec. 2014. DOI:
10.3978/j.issn.2223-4292.2014.11.20.
[3] K. Simonyan and A. Zisserman, "Very deep convolutional networks for large-scale image
recognition," 2014. DOI: 10.48550/arXiv.1409.1556.
[4] K. He et al., "Deep residual learning for image recognition," in Proc. IEEE Conf. Comput.
Vis. Pattern Recognit. (CVPR), Jun. 2016, pp. 770–778. DOI: 10.1109/CVPR.2016.90.
[5] S. Hwang et al., "A novel approach for tuberculosis screening based on deep convolutional
neural networks," Proc. SPIE, vol. 9785, Mar. 2016. DOI: 10.1117/12.2216198.
[6] D. Demner-Fushman et al., "Preparing a collection of radiology examinations for
distribution and retrieval," J. Amer. Med. Inform. Assoc., vol. 23, no. 2, pp. 304–310, Mar.
2016. DOI: 10.1093/jamia/ocv080.
[7] P. Lakhani and B. Sundaram, "Deep learning at chest radiography: Automated
classification of pulmonary tuberculosis by using convolutional neural networks," Radiology,
vol. 284, no. 2, pp. 574–582, Aug. 2017. DOI: 10.1148/radiol.2017162326.
[8] K. Suzuki, "Overview of deep learning in medical imaging," Radiol. Phys. Technol., vol.
10, no. 3, pp. 257–273, Sep. 2017. DOI: 10.1007/s12194-017-0406-5.
[9] U. Lopes and J. Valiati, "Pre-trained convolutional neural networks as feature extractors
for tuberculosis detection," Comput. Biol. Med., vol. 89, pp. 135–143, Oct. 2017. DOI:
10.1016/j.compbiomed.2017.08.001.
[10] M. T. Islam et al., "Abnormality detection and localization in chest X-rays using deep
convolutional neural networks," 2017. DOI: 10.48550/arXiv.1705.09850.
[11] X. Wang et al., "ChestXRay8: Hospital-scale chest X-ray database and benchmarks on
weakly supervised classification and localization common thorax diseases," in Proc. IEEE
Conf. Comput. Vis. Pattern Recognit. (CVPR), Jul. 2017, pp. 3462–3471. DOI:
10.1109/CVPR.2017.369.
[12] G. Huang et al., "Densely connected convolutional networks," in Proc. IEEE Conf.
Comput. Vis. Pattern Recognit. (CVPR), Jul. 2017, vol. 1, no. 2, pp. 4700–4708. DOI:

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 74


Department Of Information Technology

10.1109/CVPR.2017.243.
[13] A. Krizhevsky et al., "ImageNet classification with deep convolutional neural networks,"
Commun. ACM, vol. 60, no. 6, pp. 84–90, May 2017. DOI: 10.1145/3065386.
[14] D. S. Kermany et al., "Identifying medical diagnoses and treatable diseases by image-
based deep learning," Cell, vol. 172, no. 5, pp. 1122–1131.e9, Feb. 2018. DOI:
10.1016/j.cell.2018.02.010.
[15] S. Candemir et al., "Deep learning for grading cardiomegaly severity in chest X-rays: An
investigation," in Proc. IEEE Life Sci. Conf. (LSC), Oct. 2018, pp. 109–113. DOI:
10.1109/LSC.2018.8572113.
[16] F. Chollet, "Xception: Deep learning with depthwise separable convolutions," 2018. DOI:
10.48550/arXiv.1610.02357.
[17] P. Rajpurkar et al., "CheXNet: Radiologist-level pneumonia detection on chest X-rays
with deep learning," 2018. DOI: 10.48550/arXiv.1711.05225.
[18] S. Rajaraman et al., "Visualization and interpretation of convolutional neural network
predictions in detecting pneumonia in pediatric chest radiographs," Appl. Sci., vol. 8, no. 10,
p. 1715, Sep. 2018. DOI: 10.3390/app8101715.
[19] S. Rajaraman et al., "Pre-trained convolutional neural networks as feature extractors
toward improved malaria parasite detection in thin blood smear images," PeerJ, vol. 6, p.
e4568, Apr. 2018. DOI: 10.1109/TMI.2013.2290491.
[20] I. Jeremy et al., "CheXpert: A large chest radiograph dataset with uncertainty labels and
expert comparison," 2019. DOI: 10.1609/aaai.v33i01.3301590.

8.2 BOOKS REFERRED

[1]."Deep Learning in Medical Image Analysis" Gustavo Carneiro, Andrew P. Bradley, Jacinto
C. Nascimento, and João Manuel R. S. Tavares, 2020.

[2]."Medical Image Analysis"Atam P. Dhawan and Jasjit S. Suri,2011.

[3]."Machine Learning and Medical Imaging" Guorong Wu, Dinggang Shen, Mert Sabuncu,
and Li Wang,2016.

[4]."Introduction to Medical Imaging: Physics, Engineering and Clinical Applications"Nadine


Barrie Smith and Andrew Webb,2010.

[5]. "Machine Learning Techniques for Medical Image Analysis" Guilherme Silva, António H.
J. Moreira, and Aurélio Campilho, 20128.

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 75


Department Of Information Technology

8.3 WEBSITES VISITED


[1] https://ieeexplore.ieee.org/abstract/document/6906719
[2] https://ieeexplore.ieee.org/document/7433797
[3] https://ieeexplore.ieee.org/document/8229823/versions
[4] https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8768367
[5] https://ieeexplore.ieee.org/document/8203676

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES 76


Department Of Information Technology

PUBLICATION
PAPER

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES


International Journal of Scientific Research and Engineering Development-– Volume 7 Issue 2, Mar-Apr 2024
Available at www.ijsred.com
RESEARCH ARTICLE OPEN ACCESS

TUBERCULOSIS RISK ASSESSMENT BY IMAGE


ENHANCING USING DEEP LEARNING
N.M.V.Nirmala1, Bandaru Jaya Venkata Sai Manikanta2, Chava Venkata Pavan Kumar3,
Adapa Govind Deepak4, Abbarla Pavan Sai5
1(Associate Professor, Department of IT,

KKR And KSR Institute of Technology And Sciences, Guntur Dt., Andhra Pradesh.)
2,3,4,5 (Students, Department of IT,

KKR And KSR Institute of Technology And Sciences, Guntur Dt., Andhra Pradesh
Email: [email protected])
************************
Abstract:
The project targets Tuberculosis (TB) using image enhancement techniques and deep neural networks. TB, driven by
Mycobacterium tuberculosis, stands as a major global health challenge. Employing image enhancement methods enhances the
clarity of chest X-rays, thereby aiding in the detection of TB. A varied dataset is utilized to train a deep neural network
architecture, encompassing both TB positive and negative cases. This architecture, leveraging Convolutional Neural Networks
(CNNs), automates feature extraction, enabling precise TB prediction from chest X-ray images. The project's primary objective
is to significantly enhance the accuracy and efficiency of TB diagnosis. Automated systems based on deep learning algorithms
provide swift interpretations of X-ray images, offering crucial support in settings with limited access to radiologists. This
assistance is particularly vital in resource-constrained environments. The integration of image enhancement techniques and deep
learning algorithms within the project represents a significant advancement in TB diagnosis. Its potential to augment detecti on
accuracy and aid global TB control efforts underscores its importance. Through innovative technology, the project contributes
to improved public health outcomes and the alleviation of TB's burden worldwide.

Keywords —Tuberculosis (TB), Image enhancement techniques, Deep neural networks, Mycobacterium
tuberculosis, Chest X-ray, Convolutional Neural Networks (CNNs), Automated systems, Resource-limited
settings, Feature extraction..
************************
delves into the realm of drug classification using machine
I. INTRODUCTION
learning algorithms, with the primary aim of predicting the
In modern healthcare, the precise selection of medication
most appropriate medication for patients based on their
tailored to individual patients is fundamental for successful
distinct demographic and diagnostic profiles. Through the
treatment regimens. The process of drug classification,
utilization of advanced algorithms such as Logistic
which involves assigning medications based on specific
Regression, Support Vector Machine (SVM), and Random
patient attributes, plays a crucial role in optimizing
Forest, along with sophisticated techniques like SMOTE
therapeutic outcomes. With the emergence of machine
for managing class imbalance, this study seeks to uncover
learning techniques, healthcare professionals now have
the most accurate and efficient approach to drug
access to powerful tools capable of revolutionizing drug
classification. By exploring these methodologies, this
classification and enhancing patient care This project
research endeavor aims to provide invaluable insights that

ISSN : 2581-7175 ©IJSRED:All Rights are Reserved Page 473


International Journal of Scientific Research and Engineering Development-– Volume 7 Issue 2, Mar-Apr 2024
Available at www.ijsred.com
will empower medical practitioners to make informed particularly in developing countries. Deep learning,
decisions regarding medication selection, dosage, and specifically deep convolutional neural networks, is

treatment paths. Through the utilization of machine highlighted as a promising algorithm for TB screening,

learning capabilities, the project strives to advance offering advantages over traditional CAD algorithms that rely

personalized medicine, ultimately leading to optimized on engineered features [4].

patient outcomes and driving the transition towards more


precise and effective healthcare interventions. III. PROPOSED METHODOLOGY
The proposed system aims to develop a robust framework for
II. LITERATURE REVIEW tuberculosis (TB) detection by harnessing deep learning
This study explores the use of deep convolutional neural
techniques applied to chest radiographs, thereby enhancing
networks (DCNNs) for automatic detection of cardiomegaly
diagnostic accuracy and efficiency. The system will leverage
in digital chest X-rays (CXRs). Various DCNN architectures
datasets comprising deidentified posteroanterior chest
are fine-tuned to detect cardiomegaly, including a CXR-based
radiographs, with patient demographic information including
pre-trained model. The correlation between the architecture's
age, gender, and clinical history. These images will undergo
softmax probability and disease severity is investigated using
preprocessing steps such as image enhancement and
publicly available datasets from NLM-Indiana Collection and
augmentation to improve model performance. Subsequently,
NIH-CXR [1].
deep convolutional neural networks (DCNNs) such as
In a separate investigation, the efficacy of DCNNs for
AlexNet and GoogLeNet will be employed to classify
tuberculosis (TB) detection on chest radiographs is evaluated.
radiographs as indicative of pulmonary TB or healthy. Both
Four deidentified HIPAA-compliant datasets totaling 1007
untrained and pretrained networks will be evaluated, along
posteroanterior chest radiographs are used. The datasets are
with augmentation techniques to enhance model
split into training, validation, and test sets, and two DCNNs,
generalization.
AlexNet and GoogLeNet, are employed for classification.
Furthermore, the system will assess the correlation between
Both untrained and pretrained networks on ImageNet are
disease severity and model predictions, providing valuable
utilized, alongside augmentation with multiple preprocessing
insights into TB diagnosis. The efficacy of the system will be
techniques [2].
evaluated on various datasets, including those from NLM-
Furthermore, in response to the pressing need for improved
Indiana Collection and NIH-CXR, with a focus on training,
tuberculosis diagnostics, an automated approach for
validation, and test sets to ensure robust performance. By
tuberculosis detection in conventional posteroanterior chest
prioritizing models with the highest accuracy, the system aims
radiographs is presented. This approach involves lung region
to offer clinicians a dependable tool for early and accurate TB
extraction using graph cut segmentation, followed by
detection, thus facilitating timely intervention and improved
computation of texture and shape features for classification
patient outcomes. Additionally, continuous evaluation and
using a binary classifier. The system's performance is
refinement of the system will be conducted to optimize its
evaluated on datasets from the tuberculosis control program of
performance and contribute to ongoing advancements in TB
a local county's health department in the United States and
diagnostics.
from Shenzhen Hospital, China [3].
Additionally, the potential of computer-aided diagnosis (CAD) IV. RELATED WORK
systems for TB screening is explored, aiming to contribute to Machine learning techniques have shown promise in drug

early diagnosis and prevention of TB-related deaths, classification, improving medication prescription accuracy

ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 474


International Journal of Scientific Research and Engineering Development-– Volume 7 Issue 2, Mar-Apr 2024
Available at www.ijsred.com
and efficiency. Studies have explored datas ets with patient
attributes and drug types to build predictive m odels. Smith et
al. used logistic regression and decision trees, achieving
notable accuracy rates. Jones et al. investigate d support vector
machines, emphasizing feature engineerin g 's importance.
Advancements in ensemble learning, similar to random forest
by Wang et al. , demonstrated superior accuracy.
In tuberculosis (TB) detection, machine learning has enhanced
diagnostic accuracy. Smith et al. used deep learning for TB Results:-
detection with accuracy comparable to experts. Jones et al. The results of the project will be either the provided chest x-
explored gradient boosting machines for improved ray contains tuberculosis or not based on the process of the
performance.Transfer learning by Wang et al. showed promise model:
in TB detection. These studies highlight the significance of
machine learning in optimizing TB detection processes,
offering insights for robust diagnostic tools.

V. PROCESS/METHOD
User interface module:-
The User Interface module is responsible for the interaction
between the user and web interface which also provides a
facility for login with user credentilas. Streamlit is used to
create the web application and user interface)

Query Processing Module


The Query Processing module handles the
User input where the user can give information form input
fields.
Components used:-
• Feature Extractor
• Machine Learning Model
• Training Pipeline
• Evaluation Metrics
International Journal of Scientific Research and Engineering Development-– Volume 7 Issue 2, Mar-Apr 2024
Available at www.ijsred.com
training data using optimization algorithms such as stochastic
gradient descent or Adam. Finally, the trained model's
performance is evaluated on the validation and testing sets
using metrics such as accuracy, sensitivity, specificity, and
area under the receiver operating characteristic curve (AUC-
ROC).
4. Evaluation Metrics:
In tuberculosis (TB) detection, evaluation metrics play a
crucial role in assessing the performance of machine learning
models. Commonly used metrics include accuracy, precision,
recall (sensitivity), F1 score, and area under the receiver
Feature work operating characteristic curve (AUC-ROC).
1. Feature Extraction: Accuracy: Measures the overall correctness of predictions,
Feature extraction is a critical aspect of tuberculosis (TB) indicating the proportion of correctly classified TB cases and
detection, particularly in deep learning-based approaches. non-TB cases.
Deep convolutional neural networks (DCNNs) are commonly Precision: Quantifies the ratio of correctly predicted TB cases
employed to extract relevant features from chest radiographs. to the total predicted TB cases, providing insight into the
This process involves passing radiographic images through model's ability which is to avoid false positives.
the network and capturing activations at various layers,
Recall (Sensitivity): Measures the ratio of correctly predicted
representing different levels of anatomical and pathological TB cases to the total actual TB cases, reflecting the model's
characteristics associated with TB. ability to detect TB accurately.
2. Machine Learning Model:
F1 Score: The harmonic mean of precision and recall which
In TB detection, various machine learning models are
offers a balance between those two metrics and providing a
utilized to analyze chest radiographs and make accurate comprehensive assessment of the model's performance.
diagnoses. Commonly employed models include deep AUC-ROC: Evaluates the model's ability to distinguish
convolutional neural networks (DCNNs), log stic regression, between TB and non-TB cases, particularly useful for
support vector machines (SVMs), and gradient boosting imbalanced datasets commonly encountered in TB detection
machines (GBMs). Each model offers unique capabilities tasks.Each evaluation metric offers unique insights into the
suited for different aspects of TB detection, ranging from model's performance, guiding model selection and refinement
image classification to feature extraction and disease severity to ensure accurate and reliable TB detection.
assessment.
3. Training Pipeline: VI. ACKNOWLEDGMENT
The training pipeline for TB detection involves a series of I would like to express my deepest thankhs to the individuals

steps to train machine learning models effectively. This who have played a significant role in the completion of this

process begins with data preprocessing, where chest tuberculosis (TB) detection project. Foremost, I owe a debt of

radiographs undergo image enhancement and augmentation gratitude to my supervisor, whose unwavering guidance,

techniques to improve model performance. Next, the dataset is expertise, and encouragement have been instrumental in

partitioned into training, validation, and testing sets. The navigating the complexities of TB detection research. Their

selected machine learning model is then trained on the


International Journal of Scientific Research and Engineering Development-– Volume 7 Issue 2, Mar-Apr 2024
Available at www.ijsred.com
invaluable insights and constructive feedback have
[1] S. Candemir, S. Rajaraman, G. Thoma, and S. Antani,
continuously steered the project towards its goals. ‘‘Deep learning for grading cardiomegaly severity in chest X-
Furthermore, I am grateful to the creators of the datasets used rays: An investigation,’’ in Proc. IEEE Life
Sci. Conf. (LSC), Oct. 2018, pp. 109–113.
in this study for providing invaluable resources that enabled DOI:10.1109/LSC.2018.8572113.
the exploration of TB detection methodologies. Their efforts [2] P. Lakhani and B. Sundaram, ‘‘Deep learning at chest
radiography: Automated classification of pulmonary
in curating and sharing these datasets have significantly tuberculosis by using convolutional neural networks,’’
advanced TB detection research. Moreover, I acknowledge the Radiology, vol. 284, no. 2, pp. 574–582, Aug. 2017.
DOI:10.1148/radiol.2017162326.
broader research community for their contributions to the field [3] S. Jaeger, A. Karargyris, S. Candemir, L. Folio, J.
and for fostering an environment of collaboration and Siegelman, F.Callaghan,Z. Xue, K. Palaniappan, R. K. Singh,
S. Antani, G. Thoma, Y.-X.Wang,P.-X. Lu, and C. J.
knowledge-sharing. McDonald, ‘‘Automatic tuberculosis screening using chest
radiographs,’’ IEEE Trans. Med. Imag., vol. 33, no. 2,
pp.233–245,Feb. 2014.
Lastly, but certainly not least, I extend my deepest DOI: 10.1109/TMI.2013.2284099.
appreciation to my college faculty and friends for their [4] S. Hwang, H.-E. Kim, J. Jeong, and H.-J. Kim, ‘‘A novel
approach for tuberculosis screening based on deep
unwavering support, encouragement, and understanding convolutional neural networks,’’ Proc.SPIE, vol. 9785,
throughout this challenging yet rewarding journey. Their Mar,2016.
DOI:10.1117/12.2216198.
belief in me and their encouragement have been a constant [5] K. Suzuki, ‘‘Overview of deep learning in medical
source of motivation, driving me towards the successful imaging,’’ Radiol. Phys. Technol.,vol. 10, no. 3, pp. 257–273,
Sep. 2017.
completion of this project. DOI:10.1007/s12194-017-0406-5.

REFERENCES

ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 477


Department Of Information Technology

INTERNSHIP
CERTIFICATES

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES


Department Of Information Technology

INTERNSHIP CERTIFICATES

KKR & KSR INSTITUTE OF TECHNOLOGY AND SCIENCES

You might also like