Comparative Analysis of Image Augmentation and Class Weighting on ResNet50-CBAM for Pneumonia Detection from Chest X-Ray Images
Downloads
Pneumonia remains one of the leading causes of morbidity and mortality worldwide, particularly among children, older adults, and immunocompromised individuals. Although chest X-ray (CXR) imaging is widely used for pneumonia diagnosis, manual interpretation is time-consuming, subjective, and highly dependent on radiologist expertise. Deep learning has shown promising performance for automated pneumonia classification; however, class imbalance remains a major challenge that can lead to biased predictions and reduced model generalization. Therefore, this study investigates the effectiveness of image augmentation and class weighting for handling class imbalance in pneumonia classification using chest X-ray images. The main contribution of this study is a systematic comparison of four experimental scenarios: Baseline, Augmentation Only, Class Weighting Only, and Hybrid (Image Augmentation and Class Weighting) implemented on a ResNet50 architecture integrated with the Convolutional Block Attention Module (CBAM). Experiments were conducted using the publicly available Chest X-Ray Images (Pneumonia) dataset from Kaggle, comprising 1,583 Normal and 4,273 Pneumonia images. Model performance was evaluated using Accuracy, ROC-AUC, Precision, Recall, F1-Score, confusion matrix analysis, and Youden’s J-Statistic for threshold optimization. The Hybrid model achieved the best overall performance, with an Accuracy of 95.74%, a ROC-AUC of 98.83%, a Macro Precision of 96.01%, a Macro Recall of 93.13%, and a Macro F1-Score of 94.44%. Moreover, the number of false negative predictions decreased from 25 in the Baseline model to 5 in the Hybrid model. These findings demonstrate that integrating image augmentation and class weighting within the ResNet50-CBAM framework effectively mitigates class imbalance and improves the reliability of automated pneumonia classification.
Copyright (c) 2026 Kafilah Akhmad Fatahillah, Triando Hamonangan Saragih, Dwi Kartini, Fatma Indriani, Irwan Budiman (Author)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).






