You are on page 1of 26

RESPONSIBLE AI BASED ML MODEL FOR DISEASE

DIAGNOSIS USING CHEST X-RAYS


A report submitted in partial fulfillment of the

requirements Of

Mini-Project (IS65)

In

Sixth

Semester By

1MS20IS072 Mithun R
1MS20IS073 Mohamad Farhan
1MS20IS090 Putta Krishna Babu
1MS20IS091 R.Jayanth Jadhav

Under the guidance of,

Mr. Suresh Kumar K R


Assistant Professor
Dept. of ISE, RIT

RAMAIAH
Institute of Technology

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING


RAMAIAH INSTITUTE OF TECHNOLOGY
(AUTONOMOUS INSTITUTE AFFILIATED TO VTU)
M. S. RAMAIAH NAGAR, M. S. R. I. T. POST, BANGALORE – 560054

2022-2023
RAMAIAH INSTITUTE OF TECHNOLOGY
(Autonomous Institute Affiliated to VTU)
M. S. Ramaiah Nagar, M. S. R. I. T. Post, Bangalore – 560054

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

RAMAIAH
INSTITUTE OF TECHNOLOGY

CERTIFICATE

This is to certify that the project work entitled “RESPONSIBLE AI BASED ML MODEL FOR
DISEASE DIAGNOSIS USING CHEST X RAYS” is a bonafide work carried out by MITHUN R bearing
USN: 1MS20IS072, MOHAMED FARHAN bearing USN: 1MS20IS073, PUTTA KRISHNA BABU
bearing USN: 1MS20IS090, JAYANTH JADHAV bearing USN: 1MS20IS091 in partial fulfillment of
requirements of Mini-Project (ISL65) of Sixth Semester B.E. It is certified that all
corrections/suggestions indicated for internal assessment have been incorporated in the report.
The project has been approved as it satisfies the academic requirements in respect of project work
prescribed by the above said course.

_________________________ _________________________
Signature of the Guide Signature of the HOD
Suresh Kumar K R Dr. Sanjay H A
Assistant Professor Professor and Head,
Dept. of ISE, RIT, Dept. of ISE, RIT
Bangalore-54 Bangalore-54

Other Examiners
Name of the Examiners: Signature
1.

2.
DECLARATION

We hereby declare that the entire work embodied in this MINI PROJECT (IS65) report has
been carried out by us at Ramaiah Institute of Technology under the supervision of Suresh
Kumar . This project report has not been submitted in part or full for the award of any diploma or
degree of this or any other University.

MITHUN.R 1MS20IS072
MOHAMED FARHAN 1MS20IS073
PUTTA KRISHNA BABU 1MS20IS090
R. JAYANTH JADHAV 1MS20IS091
ACKNOWLEDGEMENT

We take this opportunity to express our gratitude to the people who have been instrumental in the
successful completion of this project. We would like to express our profound gratitude to the Management
and Dr. N.V.R Naidu Principal, M.S.R.I.T, Bengaluru for allowing us to explore our potential.

We sincerely thank our beloved Dr. Sanjay H A, HOD, Information Science and Engineering, for his
constant support and guidance.

We wholeheartedly thank our project guide Suresh Kumar , for providing us with the confidence and
strength to overcome every obstacle at each step of the project and inspiring us to the best of our
potential. We also thank her for her constant guidance, direction, and insight during the project.
Finally, we would like to express sincere gratitude to all the teaching and non-teaching faculty of ISE
Department, our beloved parents, seniors, and my dear friends for their constant support during the course
of work.
.
Responsible AI Based Disease Diagnosis Using
Chest X Ray

SURESH KUMAR K R Mithun R Mohamed Farhan


Dept. of ISE Dept. of ISE Dept. of ISE
M S Ramaiah Institute of Technology M S Ramaiah Institute of Technology M S Ramaiah Institute of
Bengaluru, India Bengaluru, India Technology
Bengaluru, India
Putta Krishna Babu
Dept. of ISE Jayanth Jadhav
M S Ramaiah Institute of Technology Dept. of ISE
Bengaluru, India M S Ramaiah Institute of Technology
Bengaluru, India

Abstract—The purpose of this research project is to develop a cognitive solution for X-ray image
analysis that can accurately and reliably diagnose diseases while addressing concerns related to
responsible AI, including issues related to bias, privacy, and ethical considerations. X-ray image
analysis is critical for the diagnosis and treatment of various diseases, but the accuracy and reliability
of the analysis can be challenging, especially in resource-limited settings. Moreover, the use of AI
models for X-ray image analysis raises concerns about bias, privacy, and ethical considerations.

