0% found this document useful (0 votes)
22 views6 pages

RM 3

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)
22 views6 pages

RM 3

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/ 6

© 2024 IJNRD | Volume 9, Issue 4 April 2024| ISSN: 2456-4184 | IJNRD.

ORG

AI-BASED TUBERCULOSIS AND


PNEUMONIA DETECTION
1
Smita S Wagh, 2Prajwal Mandale, 3Prajwal Kale, 4Sangram Deshmukh
Department of Computer Engineering,
JSPM’s Jayawantrao Sawant College of Engineering
Pune, India

Abstract : Tuberculosis and Pneumonia are significant global health concerns, particularly in resource-constrained and underserved
areas Accurate and timely diagnosis of these diseases is critical, yet often impeded by the lack of clinical experts and appropriate
diagnostic tools. Our research presents an innovative approach to address this challenge using Artificial Intelligence and deep
learning. We propose a deep-learning CNN model with multilayer classification and identification of TB and Pneumonia. Our
model uses image processing techniques and CNN functions for feature extraction and retrieve the probabilities of the Chest-Xray
images of the respiratory diseases[1], we have trained the 5323 images with the dataset of 1776 images of Pneumonia, similarly
1776 of TB and 1772 for the normal x-ray images with the help of the CNN we have calculated the accuracy rate of 96.8% of the
correct classification and detection of the respiratory diseases as per their class.

IndexTerms - Pneumonia ,Tuberculosis ,CNN ,Chest x-ray, Diagnosis

Introduction

The domain of disease diagnosis, particularly in low and middle-income nations, is consistently marked by difficulties arising from
limited resources and inadequate healthcare infrastructure. Respiratory diseases, including pneumonia and tuberculosis (TB), pose
a significant health burden worldwide. These diseases affect the lungs and respiratory system, creating a serious threat to public
health.

A significant portion of the population in these regions continues to face barriers to accessing timely and accurate diagnostics. This
results in delayed treatment and compromised health outcomes. Our project aims to narrow this significant gap by utilizing the
capabilities of machine learning algorithms to facilitate timely and accurate disease detection in rural regions. The core objective is
the early diagnosis of patients from underserved areas for rapid decision treatment.

Pneumonia, a severe respiratory disease, is a leading cause of death, particularly among children under five in resource-constrained
settings. Annually, it claims over 1.1 million lives, surpassing the combined mortality rate of HIV/AIDS, malaria, and
tuberculosis[2]. Thus in many low and middle-income countries, there is a significant shortage of these diagnostic tools and clinical
experts, leading to delayed and often inaccurate diagnosis. However, the diagnosis in most cases should be made as quickly as
possible to initiate medical treatment.

In many developed and developing countries, air pollution has reached a peak due to factors such as industrial growth, automobiles,
and dust. This has led to a large population suffering from various kinds of respiratory disorders, with TB being one of them. TB
bacteria can also influence other organs of the body if not treated on time because the harmful TB bacteria spread very rapidly[3].
The signs of Tuberculosis include cough, chest pain, weakness, weight loss, fever, and sweating.

This paper presents an AI-based approach for the detection of Tuberculosis and Pneumonia, aiming to contribute to the efforts of
disease control and prevention, particularly in resource-constrained settings. We are using Convolutional Neural Networks (CNN)

IJNRD2404468 International Journal of Novel Research and Development (www.ijnrd.org) e642


© 2024 IJNRD | Volume 9, Issue 4 April 2024| ISSN: 2456-4184 | IJNRD.ORG

and other neural network architectures for feature extraction from Chest X-ray (CXR) images. These images serve as a valuable
resource for training our models, enabling them to accurately identify patterns indicative of Tuberculosis and Pneumonia.

Methods

The data used in this study comprises Chest X-ray (CXR) images, which are crucial for the detection of Tuberculosis and
Pneumonia. These images were collected from various regional hospitals and pathology labs. The collection process was carried
out under strict ethical guidelines, ensuring patient confidentiality and consent. The dataset includes a diverse range of cases,
encompassing different stages of the diseases, and varying patient demographics[4]. This diversity is crucial for training robust
machine learning models that can generalize well to unseen data. The collected CXR images form the basis for the subsequent steps
of preprocessing, feature selection, and classification in our study.

1. Preprocessing:

The preprocessing stage is crucial in preparing the Chest X-ray (CXR) images for further analysis. This stage involves several steps:
 Data Augmentation: To increase the diversity and quantity of our training data, we use data augmentation techniques.
These may include transformations such as rotations, translations, zooming, flipping, etc. This helps to make our model
more robust and better generalized to unseen data.
 Resizing: Given that the original CXR images can vary in size, we resize all images to a standard size. This ensures that
