Lightweight weighted average ensemble model for pneumonia detection in chest X-ray images

  • Suresh Babu Nettur Independent Researcher, Virginia Beach, VA 23456, USA
  • Shanthi Karpurapu Independent Researcher, Virginia Beach, VA 23456, USA
  • Unnati Nettur Department of Computer Science, Virginia Tech, Blacksburg, VA 24061, USA
  • Likhit Sagar Gajja Department of Computer Science, BML Munjal University, Haryana 122413, India
  • Sravanthy Myneni Independent Researcher, Virginia Beach, VA 23456, USA
  • Akhil Dusi Department of Information Systems, Indiana Tech, IN 46803, USA
  • Lalithya Posham School of International Education, Nanjing Medical University, Nanjing 210029, China
Article ID: 3104
Keywords: Kermany dataset; transfer learning; lightweight; compact; NASNetMobile; MobileNetV2; feature fusion; weighted average ensemble model

Abstract

Pneumonia is a leading cause of illness and death in children, underscoring the need for early and accurate detection. In this study, we propose a novel lightweight ensemble model for detecting pneumonia in children using chest X-ray images. Our main contribution lies in the development of a novel, particularly weighted average ensemble model that combines two lightweight pre-trained convolutional neural networks (CNNs), MobileNetV2 and NASNetMobile, an ensemble combination that has not been previously explored in the field of deep learning for image classification tasks. These models were selected for their balance of computational efficiency and accuracy, fine-tuned on a pediatric chest X-ray dataset, and combined to enhance classification performance. The proposed ensemble model achieved a classification accuracy of 98.63%, significantly outperforming individual models such as MobileNetV2 (97.10%) and NASNetMobile (96.25%) in terms of accuracy, precision, recall, and F1 score. Moreover, the ensemble model outperformed state-of-the-art architectures, including ResNet50, InceptionV3, and DenseNet201, while maintaining computational efficiency. The proposed lightweight weighted average ensemble model presents a highly effective and resource-efficient solution for pneumonia detection, making it particularly suitable for deployment in resource-constrained settings.

Published
2025-06-12
How to Cite
Nettur, S. B., Karpurapu, S., Nettur, U., Gajja, L. S., Myneni, S., Dusi, A., & Posham, L. (2025). Lightweight weighted average ensemble model for pneumonia detection in chest X-ray images. Computing and Artificial Intelligence, 3(2), 3104. https://doi.org/10.59400/cai3104
Section
Article

References

[1]Available online: https://www.who.int/news-room/fact-sheets/detail/pneumonia (accessed on 20 January 2025).

[2]Available online: https://www.who.int/news-room/fact-sheets/detail/household-air-pollution-and-health (accessed on 20 January 2025).

[3]Narasimhan V, Brown H, Pablos-Mendez A, et al. Responding to the global human resources crisis. The Lancet. 2004; 363(9419): 1469–1472. doi: 10.1016/s0140-6736(04)16108-4

[4]Naicker S, Plange-Rhule J, Tutt RC, Eastwood JB. Shortage of healthcare workers in developing countries. Africa, Ethnicity & Disease. 2009; 19: 60.

[5]Wang X, Peng Y, Lu L, et al. Summers Chestx-ray8: hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; 2017. pp. 2097-2106.

[6]Haloi M, Rajalakshmi KR, Walia P. Towards Radiologist-Level Accurate Deep Learning System for Pulmonary Screening. arXiv. 2018; arXiv:1807.03120.

[7]Al-masni MA, Al-antari MA, Park JM, et al. Simultaneous detection and classification of breast masses in digital mammograms via a deep learning YOLO-based CAD system Comput Methods Programs Biomed. 2018; 157: 85-94.

[8]LeCun Y, Bengio Y. Convolutional networks for images, speech, and time series Handb. Brain Theory Neural Netw. 1995; 3361.

[9]Wenderott K, Krups J, Zaruchas F, et al. Effects of artificial intelligence implementation on efficiency in medical imaging—a systematic literature review and meta-analysis. npj Digital Medicine. 2024; 7(1). doi: 10.1038/s41746-024-01248-9

[10]Karpurapu S, Myneni S, Nettur U, et al. Comprehensive Evaluation and Insights Into the Use of Large Language Models in the Automation of Behavior-Driven Development Acceptance Test Formulation. IEEE Access. 2024; 12: 58715-58721. doi: 10.1109/access.2024.3391815