To address this problem, we propose a cognitive solution that uses AI models for X-ray image analysis in
a responsible and ethical manner. Our approach involves data collection and preprocessing, model
development, model validation, and deployment and monitoring. We use responsible AI principles that
account for potential sources of bias and ensure that our models are transparent and explainable.

To evaluate our approach, we use publicly available datasets of X-ray images and conduct experiments
to demonstrate the effectiveness of our approach. We also analyze the ethical and legal implications of
our approach, taking into account the regulatory and ethical standards that must be met.

The significance of our research project lies in the development of a responsible AI and cognitive
solution for X-ray image analysis that can improve the accuracy and speed of diagnosis and treatment
decisions while addressing concerns related to responsible AI. Our research is useful in the medical
field as it has the potential to improve patient outcomes and reduce healthcare costs. Our inquiry also
addresses the challenges related to bias, privacy, and ethical considerations in the use of AI models for
X-ray image analysis.
I. INTRODUCTION
The problem is that while X-ray image analysis is critical for the diagnosis and treatment of
various diseases, the accuracy and reliability of the analysis can be challenging, especially in
resource-limited settings. The use of AI models for X-ray image analysis raises concerns about
bias, privacy, and ethical considerations, which can undermine the trust in the diagnosis and
treatment decisions made using these models. Therefore, there is a need to develop a cognitive
solution for X-ray image analysis that can accurately and reliably diagnose diseases while
addressing concerns related to responsible AI, including issues related to bias, privacy, and ethical
considerations.

The topic of responsible AI and cognitive X-ray image analysis was chosen because of the
potential benefits it can bring to the medical field. X-ray image analysis is critical for the diagnosis
and treatment of various diseases, but the accuracy and reliability of the analysis can be
challenging, especially in resource-limited settings

Therefore, developing a cognitive solution for X-ray image analysis that can accurately and
reliably diagnose diseases while addressing concerns related to responsible AI, including issues
related to bias, privacy, and ethical considerations, is an important research area. Such a solution
can improve patient outcomes and reduce healthcare costs while maintaining the trust of patients
and healthcare providers in the diagnosis and treatment decisions made using these models. This
research topic is highly relevant in the current healthcare landscape, where the use of AI models in
medical decision-making is becoming increasingly common.

1.1 MOTIVATION
The motivation for developing responsible AI-based ML models for disease diagnosis using chest
X-rays is primarily driven by the need for accuracy, efficiency, and accessibility in healthcare.
Chest X-rays are one of the most commonly performed diagnostic imaging tests, particularly for
respiratory illnesses such as pneumonia and tuberculosis. However, interpreting these images
accurately can be challenging and time-consuming, even for experienced radiologists.

By using machine learning algorithms, it is possible to develop models that can accurately
diagnose diseases based on chest X-rays, potentially improving diagnostic accuracy and efficiency.
However, it is essential to develop these models responsibly to ensure that they are fair,
transparent, and ethical.
1.2 SCOPE
The scope of responsible AI-based ML models for disease diagnosis using chest X-rays is
vast. These models can be used in various healthcare settings, including clinics, hospitals,
and even remote areas where access to radiologists may be limited. Additionally, these
models can be used to improve disease surveillance and outbreak response, particularly in
resource-constrained settings.

Furthermore, responsible AI-based ML models can help reduce bias in healthcare by


providing more objective and standardized diagnoses. By leveraging the vast amount of
data available in electronic health records, these models can also help identify patient
populations at high risk of certain diseases and improve preventative care efforts.

2. LITERATURE SURVEY

In [1], 1.Authors:Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri,
Ronald M. Summers
In this database, the authors provide an enhanced version (with 6 more disease categories and more images
as well) of the dataset used in the recent work [1] which is approximately 27 times of the number of frontal
chest x-ray images in [3]. The dataset is extracted from the clinical PACS database at National Institutes of
Health Clinical Center and consists of ~60% of all frontal chest x-rays in the hospital. Therefore the
expected dataset is significantly more representative to the real patient population distributions and realistic
clinical diagnosis challenges, than any previous chest x-ray datasets. The size of the dataset, in terms of the
total numbers of images and thorax disease frequencies, would better facilitate deep neural network
training.There also some limitations1).The image labels are NLP extracted so there would be some
erroneous labels but the NLP labeling accuracy is estimated to be >90%. 2) Very limited numbers of
disease region bounding boxes.