our model receives consistently sized inputs, which is a requirement for many machine-learning algorithms.
 Normalization: We scale the pixel values of the CXR images to a certain range, often between 0 and 1. This process,
known as normalization, helps to reduce the influence of illumination differences in the images and aids in the convergence
of the model during training.
 Noise Reduction: CXR images can often contain 'noise' or unwanted variations in brightness or color information[5]. We
apply noise reduction techniques, such as smoothing filters, to reduce this noise and enhance the quality of the images.
 Segmentation: This involves dividing the image into regions or categories, which can simplify the image analysis and
allow for more precise feature extraction. In the context of CXR images, segmentation can help to highlight regions of
interest, such as the lung fields.

2. Feature Selection:

Feature selection is a critical step in the machine learning pipeline. It involves identifying the most informative features in the data
that contribute significantly to the predictive performance of the model. In the context of our study, features could be derived from
the pre-processed Chest X-ray (CXR) images.
The goal of feature selection is two-fold:
 Improving Model Performance: By selecting only the most relevant features, we can reduce the dimensionality of the data,
which can help to improve the model's performance by reducing overfitting and improving generalization.
 Increasing Computational Efficiency: Reducing the number of features can also decrease the computational cost of training
and inference, making the model more efficient to run, especially on resource-constrained devices.
In the context of CXR images, features could be pixel intensities, textures, shapes, or other identifiable aspects of the image. The
choice of features can depend on the nature of the data and the specific requirements of the task. For instance, texture features might
be particularly informative for lung disease detection, as diseases like Tuberculosis and Pneumonia can cause visible changes in the
texture of lung tissues in CXR images.

3. Classification:

Classification is the final step in the deep learning pipeline, where the prepared data is used to train a model that can predict the
class or category of new, unseen data. In the context of our study, the goal is to classify the Chest X-Ray (CXR) images into different
categories, such as 'Healthy', 'Tuberculosis', or 'Pneumonia'.

For this task, we leverage the power of Neural Networks, particularly Convolutional Neural Networks (CNN). CNNs have shown
great success in image classification tasks due to their ability to automatically learn hierarchical feature representations from the
data, eliminating the need for manual feature extraction[7]. This makes them particularly suitable for tasks that involve complex
patterns and structures, such as our CXR image classification task.

The architecture of our CNN model is designed to effectively capture the intricate patterns in the CXR images that are indicative
of 'Healthy', 'Tuberculosis', or 'Pneumonia' classes. The model is trained using a large dataset of labeled CXR images, and its
performance is evaluated using metrics called accuracy.

Once the CNN model is trained, it can be used to predict the class of new, unseen CXR images. This allows for timely and accurate
disease detection, particularly in resource-constrained settings where access to expert radiologists may be limited.

IJNRD2404468 International Journal of Novel Research and Development (www.ijnrd.org) e643


© 2024 IJNRD | Volume 9, Issue 4 April 2024| ISSN: 2456-4184 | IJNRD.ORG

Proposed Work and Implementation

In this study, we propose a solution for AI-Based Tuberculosis and Pneumonia Detection that leverages the power of Convolutional
Neural Networks (CNN), a type of machine learning model particularly effective for image analysis tasks. Our approach aims to
facilitate timely and accurate disease detection, especially in resource-constrained settings.

1.Flowchart:

1.User Registration and Login: The user registers and logs into the system. This ensures that each user's data and results are securely
stored and accessible only to them.

2.Redirect to Image Upload Page: After login, the user is redirected to the image upload page where they can upload their Chest X-
ray (CXR) images.

3.Upload the CXR Image: The user uploads the CXR image that they want to analyze. The system verifies that the uploaded file is
an image and meets any size or format requirements.

4.Image Resizing: The uploaded CXR image is resized to a standard size to ensure consistency in the analysis process.

5.Respiratory Disease Classification: The resized image is then passed through our Convolutional Neural Network (CNN) model.
The model extracts features from the image and classifies them into one of the categories: 'Healthy', 'Tuberculosis', or 'Pneumonia'.

6.Display Classification Result: The result of the classification is then displayed to the user. They can see whether the model predicts
the image to be 'Healthy', 'Tuberculosis', or 'Pneumonia'.

2.Preferred Architecture:

IJNRD2404468 International Journal of Novel Research and Development (www.ijnrd.org) e644


© 2024 IJNRD | Volume 9, Issue 4 April 2024| ISSN: 2456-4184 | IJNRD.ORG

1.Start: We begin with an input image of size N by N in matrix form. Each element of this matrix corresponds to a pixel value in
the image .