[11]Nettur SB, Karpurapu S, Nettur U, et al. Cypress Copilot: Development of an AI Assistant for Boosting Productivity and Transforming Web Application Testing. IEEE Access. 2025; 13: 3215-3229. doi: 10.1109/access.2024.3521407

[12]Nettur SB, Karpurapu S, Nettur U, et al. A Hybrid Deep Learning CNN Model for Enhanced COVID-19 Detection from Computed Tomography (CT) Scan Images. ArXiv. 2025.

[13]Nettur SB, Karpurapu S, Nettur U, et al. UltraLightSqueezeNet: A Deep Learning Architecture for Malaria Classification with up to 54x fewer trainable parameters for resource constrained devices. IEEE Access. 2025; 1-1. doi: 10.1109/access.2025.3571696

[14]Available online: https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia (accessed on 23 January 2025).

[15]Kermany DS, Goldbaum M, Cai W, et al. Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning. Cell. 2018; 172(5): 1122-1131.e9. doi: 10.1016/j.cell.2018.02.010

[16]Ayan E, Unver HM. Diagnosis of Pneumonia from Chest X-Ray Images Using Deep Learning. In: Proceedings of the 2019 Scientific Meeting on Electrical-Electronics & Biomedical Engineering and Computer Science (EBBT). pp. 1-5. doi: 10.1109/ebbt.2019.8741582

[17]Thakur S, Goplani Y, Arora S, et al. Chest X-Ray Images Based Automated Detection of Pneumonia Using Transfer Learning and CNN. In: Proceedings of International Conference on Artificial Intelligence and Applications. Advances in Intelligent Systems and Computing; 2021. doi: 10.1007/978-981-15-4992-2_31

[18]Jain R, Nagrath P, Kataria G, et al. Pneumonia detection in chest X-ray images using convolutional neural networks and transfer learning. Measurement. 2020; 165: 108046. doi: 10.1016/j.measurement.2020.108046

[19]Chhikara P, Singh P, Gupta P, Bhatia T. Deep Convolutional Neural Network with Transfer Learning for Detecting Pneumonia on Chest X-Rays. In: Advances in Bioinformatics, Multimedia, and Electronics Circuits and Signals. Advances in Intelligent Systems and Computing. Springer, Singapore.

[20]Yee SLK, Raymond WJK. Pneumonia Diagnosis Using Chest X-ray Images and Machine Learning. In: Proceedings of the 2020 10th International Conference on Biomedical Engineering and Technology. pp. 101-105. doi: 10.1145/3397391.3397412

[21]El Asnaoui K, Chawki Y, Idri A. Automated Methods for Detection and Classification Pneumonia Based on X-Ray Images Using Deep Learning. In: Artificial Intelligence and Blockchain for Future Cybersecurity Applications. Studies in Big Data, Springer, Cham; 2021. doi: 10.1007/978-3-030-74575-2_14

[22]Knok Ž, Pap K, Hrnčić M. Implementation of intelligent model for pneumonia detection. Tehnički glasnik. 2019; 13(4): 315-322. doi: 10.31803/tg-20191023102807

[23]Liang G, Zheng L. A transfer learning method with deep residual network for pediatric pneumonia diagnosis. Computer Methods and Programs in Biomedicine. 2020; 187: 104964. doi: 10.1016/j.cmpb.2019.06.023

[24]Stephen O, Sain M, Maduh UJ, et al. An Efficient Deep Learning Approach to Pneumonia Classification in Healthcare. Journal of Healthcare Engineering. 2019; 2019: 1-7. doi: 10.1155/2019/4180949

[25]Siddiqi R. Automated Pneumonia Diagnosis using a Customized Sequential Convolutional Neural Network. In: Proceedings of the 2019 3rd International Conference on Deep Learning Technologies (ICDLT ‘19). pp. 64–70.

[26]Omar HS, Babalık A. Detection of pneumonia from X-ray images using convolutional neural network. Available online: https://www.researchgate.net/profile/Ozge-Doguc-2/publication/344164531_Using_Dimensionality_Reduction_Techniques_to_Determine_Student_Success_Factors/links/5f577c4b92851c250b9d53c1/Using-Dimensionality-Reduction-Techniques-to-Determine-Student-Success-Factors.pdf#page=186 (accessed on 14 April 2024).

[27]Wu H, Xie P, Zhang H, et al. Predict pneumonia with chest X-ray images based on convolutional deep neural learning networks. Journal of Intelligent & Fuzzy Systems. 2020; 39(3): 2893-2907. doi: 10.3233/jifs-191438

