Pneumonia remains a leading cause of mortality globally, necessitating early and accurate diagnosis to improve patient outcomes. This study presents a comparative evaluation of three deep learning models—Custom Convolutional Neural Network (CNN), ResNet50, and EfficientNet-B0—for automated pneumonia detection using chest X-ray images. The analysis is conducted on the publicly available Kaggle Chest X-ray Pneumonia dataset, comprising 5,863 pediatric images, preprocessed and augmented to enhance model generalization.
Each model was assessed based on classification accuracy, AUC-ROC scores, training time, and diagnostic sensitivity. The custom CNN was designed and trained from scratch, while ResNet50 and EfficientNet-B0 utilized transfer learning with pre-trained ImageNet weights and customized classification heads. Experiments were executed in a PyTorch environment with GPU acceleration and early stopping to prevent overfitting.
Among the three, ResNet50 demonstrated superior performance with 85.42% accuracy and an AUC of 0.946, achieving the best trade-off between diagnostic precision and computational efficiency (10.2 minutes training time). EfficientNet-B0 achieved moderate accuracy (78.21%) and AUC (0.891) but required longer training time. The custom CNN, while competitive in training speed (12.4 minutes), achieved lower accuracy (71.15%) and was more prone to overfitting.
These results confirm the advantage of transfer learning in medical imaging, particularly for limited datasets. ResNet50 emerges as a robust candidate for clinical screening applications in resource-constrained settings. Future work should focus on domain-specific fine-tuning, multiclass classification, and external validation across diverse populations and imaging protocols.
