AI-Powered Multi-Disease Chest X-Ray Analysis And Explainable AI System Using Densenet121 and Grad-Cam
Author
Jatavath Asha, T. Malathi
Abstract
Chest X-ray imaging is widely used for examining abnormalities associated with the lungs and respiratory system. The increasing availability of medical image datasets has created opportunities for applying deep learning techniques to assist in the preliminary analysis of chest radiographs. However, classification of different chest conditions within a single system and interpretation of the resulting predictions remain important challenges.
This paper presents an AI-Powered Multi-Disease Chest X-Ray Analysis System for classifying chest X-ray images into four categories: COVID-19, Normal, Pneumonia, and Tuberculosis. The implemented system uses a DenseNet121-based transfer learning model for multi-class image classification. The dataset consists of approximately 7,135 chest X-ray images organized into training, validation, and testing sets. The input images are resized to 224 × 224 pixels before classification. The model produces class-wise probability values, and the class with the highest probability is presented as the predicted category.
To improve the interpretability of the model output, Gradient-weighted Class Activation Mapping (Grad-CAM) is integrated into the system. Grad-CAM uses gradient information associated with a target class to generate a visual heatmap highlighting image regions that contributed to the model's prediction. A basic image-validation mechanism is also included to reject obviously unsuitable inputs before the prediction process.
The trained DenseNet121 model achieved approximately 90.93% training accuracy and 84.21% validation accuracy after 10 epochs. The trained model was integrated into a Flask-based web application, allowing users to upload chest X-ray images and view the predicted class, model confidence, class-wise probabilities, original X-ray image, and corresponding Grad-CAM visualization. The implemented prototype demonstrates the feasibility of combining multi-class chest X-ray classification with explainable artificial intelligence within a single web-based system.
Keywords
Chest X-Ray Analysis, Multi-Disease Classification, Deep Learning, DenseNet121, Transfer Learning, Explainable AI, Grad-CAM, COVID-19, Pneumonia, Tuberculosis, Flask
Full Text:
Download Paper PDF
References
Wang, L., Lin, Z. Q., & Wong, A. (2020). COVID-Net: A tailored deep convolutional neural network design for detection of COVID-19 cases from chest X-ray images. Scientific Reports, 10, 19549. https://doi.org/10.1038/s41598-020-76550-z
Hemdan, E. E.-D., Shouman, M. A., & Karar, M. E. (2020). COVIDX-Net: A framework of deep learning classifiers to diagnose COVID-19 in X-ray images. arXiv preprint arXiv:2003.11055.
Huang, G., Liu, Z., Van Der Maaten, L., & Weinberger, K. Q. (2017). Densely connected convolutional networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 4700–4708.
Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., & Batra, D. (2017). Grad-CAM: Visual explanations from deep networks via gradient-based localization. Proceedings of the IEEE International Conference on Computer Vision (ICCV), 618–626. https://doi.org/10.1109/ICCV.2017.74
Bhandari, M., Shahi, T. B., Siku, B., & Neupane, A. (2022). Explanatory classification of CXR images into COVID-19, Pneumonia and Tuberculosis using deep learning and XAI. Computers in Biology and Medicine, 150, 106156.
https://doi.org/10.1016/j.compbiomed.2022.106156
Yao, J., Wang, X., Li, S., et al. (2022). Deep transfer learning for the multilabel classification of chest X-ray images. Diagnostics, 12(6), 1457. https://doi.org/10.3390/diagnostics12061457
Rajpurkar, P., Irvin, J., Zhu, K., Yang, B., Mehta, H., Duan, T., et al. (2017). CheXNet: Radiologist-level pneumonia detection on chest X-rays with deep learning. arXiv preprint arXiv:1711.05225.
Kermany, D. S., Goldbaum, M., Cai, W., Valentim, C. C. S., Liang, H., Baxter, S. L., et al. (2018). Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, 172(5), 1122–1131.e9.
Irvin, J., Rajpurkar, P., Ko, M., Yu, Y., Ciurea-Ilcus, S., Chute, C., et al. (2019). CheXpert: A large chest radiograph dataset with uncertainty labels and expert comparison. Proceedings of the AAAI Conference on Artificial Intelligence, 33(1), 590–597.
Share your valuable work from Social Media Buttons