Main Article Content

Naveed Ahmad
Intakhab Alam Qadri
Dr Mehvish Naeem
Dr. Faizan Akbar
Naveed Ahmed
Shahid Iqbal Rai


Pneumonia, Deep Learning, Convolutional Neural Network CNN, Image Classification


A quick and correct diagnosis is essential for providing patients with quality care since lung illnesses continue to be a major worldwide health problem. The use of Convolutional Neural Networks (CNNs) in the diagnosis of lung illnesses from X-ray images is thoroughly examined in this research using a variety of architectural configurations. The goal is to improve illness classification and identification accuracy and reliability while giving radiologists and other healthcare workers a useful tool. In this study, we used InceptionResNetV2, DenseNet121, VGG16, and Xception, Convolutional neural networks (CNNs) in four distinct configurations. To make a model work better, we need a large dataset. Hence, we gathered the datasets from Kaggle; The First dataset contains 5863 X-ray images, and the second dataset we gathered has 2237 X-ray images from the COVID-19 Radiography Database, both of which are freely accessible on Kaggle. After the dataset collection, we got good accuracy, precision, recall, and f1-score. For the proposed models, 8100 chest X-rays total, including the chest X-rays were preprocessed and trained to detect bacteria, viruses, and normal chest conditions. The Experimental results confirmed that InceptionResNetV2 provides the best classification accuracy as compared to other methods. InceptionResNetV2 achieved the highest accuracy, precision, recall, and F1-Socre of 98.33%, 98.39, 98.21, and 98.30%, respectively. Therefore, this study may be useful in the faster diagnosis of pneumonia by chest X-rays.

Abstract 200 | pdf Downloads 37


