Table of Contents
Fetching ...

Pediatric Pneumonia Detection from Chest X-Rays:A Comparative Study of Transfer Learning and Custom CNNs

Agniv Roy Choudhury

TL;DR

This paper addresses the need for accurate, scalable pneumonia screening in children using chest X-rays. It conducts a rigorous, head-to-head comparison between a custom CNN trained from scratch and three transfer-learning architectures (ResNet50, DenseNet121, EfficientNet-B0) across frozen and fine-tuned training regimes on a carefully split pediatric dataset. The study demonstrates that fine-tuned ResNet50 achieves near-perfect performance (accuracy $>99\%$) with strong clinical metrics and interpretable Grad-CAM visualizations, while frozen and baseline models underperform. The results support deploying transfer learning–based screening tools in resource-limited settings, highlight the importance of proper validation, and provide actionable insights into model explainability and training strategies for pediatric radiology applications.

Abstract

Pneumonia is a leading cause of mortality in children under five, with over 700,000 deaths annually. Accurate diagnosis from chest X-rays is limited by radiologist availability and variability. Objective: This study compares custom CNNs trained from scratch with transfer learning (ResNet50, DenseNet121, EfficientNet-B0) for pediatric pneumonia detection, evaluating frozen-backbone and fine-tuning regimes. Methods: A dataset of 5,216 pediatric chest X-rays was split 80/10/10 for training, validation, and testing. Seven models were trained and assessed using accuracy, F1-score, and AUC. Grad-CAM visualizations provided explainability. Results: Fine-tuned ResNet50 achieved the best performance: 99.43\% accuracy, 99.61\% F1-score, and 99.93\% AUC, with only 3 misclassifications. Fine-tuning outperformed frozen-backbone models by 5.5 percentage points on average. Grad-CAM confirmed clinically relevant lung regions guided predictions. Conclusions: Transfer learning with fine-tuning substantially outperforms CNNs trained from scratch for pediatric pneumonia detection, showing near-perfect accuracy. This system has strong potential as a screening tool in resource-limited settings. Future work should validate these findings on multi-center and adult datasets. Keywords: Pneumonia detection, deep learning, transfer learning, CNN, chest X-ray, pediatric diagnosis, ResNet, DenseNet, EfficientNet, Grad-CAM.

Pediatric Pneumonia Detection from Chest X-Rays:A Comparative Study of Transfer Learning and Custom CNNs

TL;DR

This paper addresses the need for accurate, scalable pneumonia screening in children using chest X-rays. It conducts a rigorous, head-to-head comparison between a custom CNN trained from scratch and three transfer-learning architectures (ResNet50, DenseNet121, EfficientNet-B0) across frozen and fine-tuned training regimes on a carefully split pediatric dataset. The study demonstrates that fine-tuned ResNet50 achieves near-perfect performance (accuracy ) with strong clinical metrics and interpretable Grad-CAM visualizations, while frozen and baseline models underperform. The results support deploying transfer learning–based screening tools in resource-limited settings, highlight the importance of proper validation, and provide actionable insights into model explainability and training strategies for pediatric radiology applications.

Abstract

Pneumonia is a leading cause of mortality in children under five, with over 700,000 deaths annually. Accurate diagnosis from chest X-rays is limited by radiologist availability and variability. Objective: This study compares custom CNNs trained from scratch with transfer learning (ResNet50, DenseNet121, EfficientNet-B0) for pediatric pneumonia detection, evaluating frozen-backbone and fine-tuning regimes. Methods: A dataset of 5,216 pediatric chest X-rays was split 80/10/10 for training, validation, and testing. Seven models were trained and assessed using accuracy, F1-score, and AUC. Grad-CAM visualizations provided explainability. Results: Fine-tuned ResNet50 achieved the best performance: 99.43\% accuracy, 99.61\% F1-score, and 99.93\% AUC, with only 3 misclassifications. Fine-tuning outperformed frozen-backbone models by 5.5 percentage points on average. Grad-CAM confirmed clinically relevant lung regions guided predictions. Conclusions: Transfer learning with fine-tuning substantially outperforms CNNs trained from scratch for pediatric pneumonia detection, showing near-perfect accuracy. This system has strong potential as a screening tool in resource-limited settings. Future work should validate these findings on multi-center and adult datasets. Keywords: Pneumonia detection, deep learning, transfer learning, CNN, chest X-ray, pediatric diagnosis, ResNet, DenseNet, EfficientNet, Grad-CAM.
Paper Structure (71 sections, 4 figures, 8 tables)

This paper contains 71 sections, 4 figures, 8 tables.

Figures (4)

  • Figure 1: Example chest X-ray images from the dataset. Left: Normal case showing clear lung fields. Right: Pneumonia case with visible lung opacities indicating infection.
  • Figure 2: Performance metrics comparison across all seven models. Transfer learning with fine-tuning (orange bars) consistently outperforms the baseline (blue bar) and frozen models across all metrics.
  • Figure 3: ROC curves comparison for all seven models, demonstrating the superior discriminative ability of fine-tuned models over frozen and baseline approaches.
  • Figure 4: Grad-CAM visualizations for ResNet50 (fine-tuned) showing model attention patterns. Left: True Positive case where the model correctly identifies pneumonia by focusing on lung infiltrates and opacities. Right: False Negative case where subtle infiltrates were missed, representing one of only 2 errors out of 388 pneumonia cases.