In [2], .Authors:Daniel Schiff,Bogdana Rakova,Aladdin Ayesh,Anat Fanti ,Michael Lennon


This paper reviews the principles-to-practices gap. Five explanations for this gap ranging from a
disciplinary divide to an overabundance of tools are outlined.The author lays out five principles for
responsible AI - transparency, fairness, reliability, privacy, and inclusiveness - and gives a framework for
adapting these principles into specific practices for deploying and developing AI technologies. The
framework includes considerations for algorithmic decision making,data collection and
management,system monitoring and evaluation.The author specifies the importance of engaging
stakeholders who are diverse in the development and deployment of AI technologies and discusses the role
of regulation and governance in promoting responsible AI. Overall, the paper provides a roadmap for
advancing responsible AI deployment and development.
In [3], Authors:Arun Sharma,Sheeba Rani,Dinesh Gupta
This paper explores the use of artificial intelligence to classify chest X-Ray images into COVID-19 and
other infectious diseases. A dataset of 345 chest X-Ray images is used and a convolutional neural
network(CNN) is applied for image classification.The results show that the CNN model achieves an
accuracy of 95.62% in classifying COVID-19 from other infectious diseases indicating the potential of
AI-based approaches for COVID-19 diagnosis.The paper concludes that AI can be a valuable tool for
accurate and rapid diagnosis for COVID-19,especially in areas with limited access to medical facilities and
trained personnel.

In [4],Authors:Saad Bin Ahmed,Roberto Solis-Oba and Lucian Ilie


The paper explores the use of explainable AI in automated medical report generation using chest X-Ray
images. The authors propose a novel framework that integrates a deep learning-based image classification
model and NLP techniques to generate medical reports from chest X-ray images.The framework also
incorporates explainable AI techniques to provide clinicians with insights into the process of decision
making of the AI model. The authors evaluate the proposed framework on a dataset of 1,000 chest X-ray
images and show that it achieves a high percentage of accuracy in report generation and image
classification.The paper concludes that the proposed framework has the potential to enhance the percentage
of accuracy and efficiency of medical diagnosis and treatment planning, while also providing clinicians
with valuable insights into the underlying AI decision-making process.

In [5],Authors:Pranav Rajpurkar ,Jeremy Irvin,Kaylie Zhu,Brandon Yang ,Hershel Mehta


This paper presents a deep learning model for pneumonia detection on chest X-rays. The authors use a
dataset of 112,120 chest X-ray images labelled for the absence or presence of pneumonia,and train a CNN
using transfer learning approach.The model, called CheXNet, achieves an area under the receiver operating
characteristic curve (AUC-ROC) of 0.888, which is comparable to the performance of radiologists.The
authors conduct a study to evaluate the generalizability of the model across different hospitals and show
that it performs well across diverse populations. The paper concludes that CheXNet has the potential to
improve the accuracy and efficiency of pneumonia diagnosis and treatment especially in setting with
limited access to trained radiologists.

In [6], Authors:Xiaosong Wang,Yifan Peng ,Le Lu ,Zhiyong Lu ,Mohammadhadi Bagheri


This paper introduces the ChestX-ray8 database,which a large scale chest x-ray image dataset containing
108.948 frontal view X-ray images of 32,717 unique patients.The authors present a benchmark for
weekly-supervised classification and localization of eight common thorax diseases using the dataset. They
propose a deep learning approach based on CNN model for image classification and localization.The
results show that the proposed approach attained state-of-the-art performance on the benchmark tasks,
outperforming previous methods on both classification and localization tasks.
In [7], Authors:Iosif Mporas,Prasitthichai Naronglerdrit
The paper presents a deep learning approach for the identification of COVID-19 from chest X-Rays.The
authors use a dataset of 100 chest X-ray images, including 50 COVID-19 positive and 50 negative cases
and propose a CNN model for image classification.. They use transfer learning to fine-tune a pre-trained
CNN model and evaluate the models performance using metrics such as accuracy,specificity,sensitivity and
F1 score.The results show that the proposed approach attains high F1 Score and accuracy,indicating its
potential for assisting in the diagnosis of COVID-19 from chest X-rays. The paper concludes that the
proposed approach can be further improved by using larger datasets and more advanced deep learning
techniques.