1. Johns Hopkins Medicine. Pneumonia. Available online: https://www.hopkinsmedicine.org/health/ conditions-and-diseases/pneumonia (accessed on 31 December 2019).
2. Johnson, S.; Wells, D. Healthline. Viral Pneumonia: Symptoms, Risk Factors, and More. Available online: https://www.healthline.com/health/viral-pneumonia (accessed on 31 December 2019).
3. WHO. Pneumonia. 2021. Available online: https://www.who.int/health-topics/pneumonia/ (accessed on 20 February 2022).
4. McAllister, D.A.; Liu, L.; Shi, T.; Chu, Y.; Reed, C.; Burrows, J.; Adeloye, D.; Rudan, I.; Black, R.E.; Campbell, H.; et al. Global, regional, and national estimates of pneumonia morbidity and mortality in children younger than 5 years between 2000 and 2015: A systematic analysis. Lancet Glob. Health 2019, 7, e47–e57. [CrossRef]
5. Our World in Data, Pneumonia. 2021. Available online: https://ourworldindata.org/grapher/pneumonia-and-lowerrespiratory-diseases-deaths (accessed on 25 February 2022).
6. V. Fernandes, G. B. Junior, A. C. de Paiva, A. C. Silva, and M. Gattass, “Bayesian convolutional neural network estimation for pediatric pneumonia detection and diagnosis,” Computer Methods and Programs in Biomedicine, vol. 208, p. 106259, 2021.
7. G. U. Nneji, J. Cai, J. Deng, H. N. Monday, E. C. James, and C. C. Ukwuoma, “Multi-channel based image processing scheme for pneumonia identification,” Diagnostics, vol. 12, no. 2, p. 325, 2022.
8. A. U. Ibrahim, M. Ozsoz, S. Serte, F. Al-Turjman, and P. S. Yakoi, “Pneumonia classification using deep learning from chest X-ray images during COVID-19,” Cognitive Computation, pp. 1–13, 2021.
9. T. M. Hasan, S. D. Mohammed, and J. Waleed, “Development of breast cancer diagnosis system based on fuzzy logic and probabilistic neural network,” Eastern-European Journal of Enterprise Technologies, Information and Controlling System, vol. 4, no. 9, pp. 6–13, 2020.
10. A. G. Mahmoud, A. M. Hasan, and N. M. Hassan, “Convolutional neural networks framework for human hand gesture recognition,” Bulletin of Electrical Engineering and Informatics, vol. 10, no. 4, pp. 2223–2230, 2021.
11. H. Q. Flayyih, J. Waleed, and S. Albawi, “A systematic mapping study on brain tumors recognition based on machine learning algorithms,” in 2020 3rd International Conf. On Engineering Technology and its Applications (IICETA), pp. 191– 197, Najaf, Iraq, Sept. 2020.
12. Alzubaidi et al. (2021). Review of deep learning: concepts, CNN architectures, challenges, applications, future directions. J Big Data (2021) 8:53 https://doi.org/10.1186/s40537- 021-00444-8
13. Chaddad, A., Hassan, L., Desrosiers, C. (2021) Deep CNN models for predicting COVID-19 in CT and x-ray images, J. Med. Imag. 8(S1) 014502. https://doi.org/10.1117/1.JMI.8.S1.014502
14. Abbas, A., Abdelsamea, M.M., Gaber, M.M. (2021). Classification of COVID-19 in chest Xray images using DeTraC deep convolutional neural network. Appl. Intell. 2021, 51, 854–864.
15. Andrea Yoss (2020). Transfer Learning using Pre-Trained AlexNet Model and Fashion- MNIST. Retrieved on Sept. 16, 2021 from https://towardsdatascience.com/transfer- learning-using-pre-trained-alexnet-model-and-fashion-mnist-43898c2966fb 41 Angelov, P., & Soares, E. (2020). Towards explainable deep neural networks (xDNN). Neural Networks, 130, 185-194.
16. Kugunavar, S. and Prabhakar, C. J. (2021). Convolutional neural networks for the diagnosis and prognosis of the coronavirus disease pandemic. Vis Comput Ind Biomed Art; 4(1):12. doi: 10.1186/s42492-021-00078-w. PMID: 33950399; PMCID: PMC8097673
17. Mishra, M., Choudhury, T., Sarkar, T. (2021). CNN based efficient image classification system for smartphone device. Electronic letters on computer vision and image analysis 0(0):1- 7, 2021 DOI: https://doi.org/10.21203/rs.3.rs-428430/v1
18. Albawi, S.; Mohammed, T.A.; Al-Azawi, S. Understanding of a convolutional neural network. In Proceedings of the 2017 International Conference on Engineering and Technology (ICET), Antalya, Turkey, 21–23 August 2017; pp. 1–6.
19. Bailer, C.; Habtegebrial, T.; Varanasi, K.; Stricker, D. Fast Feature Extraction with CNNs with Pooling Layers. arXiv 2018, arXiv:1805.03096
20. Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely connected convolutional networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR); July 2017; pp. 4700–4708.
21. Szegedy, C.; Ioffe, S.; Vanhoucke, V.; Alemi, A. Inception-v4, inception-resnet and the impact of residual connections on learning. In Proceedings of the AAAI Conference on Artificial Intelligence 2017, San Francisco, CA, USA, 4–9 February 2017; Volume 31.
22. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778.
23. Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556.
24. Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1251–1258
25. Mujahid, Muhammad, Furqan Rustam, Roberto Álvarez, Juan Luis Vidal Mazón, Isabel de la Torre Díez, and Imran Ashraf. "Pneumonia Classification from X-ray Images with Inception-V3 and Convolutional Neural Network." Diagnostics 12, no. 5 (2022): 1280.
26. Hashmi, Mohammad Farukh, Satyarth Katiyar, Avinash G. Keskar, Neeraj Dhanraj Bokde, and Zong Woo Geem. "Efficient pneumonia detection in chest xray images using deep transfer learning." Diagnostics 10, no. 6 (2020): 417.
27. Dey, Nilanjan, Yu-Dong Zhang, V. Rajinikanth, R. Pugalenthi, and N. Sri Madhava Raja. "Customized VGG19 architecture for pneumonia detection in chest X-rays." Pattern Recognition Letters 143 (2021): 67-74.
28. Agrawal, Harsh. "Pneumonia Detection Using Image Processing and Deep Learning." In 2021 International Conference on Artificial Intelligence and Smart Systems (ICAIS), pp. 67-73. IEEE, 2021.
29. Kundu, Rohit, Ritacheta Das, Zong Woo Geem, Gi-Tae Han, and Ram Sarkar. "Pneumonia detection in chest X-ray images using an ensemble of deep learning models." Plos one 16, no. 9 (2021): e0256630.
30. Rahman, Tawsifur, Muhammad EH Chowdhury, Amith Khandakar, Khandaker R. Islam, Khandaker F. Islam, Zaid B. Mahbub, Muhammad A. Kadir, and Saad Kashem. "Transfer learning with deep convolutional neural network (CNN) for pneumonia detection using chest X-ray." Applied Sciences 10, no. 9 (2020): 3233.
31. Gupta, Puneet. "Pneumonia detection using convolutional neural networks." Science and Technology 7, no. 01 (2021): 77-80.
32. Račić, Luka, Tomo Popović, and Stevan Šandi. "Pneumonia detection using deep learning based on convolutional neural network." In 2021 25th International Conference on Information Technology (IT), pp. 1-4. IEEE, 2021.
33. Jain, Rachna, Preeti Nagrath, Gaurav Kataria, V. Sirish Kaushik, and D. Jude Hemanth. "Pneumonia detection in chest X-ray images using convolutional neural networks and transfer learning." Measurement 165 (2020): 108046.
34. Barhoom, Alaa MA, and Samy S. Abu-Naser. "Diagnosis of Pneumonia Using Deep Learning." International Journal of Academic Engineering Research (IJAER) 6, no. 2 (2022).
35. Varshni, Dimpy, Kartik Thakral, Lucky Agarwal, Rahul Nijhawan, and Ankush Mittal. "Pneumonia detection using CNN based feature extraction." In 2019 IEEE international conference on electrical, computer and communication technologies (ICECCT), pp. 1-7. IEEE, 2019.
36. Militante, Sammy V., Nanette V. Dionisio, and Brandon G. Sibbaluca. "Pneumonia detection through adaptive deep learning models of convolutional neural networks." In 2020 11th IEEE Control and System Graduate Research Colloquium (ICSGRC), pp. 88-93. IEEE, 2020.
37. Ayan, Enes, and Halil Murat Ünver. "Diagnosis of pneumonia from chest X-ray images using deep learning." In 2019 Scientific Meeting on Electrical-Electronics & Biomedical Engineering and Computer Science (EBBT), pp. 1-5. Ieee, 2019.
38. Mooney, P. Chest X-ray Images (Pneumonia). 2018. Available online: https://www.kaggle.com/ paultimothymooney/chest-xray-pneumonia (accessed on 23 December 2019).
39. https://www.kaggle.com/datasets/tawsifurrahman/covid19-radiography-database.