Pneumonia Detection and Classification Using Deep Learning on Chest X-Ray Images

Keywords: Bacterial Pneumonia, CNN, Deep Learning, Ensemble Learning, Pneumonia, Smote Method, Viral Pneumonia.


Pneumonia is a bacterial infection caused people of all ages with mild to severe inflammation of the lung tissue [1]. The best known and most common clinical method for the diagnosis of pneumonia is chest X-ray imaging. But the diagnosis of pneumonia from chest X-ray images is a difficult task, even for specialist radiologists. In developing countries, this lung disease becomes one of the deadliest among children under the age of 5 and causing 15% of deaths recorded annually [2]. Therefore, in this study, firstly the presence of the disease was tried to be determined using chest X-ray dataset. In addition, using the bacterial and viral pneumonia classes which are two different types of pneumonia, multi class classification which consists of viral pneumonia, bacterial pneumonia and healthy has been done. Since the used dataset does not have a balanced distribution among all classes, SMOTE (Synthetic Minority Over-sampling Technique) method has been used to deal with imbalanced dataset. CNN model and models in Ensemble Learning have been created from scratch instead of using pre-trained networks. For each classification problem, two different deep learning methods which are CNN and ensemble learning have been used and 95% average accuracy has been obtained for each model, for binary classification and 78% and 75% average accuracy has been obtained for each model respectively for multi class classification problem.


Download data is not yet available.


Health Topics Pneumonia [Online] Available:

E. Ayan and H. M. Ünver, "Diagnosis of Pneumonia from Chest X-Ray Images Using Deep Learning," 2019 Scientific Meeting on Electrical-Electronics & Biomedical Engineering and Computer Science (EBBT), Istanbul, Turkey, 2019, pp. 1-5, doi: 10.1109/EBBT.2019.8741582.

H. Greenspan, B. van Ginneken and R. M. Summers, "Guest Editorial Deep Learning in Medical Imaging: Overview and Future Promise of an Exciting New Technique," in IEEE Transactions on Medical Imaging, vol. 35, no. 5, pp. 1153-1159, May 2016, doi: 10.1109/TMI.2016.2553401.

X. Wang, Y. Peng, L. Lu, Z. Lu, M. Bagheri and R. M. Summers, "ChestX-Ray8: Hospital-Scale Chest X-Ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases," 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, 2017, pp. 3462-3471, doi: 10.1109/CVPR.2017.369.

M. Siar and M. Teshnehlab, "Brain Tumor Detection Using Deep Neural Network and Machine Learning Algorithm," 2019 9th International Conference on Computer and Knowledge Engineering (ICCKE), Mashhad, Iran, 2019, pp. 363-368.

S.Yoo, I. Gujrathi , M.A. Haider ,F. Khalvati “Prostate Cancer Detection using Deep Convolutional Neural Networks” ,A Nature Research Journal , Scientific Reports volume 9, Article number: 19518 (2019).

P. N. Kieu, H. S. Tran, T. H. Le, T. Le and T. T. Nguyen, "Applying Multi-CNNs model for detecting abnormal problem on chest x-ray images," 2018 10th International Conference on Knowledge and Systems Engineering (KSE), Ho Chi Minh City, 2018, pp. 300-305.

H. Wang, H. Jia, L. Lu and Y. Xia, "Thorax-Net: An Attention Regularized Deep Neural Network for Classification of Thoracic Diseases on Chest Radiography," in IEEE Journal of Biomedical and Health Informatics, vol. 24, no. 2, pp. 475-485, Feb. 2020.

M. Talo, "Pneumonia Detection from Radiography Images using Convolutional Neural Networks," 2019 27th Signal Processing and Communications Applications Conference (SIU), Sivas, Turkey, 2019, pp. 14.

W. O’Quinn, R. J. Haddad and D. L. Moore, "Pneumonia Radiograph Diagnosis Utilizing Deep Learning Network," 2019 IEEE 2nd International Conference on Electronic Information and Communication Technology (ICEICT), Harbin, China, 2019, pp. 763-767.