In [8],Authors:Kim Anh Phung,Thuan Trong Nguyen,Nileshkumar Wangad,Samah Baraheem


The paper develops a novel deep learning model for disease recognition in X-ray images that is inspired by
a doctor consultation process.A large-scale dataset of chest X-ray images is used and are classified into
different disease categories using a multi-stage model. The first stage includes identifying the presence of
abnormalities in the image, followed by identifying the type of abnormality and finally classifying it into a
specific disease category. The proposed model is evaluated using various performance metrics such as
accuracy, sensitivity, specificity, and F1 score. The results show that the proposed approach outperforms
several state-of-the-art models for disease recognition in X-ray images. The paper concludes that the
proposed doctor consultation-inspired model has the potential to improve the accuracy and efficiency of
disease recognition in X-ray images, especially in settings where access to trained radiologists is limited.

In [9],Authors:Harold Brayan Arteaga-Arteaga,Melissa delaPava Alejandro Mora-Rubio,Mario Alejandro


Bravo-Ortíz
This paper presents a comprehensive review of machine learning approaches used for COVID-19 detection
from chest X-ray images. The authors systematically review and analyse various studies published on this
topic.The paper presents an overview of the machine learning algorithms,datasets and evaluation metrics
used in the reviewed studies. The authors also discuss the limitations and challenges of using machine
learning for COVID-19 detection from chest X-ray images, such as the small size of the available datasets
and the potential biases in the data. The paper concludes by highlighting the need for more standardised
and robust approaches for COVID-19 detection from chest X-ray images, which can be applied in clinical
practice to support the diagnosis of COVID-19 patients.

In [10],Authors:Saleh Albahli,Waleed Albattah


This paper proposes a deep learning-based approach for the detection of COVID-19 from chest X-ray
images. The authors use a dataset of X-ray images obtained from COVID-19 patients and healthy
individuals and compare the performance of different deep learning and transfer learning algorithms for the
classification of the images. They report high accuracy and sensitivity in the detection of COVID-19 using
the proposed approach, suggesting its potential for use in clinical settings to support the diagnosis of
COVID-19 patients. However, the authors also acknowledge the limitations of their study, including the
small size of the dataset used and the need for further validation of the proposed approach on larger
datasets.
3. METHODOLOGY
1. Defining the problem and the data:
● Clearly define the disease you want to diagnose using chest X-rays.
● Identify the relevant medical data to collect such as X-ray images, age, sex, and medical history.
● Ensure that the data is appropriately labeled and anonymized.

2. Developing the ML model:


● Choose an appropriate algorithm for image classification such as Convolutional Neural Network
(CNN).
● Split the data into training and testing sets.
● Train the model using the training data and validate the model using the testing data.
● Optimize the model by adjusting the hyperparameters such as the learning rate, batch size, and
optimizer.

3. Evaluating the performance of the model:


● Use metrics such as accuracy, precision, recall, and F1 score to evaluate the performance of the
model.
● Compare the performance of the model with existing state-of-the-art models.

4. Addressing fairness and bias:


● Evaluate the model for potential sources of bias such as race or ethnicity, gender, or other
demographic factors.
● Adjust the model to reduce any identified bias in the data or algorithm.

5. Interpreting the model:


● Use techniques such as SHAP values, LIME, or other interpretability methods to understand how
the model makes decisions.
● Ensure that the model is transparent and interpretable to medical professionals.

6. Deploying the model:


● Deploy the model in a secure and responsible manner.
● Develop a user-friendly interface for medical professionals to use the model.
● Regularly monitor and evaluate the model's performance in real-world scenarios.

7. Continuously improving the model:


● Collect feedback from medical professionals to improve the model's performance.
● Continuously update the model with new data and adjust the algorithm to improve its performance.
Fig. 1, The entire methodology in a flowchart
The above figure describes the entire methodology in a very detailed manner, starting from data
collection and mapping right until determining the accuracy, passing through steps like Data
Augmentation, Data Splitting. The figure also shows the entire concept of Convolutional Neural Network
(CNN) in detail in the bottom right corner. For more clarity, the zoomed in view of that part of the image
will be given below.

4. DESIGN AND IMPLEMENTATION

IMPORT OF REQUIRED LIBRARIES

