Automated Pneumonia Diagnosis from Chest Radiographs Using Deep Learning

Authors

  • Vijay Kumar
  • Pooja Koshti
  • Shubham Dwivedi
  • Shailendra Singh Tomer

Keywords:

Chest X-ray, Computer-driven assessment, Convolutional neural network, Deep learning, DenseNet121, Pneumonia diagnosis, Transfer learning

Abstract

Despite its decline as a cause of death, pneumonia has persisted as a significant cause of morbidity from lower respiratory infections and still puts a strain on the diagnostic capacity of clinical practices, particularly in low-resource countries, where radiology expertise is scarce or is suffering from backlogs in services. Chest radiography is used as first-line screening as it is low cost, readily available and quicker than more advanced imaging modalities. In this study, a reproducible DenseNet121 Transfer-learning framework for automatic binary pneumonia detection from Chest Radiographs is introduced. Assessing with a threshold, dropout regularization, binary cross-entropy optimization, class-aware data augmentation, normalizing, resizing to 224 x 224 pixels, and input validation. The testing was performed on the Kermany Chest X-Ray Images (Pneumonia) dataset, for which a split of 5,216 train images, 16 validation images, and 624 test images was explicitly mentioned. In this study, the proposed DenseNet121 pipeline was compared with the two baseline models of CNN and Mobile Net, and the DenseNet121 pipeline achieved the highest accuracy (95.8%), precision (95.1%), recall (97.0%), F1-score (96.0%) and AUROC (98.1%). The model can be used as a triage supporting tool for deciding the priority of suspected pneumonia cases, but not as a substitute for radiologist interpretation. The results show that when applied in the context of resource-limited diagnostic workflows, transfer learning can serve as a useful and inexpensive screening baseline, in addition to which external validation and prospective clinical testing are required. In this step-by-step guide, we will use a DenseNet121 CNN model trained on ImageNet data to detect pneumonia from chest X-rays on a custom dataset. In this step-by-step guide, we'll transfer a DenseNet121 CNN model trained on ImageNet data to detect pneumonia from chest X-rays on a custom dataset.

References

M. F. Hashmi, S. Katiyar, A. G. Keskar, N. D. Bokde, and Z. W. Geem, “Efficient Pneumonia detection in chest Xray images using deep transfer learning,” Diagnostics, vol. 10, no. 6, Jun. 2020.

R. Siddiqi and S. Javaid, “Deep learning for Pneumonia detection in chest X-ray images: A comprehensive survey,” Journal of Imaging, vol. 10, no. 8, Jul. 2024.

I. D. Apostolopoulos and T. A. Mpesiana, “Covid-19: automatic detection from X-ray images utilizing transfer learning with convolutional neural networks,” Physical and Engineering Sciences in Medicine, vol. 43, pp. 635–640, Apr. 2020.

R. Kundu, R. Das, Z. W. Geem, G.-T. Han, and R. Sarkar, “Pneumonia detection in chest x-ray images using an ensemble of deep learning models,” PLoS ONE, vol. 16, no. 9, 2021.

A. Goyal, Y. Dash, S. C. Sarangi, and A. Abraham, “Automated Pneumonia diagnosis from chest x-rays using deep learning models,” Proceedings of the 15th International Conference on Soft Computing and Pattern Recognition, 2025, pp. 589–598.

A. Ahmed, A. I. Siam, A. E. M. Atwa, M. A. Atwa, E. Md. Abdelrahim, and E.-S. Atlam, “An explainable YOLO-based deep learning framework for Pneumonia detection from chest x-ray images,” Algorithms, vol. 18, no. 11, Nov. 2025.

K. El Asnaoui and Y. Chawki, “Using X-ray images and deep learning for automated detection of coronavirus disease,” Journal of Biomolecular Structure and Dynamics, vol. 39, no. 10, pp. 3615–3626, May 2020.

R. Vyas and R. K. Pandey, “Deep learning for pneumonia detection from X-ray: A systematic review of models, datasets, and clinical translation challenges,” Biomedical Signal Processing and Control, vol. 115, Apr. 2026.

G. Huang, Z. Liu, L. Van Der Maaten and K. Q. Weinberger, “Densely connected convolutional networks,” 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017, pp. 2261–2269.

D. S. Kermany et al., “Identifying medical diagnoses and treatable diseases by image-based deep learning,” Cell, vol. 172, no. 5, pp. 1122–1131, Feb. 2018.

Google, “Google Colaboratory.”

H. Aljuaid, H. Adlan, B. Alkebsi, B. S. Alfurhood, A. Liotta and L. Cavallaro, “An experimental comparison of deep learning models for chest X-ray analysis,” Biomedical Signal Processing and Control, vol. 112, Feb. 2026.

H. Slimi, A. Balti, S. Abid and M. Sayadi, “Trustworthy pneumonia detection in chest X-ray imaging through attention-guided deep learning,” Scientific Reports, vol. 15, Nov. 2025.

R. Yulvina et al., “Hybrid vision transformer and convolutional neural network for multi-class and multi-label classification of Tuberculosis anomalies on chest x-ray,” Computers, vol. 13, no. 12, Dec. 2024.

C.-T. Yen and C.-Y. Tsao, “Lightweight convolutional neural network for chest X-ray images classification,” Scientific Reports, vol. 14, Nov. 2024.

A. T. Sahlol, D. Yousri, A. A. Ewees, M. A. A. Al-qaness, R. Damasevicius, and M. A. Elaziz, “COVID-19 image classification using deep features and fractional-order marine predators algorithm,” Scientific Reports, vol. 10, Sep. 2020.

M. Suguna, S. V. Jose, C. U. O. Kumar, T. Gunasekaran and D. Prakash, “Efficient Net V2-based Pneumonia detection: A comparative study with transfer learning models,” in Medical Analytics for Clinical and Healthcare Applications, K. Kalita, D. Zindani, N. Ganesh, and X.-Z. Gao, Eds. Boca Raton, FL, USA: CRC Press, 2025, ch. 4.

K. Almezhghwi, S. Serte and F. Al-Turjman, “Convolutional neural networks for the classification of chest X-rays in the IoT era,” Multimedia Tools and Applications, vol. 80, pp. 29051–29065, Jun. 2021.

C. C. Ukwuoma et al., “A hybrid explainable ensemble transformer encoder for pneumonia identification from chest X-ray images,” Journal of Advanced Research, vol. 48, pp. 191–211, Jun. 2022.

F. Alshanketi et al., “Pneumonia detection from chest x-ray images using deep learning and transfer learning for imbalanced datasets,” Journal of Imaging Informatics in Medicine, vol. 38, pp. 2021–2024, Nov. 2024.

Y. Xie, B. Zhu, Y. Jiang, B. Zhao, and H. Yu, “Diagnosis of pneumonia from chest X-ray images using YOLO deep learning,” Frontiers in Neurorobotics, vol. 19, Apr. 2025.

Published

2026-06-24

How to Cite

Vijay Kumar, Pooja Koshti, Shubham Dwivedi, & Shailendra Singh Tomer. (2026). Automated Pneumonia Diagnosis from Chest Radiographs Using Deep Learning. Journal of Innovations in Data Science and Big Data Management, 31–39. Retrieved from https://matjournals.net/engineering/index.php/JIDSBDM/article/view/3762