2.Convolution and Pooling : The image is passed through several convolutional layers, where filters are convolved with the image
to extract features. Pooling layers are used to reduce the spatial dimensions of the image while retaining the most important
information.

3.ReLu Activation Function: The Rectified Linear Unit (ReLU) activation function is applied to introduce non-linearity into the
model. It replaces all negative pixel values in the feature map with zero.

4.Dropout: Dropout is a regularization technique that randomly sets a fraction of input units to 0 at each update during training time.
This helps to prevent overfitting.

5.Softmax layer for Classification: The SoftMax function is used in the output layer of the model to output a probability distribution
over the target classes. The class with the highest probability is chosen as the output prediction.

6. End: The output of the SoftMax layer is the final prediction of the model.

Results And Discussion

Model accuracy

IJNRD2404468 International Journal of Novel Research and Development (www.ijnrd.org) e645


© 2024 IJNRD | Volume 9, Issue 4 April 2024| ISSN: 2456-4184 | IJNRD.ORG

1.Evaluation Metric: The model's performance was evaluated using accuracy as a key metric.

2.Training and Validation Datasets: The model's accuracy was assessed on both the training and validation datasets.

3.Visual Representation: A line graph was used to visually represent the model's accuracy over 50 epochs.

4.Training Data Accuracy: The model's accuracy improved as it learned from the training data, indicating effective learning.

5.Validation Data Accuracy: The model’s accuracy on the validation dataset also showed a general upward trend, suggesting good
generalization to unseen data.

Model loss

1.Evaluation Metric: The model's loss during the training and validation phases was another critical metric used to evaluate its
performance.

2.Visual Representation: A line graph was used to depict the model's loss over 50 epochs.

3.Training Data Loss: The training loss showed a general downward trend, indicating that the model was learning effectively from
the training data.

4.Validation Data Loss: The validation loss also decreased over time, suggesting that the model was generalizing well to new data.

IJNRD2404468 International Journal of Novel Research and Development (www.ijnrd.org) e646


© 2024 IJNRD | Volume 9, Issue 4 April 2024| ISSN: 2456-4184 | IJNRD.ORG

Conclusion and Future Scope

our study on AI-based TB and pneumonia detection involves the accurate categorization of X-ray images into three classes: TB,
pneumonia, and normal, along with their respective probabilities. Our focus lies on enabling timely diagnosis, which is critical for
effective treatment, particularly in local and underserved areas where healthcare resources are scarce. Moving forward, the future
scope of our study could entail leveraging large language models (LLMs) like GPT-3.5 to enhance accuracy and efficiency, enabling
deeper analysis of clinical data, and potentially expanding the application to other medical imaging modalities for comprehensive
diagnostic support.

References

[1]Elina Naydenova, Pneumonia detection from chest-xrays: CapsulNet architecture for severe class imbalance (2019), IEEE How
AI Could Humanitarian Technology Conference (University of Oxford) Stephen Hawkes (Global Survivability theme, Medical
Research Council) “Smart diagnostics: Algorithms for automated detection of childhood pneumonia in resource-constrained
settings”, IEEE 2015 Child Survival Medicine Technology Conference

[2]Sriram Vijendran and SRM Institute of Science and Technology, “Deep Convolutional Extreme Learning Machines And Its
Application In Pneumonia Detection”, IJRAT-Vol8, Issue1-March 2020

[3]Akanksha Soni, Avinash Rai, Satish Kumar Ahirwar, Mycobacterium Tuberculosis Detection using Support Vector Machine
Classification Approach, 978-1-6654-2306-9/21/$31.00 ©2021 IEEE DOI: 10.1109/CSNT.2021.70
[4]National library of medicine, “Multi-Turniquets for Analyzing X-ray Images for Pneumonia Detection by Indirect Prediction
algorithms Techniques National Chest Xray based on Hybrid Features” published online 23 Feb 20

[5]National Library of Medicine, “Efficient Pneumonia Detection in Chest Xray Images Using Deep Transfer Learning”, Published
online 20 January 19

[6]International Journal of System Assurance Engineering and Management, “A Deep Neural Network Approach For Detecting
Asymptomatic Pneumonia Patients through Chest X-ray Images Using Deep Transfer Learning”, Published online 2020 June 19

[7]Akshita Sachdeva Student Member IEEE, Avinash Rai EECE India URP GRPV, Satish Kumar Dewangan EECE India Member
IEEE, P Venkata Krishna, “Data-driven health-care: Aiskawar approach”, 978-1-6654-2630-9/21/$31.00 ©2021 IEEE DOI:
10.1109/CNIT.2021.70

IJNRD2404468 International Journal of Novel Research and Development (www.ijnrd.org) e647

You might also like