Hybrid Approaches for Pneumonia Detection in X-rays: Combining CNNs and ML Classifiers
Gabriele S. Araújo, Omar Andres C. Cortes, Olaf Reinhold, Fabio M. F. Lobato
DOI: http://dx.doi.org/10.15439/2025F4310
Citation: Proceedings of the 20th Conference on Computer Science and Intelligence Systems (FedCSIS), M. Bolanowski, M. Ganzha, L. Maciaszek, M. Paprzycki, D. Ślęzak (eds). ACSIS, Vol. 43, pages 461–470 (2025)
Abstract. Pneumonia is a disease that impacts millions of people worldwide, and X-ray image detection is one of the primary diagnostic tools used. This study presents a hybrid diagnostic approach combining Convolutional Neural Networks (CNNs) with traditional classifiers, namely Random Forest (RF) and Support Vector Machine (SVM), to detect pneumonia from chest X-ray images. Features were extracted from MobileNetV2, VGG16, and EfficientNetB0 and used to train RF and SVM models with hyperparameter tuning via GridSearchCV. Ensemble models were also explored: (i) CNNs + RF, (ii) CNNs + SVM, and (iii) RF + SVM. Experiments were conducted using a public pediatric dataset (5.856 X-rays) with stratified k-fold cross-validation and data augmentation. CNNs + RF achieved the highest 0.977 AUC and 91.9\% accuracy, while individual models, VGG16, showed competitive performance (91.8\% accuracy, 0.969 AUC). Results were statistically validated and showed strong potential for clinical support, particularly in settings with limited resources. In future work, we propose extending the approach to multiclass classification and refining model optimization strategies.
References
- H. F. M. de Sousa, L. S. V. da Silva, and F. N. da Costa, “Efeitos das queimadas na saúde da população com foco para as doenças pulmonares,” Revista Ibero-Americana de Humanidades, Ciências e Educação, vol. 10, no. 5, pp. 3126–3150, 2024. https://dx.doi.org/10.51891/rease.v10i5.14016
- F. Caobelli, “Artificial intelligence in medical imaging: Game over for radiologists?” European journal of radiology, vol. 126, 2020. https://dx.doi.org/10.1016/j.ejrad.2020.108940
- G. Liebel, P. V. Dias, I. J. C. Schneider, A. R. d. Sá Junior, A. Hentz, C. d. S. Ferreira, and A. Chaoubah, “Analysis of expenses with diagnostic imaging in brazil,” Cadernos Saúde Coletiva, vol. 29, pp. 453–463, 2021. https://dx.doi.org/10.1590/1414-462X202129030397
- S. Sharma and K. Guleria, “A systematic literature review on deep learning approaches for pneumonia detection using chest x-ray images,” Multimedia Tools and Applications, vol. 83, no. 8, pp. 24 101–24 151, 2024. https://dx.doi.org/10.1007/s11042-023-16419-1
- W. Liawrungrueang, I. Han, W. Cholamjiak, P. Sarasombath, and K. D. Riew, “Artificial intelligence detection of cervical spine fractures using convolutional neural network models,” Neurospine, vol. 21, no. 3, p. 833, 2024. https://dx.doi.org/10.14245/ns.2448580.290
- M. Toğaçar, B. Ergen, Z. Cömert, and F. Özyurt, “A deep feature learning model for pneumonia detection applying a combination of mrmr feature selection and machine learning models,” Irbm, vol. 41, no. 4, pp. 212–222, 2020. https://dx.doi.org/10.1016/j.irbm.2019.10.006
- A. Mabrouk, R. P. Diaz Redondo, A. Dahou, M. Abd Elaziz, and M. Kayed, “Pneumonia detection on chest x-ray images using ensemble of deep convolutional neural networks,” Applied Sciences, vol. 12, no. 13, p. 6448, 2022. https://dx.doi.org/10.3390/app12136448
- A. Akgundogdu, “Detection of pneumonia in chest x-ray images by using 2d discrete wavelet feature extraction with random forest,” Inter-national Journal of Imaging Systems and Technology, vol. 31, no. 1, pp. 82–93, 2021. https://dx.doi.org/10.1002/ima.22501
- D. Varshni, K. Thakral, L. Agarwal, R. Nijhawan, and A. Mittal, “Pneumonia detection using cnn based feature extraction,” in 2019 IEEE international conference on electrical, computer and communication technologies (ICECCT). IEEE, 2019. https://dx.doi.org/10.1109/ICECCT.2019.8869364 pp. 1–7.
- F. G. da Silva, L. P. Ramos, B. G. Palm, and R. Machado, “Assessment of machine learning techniques for oil rig classification in c-band sar images,” Remote Sensing, vol. 14, no. 13, p. 2966, 2022. https://dx.doi.org/10.3390/rs14132966 5 https://github.com/GabrieleAraujo/pneumonia_detection_cnn-ml.git
- D. S. Kermany, M. Goldbaum, W. Cai, C. C. Valentim, H. Liang, S. L. Baxter, A. McKeown, G. Yang, X. Wu, F. Yan et al., “Identifying medical diagnoses and treatable diseases by image-based deep learning,” cell, vol. 172, no. 5, pp. 1122–1131, 2018. https://dx.doi.org/10.1016/j.cell.2018.02.010
- J. O. Diniz, D. A. Dias Jr, L. B. da Cruz, D. L. Gomes Jr, O. A. Cortês, and A. O. de Carvalho Filho, “Efficientensemble: Diagnóstico de câncer de mama em imagens de ultrassom utilizando processamento de imagens e ensemble de efficientnets,” in Simpósio Brasileiro de Computação Aplicada à Saúde (SBCAS). SBC, 2024. https://dx.doi.org/10.5753/sbcas.2024.2155
- O. M. El Zein, M. M. Soliman, A. Elkholy, and N. I. Ghali, “Transfer learning based model for pneumonia detection in chest x-ray images,” International Journal of Intelligent Engineering and Systems, vol. 14, no. 5, pp. 56–66, 2021. https://dx.doi.org/10.22266/ijies2021.1031.06
- C. Munzlinger, I. Yepes, and R. Rieder, “Uso de uma rede neural convolucional para análise de exames de radiografia de pulmao com detecçao de covid-19, pneumonia e tuberculose,” in Anais Estendidos do XXIII Simpósio Brasileiro de Computação Aplicada à Saúde. SBC, 2023. https://dx.doi.org/10.5753/sbcas_estendido.2023.229629 pp. 25–30.
- Y. Wu, N. Japkowicz, S. Gilbert, and R. Corizzo, “Attention-based medical knowledge injection in deep image classification models,” in 2024 International Joint Conference on Neural Networks (IJCNN). IEEE, 2024, pp. 1–8.
- J. Rocha, S. C. Pereira, J. Pedrosa, A. Campilho, and A. M. Mendonça, “Stern: Attention-driven spatial transformer network for abnormality detection in chest x-ray images,” Artificial Intelligence in Medicine, vol. 147, p. 102737, 2024.
- C. J. Ejiyi, Z. Qin, A. O. Nnani, F. Deng, T. U. Ejiyi, M. B. Ejiyi, V. K. Agbesi, and O. Bamisile, “Resfeanet: Resnet-fused external attention network for tuberculosis diagnosis using chest x-ray images,” Computer Methods and Programs in Biomedicine Update, vol. 5, p. 100133, 2024.
- M. Bartosiewicz, M. Iwanowski, M. Wiszniewska, K. Frączak, P. Leśnowolski, “On combining image features and word embeddings for image captioning,” in 2023 18th Conference on Computer Science and Intelligence Systems (FedCSIS). IEEE, 2023. https://dx.doi.org/10.15439/2023F997 pp. 355–365.
- C. Shorten and T. M. Khoshgoftaar, “A survey on image data augmentation for deep learning,” Journal of big data, vol. 6, no. 1, pp. 1–48, 2019.
- D. Kermany, “Labeled optical coherence tomography (oct) and chest x-ray images for classification,” Mendeley data, 2018. https://dx.doi.org/10.17632/rscb-jbr9sj.2
- O. O. Abayomi-Alli, R. Damaševičius, R. Maskeliūnas, and A. Abayomi-Alli, “Bilstm with data augmentation using interpolation methods to improve early detection of parkinson disease,” in 2020 15th conference on computer science and information systems (FedCSIS). IEEE, 2020. https://dx.doi.org/10.15439/2020F188 pp. 371–380.
- M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, “Mobilenetv2: Inverted residuals and linear bottlenecks,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018. https://dx.doi.org/10.1109/CVPR.2018.00474 pp. 4510–4520.
- M. Tan and Q. Le, “Efficientnet: Rethinking model scaling for convolutional neural networks,” in International conference on machine learning, 2019, pp. 6105–6114.
- O. Rainio, J. Teuho, and R. Klén, “Evaluation metrics and statistical tests for machine learning,” Scientific Reports, vol. 14, no. 1, p. 6086, 2024.
- W. H. Kruskal and W. A. Wallis, “Use of ranks in one-criterion variance analysis,” Journal of the American statistical Association, vol. 47, no. 260, pp. 583–621, 1952. https://dx.doi.org/10.1080/01621459.1952.10483441
- P. E. McKight and J. Najab, “Kruskal-wallis test,” The corsini encyclopedia of psychology, pp. 1–1, 2010. doi: 10.1002/9780470479216.corpsy0491
- E. Ostertagova, O. Ostertag, and J. Kováč, “Methodology and application of the kruskal-wallis test,” Applied mechanics and materials, vol. 611, pp. 115–120, 2014. https://dx.doi.org/10.4028/www.scientific.net/AMM.611.115
- O. J. Dunn, “Multiple comparisons using rank sums,” Technometrics, vol. 6, no. 3, pp. 241–252, 1964.
- M. A. Jamil and S. Khanam, “Influence of one-way anova and Kruskal-Wallis based feature ranking on the performance of ml classifiers for bearing fault diagnosis,” Journal of Vibration Engineering & Technologies, vol. 12, no. 3, pp. 3101–3132, 2024. https://dx.doi.org/10.1007/s42417-023-01036-x
- Y. Yang, H. Lv, and N. Chen, “A survey on ensemble learning under the era of deep learning,” Artificial Intelligence Review, vol. 56, no. 6, pp. 5545–5589, 2023.
- M. R. Munafò, B. A. Nosek, D. V. Bishop, K. S. Button, C. D. Chambers, N. Percie du Sert, U. Simonsohn, E.-J. Wagenmakers, J. J. Ware, and J. P. Ioannidis, “A manifesto for reproducible science,” Nature human behaviour, vol. 1, no. 1, p. 0021, 2017. https://dx.doi.org/10.1038/s41562-016-0021
- D. Donoho, “50 years of data science,” Journal of Computational and Graphical Statistics, vol. 26, no. 4, pp. 745–766, 2017. https://dx.doi.org/10.1080/10618600.2017.1384734