Fine-Tuned EfficientNetB0 for Pneumonia Detection from Chest X-Rays: Independent Evaluation and Grad-CAM-Based Explainability

Pneumonia remains one of the most common causes of hospitalization and a leading respiratory illness worldwide. Chest X-rays (CXR) are widely used to diagnose pneumonia, but their interpretation can vary from one doctor to another. This paper presents a fine-tuned EfficientNetB0 convolutional neural network for binary classification of pediatric chest radiographs into two categories: Normal and Pneumonia. Using the publicly available Kaggle Chest X-Ray Pneumonia dataset, a frozen-backbone transfer-learning baseline was first trained and then compared against another EfficientNetB0 model where the upper layers were fine-tuned using a low learning rate while the batch-normalization settings were kept unchanged. The frozen baseline collapsed to majority-class prediction, whereas fine-tuning produced strong, balanced validation performance (ROC-AUC 0.9923). On a fully independent, untouched test set of 624 images, the final model achieved 87.98% accuracy, 95.90% ROC-AUC, 97.44% sensitivity, 72.22% specificity and 91.02% F1-score at a decision threshold of 0.50. Threshold sensitivity analysis, per-class error analysis and Gradient-weighted Class Activation Mapping (Grad-CAM) visualizations for true-positive, true-negative, false-positive and false-negative cases are reported to assess whether the model attends to clinically plausible lung regions. Grad-CAM analysis provides additional visual insight into the image regions influencing model predictions and supports the interpretability of the classification results.