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

Abstract: Lung diseases including pneumonia, tuberculosis, COVID-19 and chronic obstructive pulmonary disease remain leading causes of global deaths. This paper presents an explainable multi-class deep learning framework that classifies five lung condition- Bacterial Pneumonia, COVID-19, Normal, Tuberculosis and Viral Pneumonia from chet X-ray images with an explainable AI. The proposed system employs DenseNet201 with transfer learning, CLAHE contrast enhancement and comprehensive data augmentation. To address explainable AI we integrate Grad-CAM and LIME visualizations that highlight disease-specific anatomical regions, thereby providing clinical interpretability. Evaluated on a balanced dataset of 10095 images, the model achieves an overall accuracy of 87.41% with macro-averaged F1-score of 87.19%. Tuberculosis and COVID-19 achieves near perfect F1-scores of 98.8% and 98% respectively, while normal class achieves 98.5% Recall score confirming reliable screening capability. The system demonstrates that combining robust deep learning with explainable AI can build trust and facilitate real world clinical adoption, particularly in resource limited areas.