International Journal of Advances in Intelligent Informatics
Vol 12, No 2 (2026): May 2026

MobileNet-driven detection of bacterial and viral pneumonia with Grad-CAM heatmap insights

Yuri Pamungkas (Institut Teknologi Sepuluh Nopember)
Adrian Jaleco Forca (Guimaras State University)
Muhammad Nur Afnan Uda (Universiti Malaysia Sabah)
Uda Hashim (Universiti Malaysia Sabah)



Article Info

Publish Date
31 May 2026

Abstract

Pneumonia is a major cause of childhood illness and death, and chest X-rays remain the most accessible diagnostic tool. Differentiating bacterial from viral pneumonia, however, is difficult because of overlapping radiographic patterns. This study explores MobileNet architectures combined with Grad-CAM visualization to provide efficient and interpretable pneumonia classification. The main contribution of this research is to demonstrate that MobileNet combined with Grad-CAM not only produces accurate predictions but also highlights radiologically meaningful regions of the lungs, thereby improving transparency and trust in automated diagnosis. A dataset of 5,842 pediatric chest X-rays from Guangzhou Women and Children’s Medical Center was used, including bacterial, viral, and normal cases. MobileNet and MobileNetV2 were trained with stochastic gradient descent, categorical cross-entropy, 20 epochs, and batch size of 32, and validated through 10-fold cross-validation. Grad-CAM was applied to generate heatmaps for model interpretability. Results indicated that MobileNet outperformed MobileNetV2. MobileNet achieved 79.32% accuracy, 81.02% precision, 78.15% recall, 77.82% F1-score, and 89.49% specificity. Its AUC-ROC reached 94.64% (macro) and 90.52% (micro). MobileNetV2 obtained 76.44% accuracy, 74.45% F1-score, and 93.61% macro AUC-ROC. Grad-CAM confirmed that both models attended to pneumonia-related lung regions, with MobileNet producing sharper localized activations and MobileNetV2 showing broader patterns. In conclusion, MobileNet with Grad-CAM provides an accurate, efficient, and interpretable framework for pneumonia detection, making it suitable for deployment in resource-limited clinical settings.

Copyrights © 2026






Journal Info

Abbrev

IJAIN

Publisher

Subject

Computer Science & IT

Description

International journal of advances in intelligent informatics (IJAIN) e-ISSN: 2442-6571 is a peer reviewed open-access journal published three times a year in English-language, provides scientists and engineers throughout the world for the exchange and dissemination of theoretical and ...