D. Varshni, K. Thakral, L. Agarwal, R. Nijhawan and A. Mittal, "Pneumonia Detection Using CNN based Feature Extraction," 2019 IEEE International Conference on Electrical, Computer and Communication Technologies (ICECCT), Coimbatore, India, 2019, pp. 1-7.

O. Stephen , M. Sain ,U. J. Maduh , D. Jeong, “An Efficient Deep Learning Approach to Pneumonia Classification in Healthcare”, Hindawi Journal of Healthcare Engineering,Volume 2019,Article ID 4180949, 7 pages

D.Y.Urey, C. J. Saul, C.D.Taktakoglu , “Early Diagnosis of Pneumonia with Deep Learning”,2019, 1904.00937

K. Hammoudi1,H. Benhabiles, M.Melkemi, F. Dornaika, I. Arganda-Carreras, D.e Collard,A.Scherpereel, “Deep Learning on Chest X-ray Images to Detect and Evaluate Pneumonia Cases at the Era of COVID-19”, arXiv:2004.03399, Apr 2020

Kuşçu, E. (2015). Çeviride Yapay Zeka Uygulamaları . Atatürk Üniversitesi Kazım Karabekir Eğitim Fakültesi Dergisi , 0 (30) , 45-58 . Retrieved from issue/2789/37502

Kayaalp, K., & Süzen, A. A. (2018). Derin Öğrenme ve Türkiye’deki Uygulamaları. IKSAD Publishing House.pp.5-6.

D. K. Wornyo,F. B.Kataka1,(2016). A Review of Deep Machine Learning. International Journal of Engineering Research in Africa. 24. 124-136. 10.4028

Albawi, Saad & Abed Mohammed, Tareq & ALZAWI, Saad. (2017). Understanding of a Convolutional Neural Network.

Zeki Kuş, “Mikrokanonikal Optimizasyon Algoritmasi Ile Konvolüsyonel Sinir Ağlarinda Hiper Parametrelerin Optimize Edilmesi” , Fatih Sultan Mehmet Vakif Üniversitesi Lisansüstü Eğitim Enstitüsü/Yüksek Lisans Tezi, Haziran 2019.

Y. Guo, Y. Liu, A. Oerlemans, S. Wu, and M. S. Lew, (2015). Deep learning for visual understanding: A review. Neurocomputing.

A. Rojarath, W. Songpan and C. Pong-inwong, "Improved ensemble learning for classification techniques based on majority voting," 2016 7th IEEE International Conference on Software Engineering and Service Science (ICSESS), Beijing, 2016, pp. 107-110, doi: 10.1109/ICSESS.2016.7883026.

Z.-H. Zhou, ‘‘Ensemble learning,’’ in Encyclopedia Biometrics, S. Z. Li and A. Jain, Eds. New York, NY, USA: Springer, 2015, pp. 411–416.

W. Liu, M. Zhang, Z. Luo and Y. Cai, "An Ensemble Deep Learning Method for Vehicle Type Classification on Visual Traffic Surveillance Sensors," in IEEE Access, vol. 5, pp. 24417-24425, 2017, doi: 10.1109/ACCESS.2017.2766203.

Ferreira A.J., Figueiredo M.A.T. (2012) Boosting Algorithms: A Review of Methods, Theory, and Applications. In: Zhang C., Ma Y. (eds) Ensemble Machine Learning. Springer, Boston, MA.

L. Wang, M. Sugiyama, C. Yang, Z.-H. Zhou, and J. Feng, ‘‘On the margin explanation of boosting algorithms,’’ in Proc. COLT, 2008, pp. 479–490

N. V. Chawla, K. W. Bowyer, L. O. Hall, W. P. Kegelmeyer, “SMOTE: Synthetic Minority Over-sampling”, Technique Journal of Artificial Intelligence Research 16 (2002) 321–357 Submitted 09/01; published 06/02

Deng, J., Dong, W., Socher, R., Li, L.J., Li, K. and Fei-Fei, L. (2009). ImageNet: A large-scale hierarchical image database, Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp.248–255

How to Cite
M. Darici, Z. Dokur, and T. Olmez, “Pneumonia Detection and Classification Using Deep Learning on Chest X-Ray Images”, IJISAE, vol. 8, no. 4, pp. 177-183, Dec. 2020.
Research Article