Multi-model Deep Learning for Pneumonia Detection: A Comprehensive Cross-Dataset Evaluation Using ResNet50, DenseNet121 and MobileNetV2
摘要
Around the globe, pneumonia is the leading cause of morbidity and mortality, especially in areas with poor access to medical expertise. This study proposes a robust deep learning framework for automated pneumonia detection using chest X-ray (CXR) images using three clinically diverse and publicly available Kaggle datasets. Three convolutional neural network models were developed and compared: a lightweight CNN based on MobileNetV2 trained on Paulo Breviglieri’s Imbalanced Pneumonia X-ray Images dataset; a ResNet50-based transfer learning model trained on Tolga’s Chest X-ray dataset; and a DenseNet121-based model trained on Paul Mooney’s Chest X-ray Images (Pneumonia) dataset. The highest test accuracy of 94.87% and a strong ROC AUC score of 0.99 were achieved by the ResNet50 model, which was followed by DenseNet121 at 86.38% and MobileNetV2 at 84.94%. All models underwent standardized preprocessing, including augmentation, normalization, and resizing. For interpretability, all models underwent Grad-CAM visualizations, which effectively emphasized the pneumonia-affected lung regions. These results demonstrate the deep learning models’ effectiveness and generalizability for classifying pneumonia as well as their potential as scalable, interpretable, and cost-effective diagnostic tools in clinical and resource-constrained settings.