Comparison Analysis of CXR Images in Detecting Pneumonia Using VGG16 and ResNet50 Convolution Neural Network Model

Nur Izdihar - National Defence University Malaysia
Syarifah Rahayu - National Defence University Malaysia
K Venkatesan - National Defence University Malaysia

Citation Format:



Pneumonia is a lung disease that causes serious fatalities worldwide. Pneumonia can be complicated for medical professionals to identify since it shares similarities with other lung diseases like lung cancer and cardiomegaly. Hospitals face difficulty finding professional radiologists who help to detect pneumonia through radioactive processes. This research proposes VGG16 and ResNet50-based system architecture using the Convolutional Neural Network (CNN) module, which allows the detection of pneumonia. This research identifies pneumonia using chest X-ray (CXR) images through VGG16 and ResNet50 of CNN model architectures. The performance of the proposed models is compared by performance parameters such as processing time, accuracy, and loss. The Pneumonia dataset was obtained from Kaggle and divided into 70% for training, 15 % for validation, and 15% for testing. The results show that the proposed ResNet50 model architecture has a better result than the VGG16 model architecture. It can be clearly observed based on both models' loss and accuracy results. Moreover, the processing time for ResNet50 in training and predicting the CXR images is much faster than the VGG16 model's processing time. Hence, ResNet50 performs better than VGG16 based on the result of loss and accuracy and the processing time for the model to train and predict the data. In conclusion, the findings show the capability of CNN models for detecting pneumonia in CXR images, thus reducing the burden of professional radiologists.


Pneumonia; CXR images; convolutional neural network; classifier; image enhancement.

Full Text:



S. Hassantabar, M. Ahmadi, and A. Sharifi, “Diagnosis and detection of infected tissue of COVID-19 patients based on lung x-ray image using convolutional neural network approaches,” Chaos, Solitons and Fractals, vol. 140, p. 110170, 2020.

N. Absar et al., “Development of a computer-aided tool for detection of COVID-19 pneumonia from CXR images using machine learning algorithm,” J. Radiat. Res. Appl. Sci., vol. 15, no. 1, pp. 32–43, 2022.

K. G. Rögnvaldsson, A. Bjarnason, I. S. Ólafsdóttir, K. O. Helgason, A. Guðmundsson, and M. Gottfreðsson, “Adults with symptoms of pneumonia: a prospective comparison of patients with and without infiltrates on chest radiography,” Clin. Microbiol. Infect., vol. 29, no. 1, pp. 108.e1-108.e6, 2023.

T. Mehta and N. Mehendale, “Classification of X-ray images into COVID-19, pneumonia, and TB using cGAN and fine-tuned deep transfer learning models,” Res. Biomed. Eng., vol. 37, no. 4, pp. 803–813, 2021.

C. Ieracitano et al., “A fuzzy-enhanced deep learning approach for early detection of Covid-19 pneumonia from portable chest X-ray images,” Neurocomputing, vol. 481, pp. 202–215, 2022.

N. Sri Kavya, T. shilpa, N. Veeranjaneyulu, and D. Divya Priya, “Detecting Covid19 and pneumonia from chest X-ray images using deep convolutional neural networks,” Mater. Today Proc., vol. 64, pp. 737–743, 2022.

B. Ibrokhimov and J.-Y. Kang, “Deep Learning Model for COVID-19-Infected Pneumonia Diagnosis Using Chest Radiography Images,” BioMedInformatics, vol. 2, no. 4, pp. 654–670, 2022.

A. S. Musallam, A. S. Sherif, and M. K. Hussein, “Efficient framework for detecting COVID-19 and pneumonia from chest X-ray using deep convolutional network,” Egypt. Informatics J., vol. 23, no. 2, pp. 247–257, 2022.

M. Abdar et al., “UncertaintyFuseNet: Robust uncertainty-aware hierarchical feature fusion model with Ensemble Monte Carlo Dropout for COVID-19 detection,” Inf. Fusion, vol. 90, no. September 2022, pp. 364–381, 2023.

M. Heidari et al., “HiFormer: Hierarchical Multi-scale Representations Using Transformers for Medical Image Segmentation,” Proc. - 2023 IEEE Winter Conf. Appl. Comput. Vision, WACV 2023, pp. 6191–6201, 2023.

M. Xin and Y. Wang, “Research on image classification model based on deep convolution neural network,” Eurasip J. Image Video Process., vol. 2019, no. 1, 2019.

K. Aktas, V. Ignjatovic, D. Ilic, M. Marjanovic, and G. Anbarjafari, “Deep convolutional neural networks for detection of abnormalities in chest X-rays trained on the very large dataset,” Signal, Image Video Process., vol. 17, no. 4, pp. 1035–1041, 2023.