[28]Rajaraman S, Candemir S, Thoma G, Antani S. Visualizing and explaining deep learning predictions for pneumonia detection in pediatric chest radiographs. In: Proceedings of the SPIE. doi: 10.1117/12.2512752

[29]Aich S, Kim HC, Chakraborty S, et al. Detection of Pneumonia from Chest X-Rays using a Convolutional Neural Network Architecture. Available online: http://www.dbpia.co.kr/journal/articleDetail?nodeId=NODE08747418 (accessed on 23 January 2025).

[30]Hasan MdR, Ullah SMA, Karim MdE. An Effective Framework for Identifying Pneumonia in Healthcare Using a Convolutional Neural Network. In: Proceedings of the 2023 International Conference on Electrical, Computer and Communication Engineering (ECCE). pp. 1-6. doi: 10.1109/ecce57851.2023.10101548

[31]Toğaçar M, Ergen B, Cömert Z, et al. A Deep Feature Learning Model for Pneumonia Detection Applying a Combination of mRMR Feature Selection and Machine Learning Models. IRBM. 2020; 41(4): 212-222. doi: 10.1016/j.irbm.2019.10.006

[32]Chouhan V, Singh SK, Khamparia A, et al. A Novel Transfer Learning Based Approach for Pneumonia Detection in Chest X-ray Images. Applied Sciences. 2020; 10(2): 559. doi: 10.3390/app10020559

[33]Hashmi MF, Katiyar S, Keskar AG, et al. Efficient Pneumonia Detection in Chest Xray Images Using Deep Transfer Learning. Diagnostics. 2020; 10(6): 417. doi: 10.3390/diagnostics10060417

[34]El Asnaoui K. Design ensemble deep learning model for pneumonia disease classification. International Journal of Multimedia Information Retrieval. 2021; 10(1): 55-68. doi: 10.1007/s13735-021-00204-7

[35]Alonso I, Riazuelo L, Murillo AC. MiniNet: An Efficient Semantic Segmentation ConvNet for Real-Time Robotic Applications. IEEE Transactions on Robotics. 2020; 36(4): 1340-1347. doi: 10.1109/tro.2020.2974099

[36]Howard AG, Zhu M, Chen B, et al. MobileNets: Efficient convolutional neural networks for mobile vision applications. arXiv. 2017.

[37]Mosbech TH, Pilgaard K, Vaag A, Larsen R. Automatic segmentation of abdominal adipose tissue in MRI. In: Image Analysis. SCIA 2011. Lecture Notes in Computer Science. Springer, Berlin, Heidelberg; 2011.

[38]Zhang J, Xie Y, Zhang P, et al. Light-Weight Hybrid Convolutional Network for Liver Tumor Segmentation. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence; 2019. pp. 4271-4277. doi: 10.24963/ijcai.2019/593

[39]Sandler M, Howard A, Zhu M, et al. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In: Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 4510-4520. doi: 10.1109/cvpr.2018.00474

[40]Dong K, Zhou C, Ruan Y, et al. MobileNetV2 Model for Image Classification. In: Proceedings of the 2020 2nd International Conference on Information Technology and Computer Application (ITCA). pp. 476-480. doi: 10.1109/itca52113.2020.00106

[41]Gulzar Y. Fruit Image Classification Model Based on MobileNetV2 with Deep Transfer Learning Technique. Sustainability. 2023; 15(3): 1906. doi: 10.3390/su15031906

[42]Xiang Q, Wang X, Li R, et al. Fruit Image Classification Based on MobileNetV2 with Transfer Learning Technique. In: Proceedings of the 3rd International Conference on Computer Science and Application Engineering. pp. 1-7. doi: 10.1145/3331453.3361658

[43]Liu J, Wang X. Early recognition of tomato gray leaf spot disease based on MobileNetv2-YOLOv3 model. Plant Methods. 2020; 16(1). doi: 10.1186/s13007-020-00624-2

[44]Sanjaya SA, Adi Rakhmawan S. Face Mask Detection Using MobileNetV2 in The Era of COVID-19 Pandemic. In: Proceedings of the 2020 International Conference on Data Analytics for Business and Industry: Way Towards a Sustainable Economy (ICDABI). pp. 1-5. doi: 10.1109/icdabi51230.2020.9325631

[45]Nagrath P, Jain R, Madan A, et al. SSDMNV2: A real time DNN-based face mask detection system using single shot multibox detector and MobileNetV2. Sustainable Cities and Society. 2021; 66: 102692. doi: 10.1016/j.scs.2020.102692