READING OF THE REQUIRED DATASET

PLOTTING THE LABEL COUNTS


TRAINING THE MODEL

ADDING REQUIRED FEATURES

PLOTTING THE ROC AND ACCURACY CURVES


fig 4.4 DATASET OF X-RAYS

fig 4.5 Accuracy graphs


fig 4.6 ROC CURVE
5. RESULTS

fig 5.1 User Interface

fig 5.2 RESULTS


6. CONCLUSION AND FUTURE SCOPE

In conclusion, developing a responsible AI-based ML model for chest X-ray diagnosis of diseases has
immense potential to improve the accuracy and efficiency of healthcare systems. However, it is
important to address the challenges and ethical concerns associated with such models, such as bias,
transparency, privacy, and accountability. By implementing responsible AI principles, such as fairness,
explainability, and human oversight, we can ensure that these models are reliable, trustworthy, and
beneficial for all stakeholders involved, including patients, healthcare providers, and society as a whole.
Ultimately, responsible AI can be a powerful tool in improving healthcare outcomes, but only if it is
developed and deployed in a manner that is inclusive, ethical, and transparent.

As a result, there is a growing need for responsible AI-based medical diagnostic models, which prioritize
the ethical, moral, and legal considerations of data usage, to ensure the best possible outcomes for
patients.

However, the development of such models also poses several challenges, including the need for large
and diverse datasets, the potential for bias and discrimination, and the difficulty of explaining the
decisions made by the AI system. Addressing these challenges requires a multidisciplinary approach
involving experts from fields such as machine learning, medicine, ethics, and law.

Despite these challenges, the potential benefits of responsible AI-based medical diagnostic models are
immense. By improving the accuracy and efficiency of disease diagnosis, these models have the
potential to save lives, reduce healthcare costs, and improve patient outcomes. However, it is essential to
ensure that these models are developed and used responsibly, with a clear understanding of the ethical,
legal, and social implications of their use.
6. REFERENCES

1.Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, Ronald M.
Summers.ChestX-ray8: Hospital-scale Chest X-ray Database and Benchmarks on Weakly- Supervised
Classification and Localization of Common Thorax Diseases, IEEE CVPR, pp. 3462-3471,2017

2.Schiff, D. (2006). Principles to practices for responsible AI: closing the gap (2020). Preprint, arXiv.

3.Sharma, A., Rani, S., & Gupta, D. (2020). Artificial intelligence-based classification of chest X-ray
images into COVID-19 and other infectious diseases. International journal of biomedical imaging, 2020,
1-10.

4.Ahmed, S. B., Solis-Oba, R., & Ilie, L. (2022). Explainable-AI in Automated Medical Report Generation
Using Chest X-ray Images. Applied Sciences, 12(22), 11750.

5.Rajpurkar, P., Irvin, J., Zhu, K., Yang, B., Mehta, H., Duan, T., ... & Ng, A. Y. (2017). Chexnet:
Radiologist-level pneumonia detection on chest x-rays with deep learning. arXiv preprint
arXiv:1711.05225.

6.Wang, X., Peng, Y., Lu, L., Lu, Z., Bagheri, M., & Summers, R. M. (2017). Chestx-ray8: Hospital-scale
chest x-ray database and benchmarks on weakly-supervised classification and localization of common
thorax diseases. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp.
2097-2106)

7.Mporas, I., & Naronglerdrit, P. (2020, September). COVID-19 identification from chest X-Rays. In 2020
International conference on biomedical innovations and applications (BIA) (pp. 69-72). IEEE.

8.Phung, K. A., Nguyen, T. T., Wangad, N., Baraheem, S., Vo, N. D., & Nguyen, K. (2022). Disease
Recognition in X-ray Images with Doctor Consultation-Inspired Model. Journal of Imaging, 8(12), 323.

9.Arteaga-Arteaga, H. B., delaPava, M., Mora-Rubio, A., Bravo-Ortíz, M. A., Alzate-Grisales, J. A.,
Arias-Garzón, D., ... & Tabares-Soto, R. (2022). Machine learning approaches for covid-19 detection from
chest x-ray imaging: a systematic review. arXiv preprint arXiv:2206.05615.

10.Albahli, S., & Albattah, W. (2020). Detection of coronavirus disease from X-ray images using deep
learning and transfer learning algorithms. Journal of X-ray Science and Technology, 28(5), 841-850.

You might also like