<link rel="stylesheet" href="styles.f3b1fba60ec7970c.css">

Multi-class Lung Disease Diagnosis Using Chest X-Ray with XAI

dc.contributor.authorS.M. Asif Maharab
dc.contributor.authorRifat Mahmud
dc.contributor.authorTamanna Akter
dc.contributor.authorSoyab Ansari
dc.date.accessioned2026-08-11T10:56:55Z
dc.date.issued2026
dc.description.abstractLung diseases — encompassing bacterial pneumonia, viral pneumonia, COVID-19, tuberculosis, and healthy (normal) conditions —represent a critical global health burden responsible for millions of deaths each year. Accurate, timely, and interpretable diagnosis from chest X-ray images is therefore of paramount clinical importance, yet remains challenging even for experienced radiologists due to overlapping visual presentations among disease classes. This capstone project presents LungAI, an Explainable Multi-Class Deep Learning framework for automated diagnosis of five lung conditions from frontal chest X-ray images. The system is built upon DenseNet201, a 201-layer densely connected convolutional network pre-trained on ImageNet, augmented with a custom three-layer classification head consisting of Dense(1024)-BatchNorm-Dropout(0.5), Dense(512)-BatchNorm-Dropout(0.3), and Dense(256)-Dropout(0.2) layers, culminating in a five-class softmax output. A twophase transfer-learning strategy was adopted: Phase 1 trains only the custom head with all backbone layers frozen (LR = 1 × 10-3, 25 epochs), after which Phase 2 unfreezes the last 100 backbone layers and applies cosine-annealed fine-tuning (LR =1 ×10-5, up to 50 epochs). The training dataset comprises 39,115 images drawn from NIH, RSNA, Kaggle, and Montgomery TB repositories, preprocessed with CLAHE (Contrast-Limited Adaptive Histogram Equalization) contrast enhancement in LAB colour space to accentuate diagnostically relevant tissue-density variations. Class imbalance is mitigated through effective-number class weighting (ß = 0.9999) and a 1.5× boost for Bacterial Pneumonia, combined with oversampling to equalise training-batch frequencies. On the independent test set of 3,903 images the model achieves a test accuracy of 90.93 %, macro F1-score of 90.30 %, Cohen’s Kappa of 0.8538, and Matthews Correlation Coefficient (MCC) of 0.8551. Notable per-class results include a perfect 100 % recall for Tuberculosis, 95 % recall for COVID-19, and an area under the ROC curve (AUC) of 1.000 for Tuberculosis and 0.999 for Viral Pneumonia. Explainability is addressed through three complementary techniques —Grad-CAM, SHAP, and LIME —each of which produces clinically meaningful attention maps that localise discriminative radiological features such as bilateral ix ground-glass opacities in COVID-19, upper-lobe cavitary patterns in Tuberculosis, and lobar consolidation in Bacterial Pneumonia. The trained model is deployed as a Flask web application accessible via ngrok, enabling clinicians to upload a chest X-ray and receive an instant diagnosis together with Grad-CAM and LIME visualisations. The results demonstrate that combining rigorous data engineering, two-phase transfer learning, effective class-balance handling, and multi-method explainability yields a diagnostic system that is both highly accurate and interpretable — properties essential for trustworthy clinical decision support.
dc.identifier.urihttps://repository.ulab.edu.bd/handle/123456789/1102
dc.language.isoen
dc.publisherDepartment of Computer Science and Engineering-CSE
dc.subjectlung disease diagnosis
dc.subjectDenseNet201
dc.subjecttransfer learning
dc.subjectCLAHE
dc.subjectGradCAM
dc.subjectSHAP
dc.subjectLIME
dc.subjectexplainable AI
dc.subjectchest X-ray
dc.subjectmulti-class classification
dc.subjectdeep learning.
dc.titleMulti-class Lung Disease Diagnosis Using Chest X-Ray with XAI
dc.typeProject Report

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
2026, Spring, ID- 221014013, 221014046, 221014062, 231014011, S.M. Asif Maharab, Rifat Mahmud, Tamanna Akter, Soyab Ansari.pdf
Size:
5.84 MB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
1.71 KB
Format:
Item-specific license agreed to upon submission
Description:

Collections