[46]Izzaty MK, Cenggoro TW, Elwirehardja GN, Pardamean B. Multiclass classification of histology on colorectal cancer using deep learning. Commun. Math. Biol. Neurosci. 2022.

[47]Afif M, Ayachi R, Said Y, et al. Deep Learning Based Application for Indoor Scene Recognition. Neural Processing Letters. 2020; 51(3): 2827-2837. doi: 10.1007/s11063-020-10231-w

[48]Shah HA, Saeed F, Yun S, et al. A Robust Approach for Brain Tumor Detection in Magnetic Resonance Images Using Finetuned EfficientNet. IEEE Access. 2022; 10: 65426-65438. doi: 10.1109/access.2022.3184113

[49]Tama BA, Vania M, Kim I, et al. An EfficientNet-Based Weighted Ensemble Model for Industrial Machine Malfunction Detection Using Acoustic Signals. IEEE Access. 2022; 10: 34625-34636. doi: 10.1109/access.2022.3160179

[50]Marques G, Agarwal D, de la Torre Díez I. Automated medical diagnosis of COVID-19 through EfficientNet convolutional neural network. Applied Soft Computing. 2020; 96: 106691. doi: 10.1016/j.asoc.2020.106691

[51]Atila Ü, Uçar M, Akyol K, et al. Plant leaf disease classification using EfficientNet deep learning model. Ecological Informatics. 2021; 61: 101182. doi: 10.1016/j.ecoinf.2020.101182

[52]Duong LT, Nguyen PT, Di Sipio C, et al. Automated fruit recognition using EfficientNet and MixNet. Computers and Electronics in Agriculture. 2020; 171: 105326. doi: 10.1016/j.compag.2020.105326

[53]Nayak DR, Padhy N, Mallick PK, et al. Brain Tumor Classification Using Dense Efficient-Net. Axioms. 2022; 11(1): 34. doi: 10.3390/axioms11010034

[54]Wang J, Yang L, Huo Z, et al. Multi-Label Classification of Fundus Images with EfficientNet. IEEE Access. 2020; 8: 212499-212508. doi: 10.1109/access.2020.3040275

[55]Coccomini D, Messina N, Gennaro C, Falchi F. Combining EfficientNet and vision transformers for video deepfake detection. In: Proceedings of the International conference on image analysis and processing; 2022. pp. 219-229.

[56]Tan M, Le QV. EfficientNet: Rethinking model scaling for convolutional neural networks. Proc. Int. Conf. Mach. Learn. 2019; 6105-6114.

[57]Zoph B, Vasudevan V, Shlens J, et al. Learning Transferable Architectures for Scalable Image Recognition. In: Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 8697-8710. doi: 10.1109/cvpr.2018.00907

[58]Adedoja AO, Owolawi PA, Mapayi T, Tu C. Intelligent mobile plant disease diagnostic system using NASNet-mobile deep learning. IAENG International Journal of Computer Science. 2022; 49(1): 216-231.

[59]Ahsan MM, Gupta KD, Islam MM, et al. COVID-19 Symptoms Detection Based on NASNetMobile with Explainable AI Using Various Imaging Modalities. Machine Learning and Knowledge Extraction. 2020; 2(4): 490-504. doi: 10.3390/make2040027

[60]Saxen F, Werner P, Handrich S, et al. Face Attribute Detection with MobileNetV2 and NasNet-Mobile. In: Proceedings of the 2019 11th International Symposium on Image and Signal Processing and Analysis (ISPA). pp. 176-180. doi: 10.1109/ispa.2019.8868585

[61]Das PK, Meher S. Transfer Learning-Based Automatic Detection of Acute Lymphocytic Leukemia. In: Proceedings of the 2021 National Conference on Communications (NCC); 2021. doi: 10.1109/ncc52529.2021.9530010

[62]Verma S, Razzaque MA, Sangtongdee U, et al. Digital Diagnosis of Hand, Foot, and Mouth Disease Using Hybrid Deep Neural Networks. IEEE Access. 2021; 9: 143481-143494. doi: 10.1109/access.2021.3120199

[63]Lin M, Chen Q, Yan S. Network In Network. ArXiv. 2013.

[64]Srivastava N, Hinton G, Krizhevsky A, et al. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research. 2014; 15(14): 1929-1958.

[65]Ioffe S. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv. 2015; arXiv:1502.03167.