Comparative Evaluation of CNN Models for Pneumonia Detection: Addressing Data Imbalance and Enhancing Diagnostic Accuracy
Pneumonia is the leading cause of disease and death worldwide, and chest X-ray (RHG) is often the most accessible diagnostic tool. However, manual interpretation is time-consuming and variable, especially in resource-limited settings. Deep convolutional neural networks (CNNs) with transfer learning can support automated selection, but performance may decrease due to class imbalances and dataset-specific artifacts. This study compares three pre-trained CNNs— VGG16, ResNet50, and DenseNet121 - using the publicly available Kaggle pneumonia CXR dataset. The images were resized to 224 × 224 pixels, normalized and augmented using safe transformations (horizontal shifts, small rotations). Cross-entropy, weighted by classes, eliminated the imbalance, and the models were refined using frozen early layers. The effectiveness was evaluated using accuracy, F1 score, sensitivity, AUC ROC, and Grad-CAM to ensure interpretability. DenseNet121 achieved the best balance of sensitivity and specificity through anatomically consistent Grad-CAM imaging. Class weighting reduced the number of false negative results while maintaining clinical sensitivity. The resulting prototype based on DenseNet121 (Streamlit + Grad-CAM) demonstrates the promise of automated pneumonia screening in training and preclinical support, especially in resource-limited settings.
Authors
- А. А. Seitova
- Kamilla Mukhtarova (ORCID: https://orcid.org/0000-0003-4665-7406)
- Dariga Mussa
- Aizada Yezhibayeva
- Ali Beisen
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-12-27
- DOI
- https://doi.org/10.5281/zenodo.18067326
- Primary Topic
- COVID-19 diagnosis using AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00