An intelligent screening model for pneumonia in chest x-ray images based on residual networks and transfer learning
Abstract
Pneumonia screening from chest X-ray (CXR) images is clinically important but often suffers from limited data and class imbalance in public benchmarks. This work develops a transfer-learning-based binary classifier using ResNet50 pretrained on ImageNet. Images are resized to 224×224 and normalized to [0,1]. Online augmentation (rotation, zoom, and shifts) is applied during training. To mitigate imbalance, class weights computed from the training labels are used in the loss. We fine-tune the network by freezing the early layers and updating higher-level layers with a small learning rate (Adam, 1e- 4) and early stopping. On the held-out test set (624 images), the model achieves about 0.88 accuracy. For the pneumonia class, precision, recall, and F1-score reach approximately 0.93, 0.88, and 0.90, respectively. The results indicate that combining class-weighted training with fine-tuned ResNet50 provides a practical baseline for automated pneumonia screening on CXR images.