J. L. P. Ignatius, S. Selvakumar, K. G. J. L. Paul, A. B. Kailash, S. Keertivaas, and S. A. J. Akarvin Raja Prajan, “Histogram Matched Chest X-Rays Based Tuberculosis Detection Using CNN,” Comput. Syst. Sci. Eng., vol. 44, no. 1, pp. 81–97, 2022.

A. A. Shah, H. A. M. Malik, A. H. Muhammad, A. Alourani, and Z. A. Butt, “Deep learning ensemble 2D CNN approach towards the detection of lung cancer,” Sci. Rep., vol. 13, no. 1, pp. 1–15, 2023.

A. A. Reshi et al., “An Efficient CNN Model for COVID-19 Disease Detection Based on X-Ray Image Classification,” Complexity, vol. 2021, 2021.

Y. Anagun, “Smart brain tumor diagnosis system utilizing deep convolutional neural networks,” Multimed. Tools Appl., no. 0123456789, 2023.

N. F. Razali, I. S. Isa, S. N. Sulaiman, N. K. Noor, and M. K. Osman, “CNN-Wavelet scattering textural feature fusion for classifying breast tissue in mammograms,” Biomed. Signal Process. Control, vol. 83, no. November 2022, p. 104683, 2023.

M. Malvoni, M. G. De Giorgi, and P. M. Congedo, “Data on Support Vector Machines (SVM) model to forecast photovoltaic power,” Data Br., vol. 9, pp. 13–16, 2016.

P. Ranganathan, C. Pramesh, and R. Aggarwal, “Common pitfalls in statistical analysis: Logistic regression,” Perspect. Clin. Res., vol. 8, no. 3, pp. 148–151, 2017.

J. Ali, R. Khan, N. Ahmad, and I. Maqsood, “Random forests and decision trees,” IJCSI Int. J. Comput. Sci. Issues, vol. 9, no. 5, pp. 272–278, 2012.

C. W. Song, H. Jung, and K. Chung, “Development of a medical big-data mining process using topic modeling,” Cluster Comput., vol. 22, no. s1, pp. 1949–1958, 2019.

A. Alhudhaif, K. Polat, and O. Karaman, “Determination of COVID-19 pneumonia based on generalized convolutional neural network model from chest X-ray images,” Expert Syst. Appl., vol. 180, no. April, p. 115141, 2021.

D. Avola, A. Bacciu, L. Cinque, A. Fagioli, M. R. Marini, and R. Taiello, “Study on transfer learning capabilities for pneumonia classification in chest-x-rays images,” Comput. Methods Programs Biomed., vol. 221, p. 106833, 2022.

T. Pham, T. Tran, D. Phung, and S. Venkatesh, “Predicting healthcare trajectories from medical records: A deep learning approach,” J. Biomed. Inform., vol. 69, pp. 218–229, 2017.

J. L. Gayathri, B. Abraham, M. S. Sujarani, and M. S. Nair, “A computer-aided diagnosis system for the classification of COVID-19 and non-COVID-19 pneumonia on chest X-ray images by integrating CNN with sparse autoencoder and feed forward neural network,” Comput. Biol. Med., vol. 141, no. December 2021, p. 105134, 2022.

A. Sharma, K. Singh, and D. Koundal, “A novel fusion based convolutional neural network approach for classification of COVID-19 from chest X-ray images,” Biomed. Signal Process. Control, vol. 77, no. April, p. 103778, 2022.

F. Karim et al., “Towards an effective model for lung disease classification: Using Dense Capsule Nets for early classification of lung diseases,” Appl. Soft Comput., vol. 124, p. 109077, 2022.

F. Liu, C. Yin, X. Wu, S. Ge, P. Zhang, and X. Sun, “Contrastive Attention for Automatic Chest X-ray Report Generation,” Find. Assoc. Comput. Linguist. ACL-IJCNLP 2021, pp. 269–280, 2021.

S. R. Nayak, D. R. Nayak, U. Sinha, V. Arora, and R. B. Pachori, “Application of deep learning techniques for detection of COVID-19 cases using chest X-ray images: A comprehensive study,” Biomed. Signal Process. Control, vol. 64, no. November 2020, p. 102365, 2021.

A. Abbas, M. M. Abdelsamea, and M. M. Gaber, “Classification of COVID-19 in chest X-ray images using DeTraC deep convolutional neural network,” Appl. Intell., vol. 51, no. 2, pp. 854–864, 2021.