Classification of Pneumonia Based on Lung X-rays Images using Convolutional Neural Network

  • I Md. Dendi Maysanjaya Universitas Pendidikan Ganesha
Keywords: Identifikasi, Pneumonia, Citra X-rays, Paru-paru, Convolutional Neural Network


Pneumonia is a lung disease that could be caused by bacteria, viruses, fungi, or parasites. The pulmonary cysts are filled with fluid, causing croup and mucus cough. Usually, observation of the patient's lung condition is performed through X-rays. However, the quality of X-ray images tends to be less than optimal. Therefore, a CAD-based automation system was developed. In this paper, a new chest X-rays dataset for pneumonia cases is classified by using Convolutional Neural Network (CNN). This study examines the CNN performance in handling the new dataset. The data were obtained from the Kaggle platform. In total, there were5,840 images occupied in this study, consisting of 1,575 normal lung images and 4,265 pneumonia lung images. The data were divided into training and testing data, with the amount of data 5,216 and 624 images on each, respectively. The CNN activation function applied the Rectifier Linear Unit (ReLU) function, Adam optimization function, and epoch as many as 200times. Based on the test results, the average accuracy and loss values are sequentially at 89.58% and 47.43%. The results of this test indicate that the CNN method is quite capable of classifying the pneumonia cases.


Y. Dong, Y. Pan, J. Zhang, dan W. Xu, “Learning to Read Chest X-Ray Images from 16000+ Examples Using CNN,” 2017 IEEE/ACM International Conference on Connected Health: Applications, Systems and Engineering Technologies (CHASE), 2017, hal. 51-57.

T.B. Chandra dan K. Verma, “Pneumonia Detection on Chest X-Ray Using Machine Learning Paradigm,” Proceedings of 3rd International Conference on Computer Vision and Image Processing, 2020, hal. 21–33.

A. Mujahidin dan D. Pribadi, “Penerapan Algoritma C4.5 Untuk Diagnosa Penyakit Pneumonia pada Anak Balita Berbasis Mobile,” J. Swabumi, Vol. 5, No. 2, hal. 155–161, 2017.

B. van Ginneken, B.M. ter Haar Romeny, dan M.A. Viergever, “Computer-aided Diagnosis in Chest Radiography: A Survey,” IEEE Trans. Med. Imaging, Vol. 20, No. 12, hal. 1228–1241, 2001.

S. Antani, “Automated Detection of Lung Diseases in Chest X-Rays,” IEEE Trans. Med. Imaging, Vol. 33, No. 1, hal. 1–26, 2015.

A. Karargyris, J. Siegelman, D. Tzortzis, S. Jaeger, S. Candemir, Z. Xue, K.C. Santosh, S. Vajda, S. Antani, L. Folio, dan G.R. Thoma, “Combination of Texture and Shape Features to Detect Pulmonary Abnormalities in Digital Chest X-rays,” Int. J. Comput. Assist. Radiol. Surg., Vol. 11, hal. 99–106, 2016.

X. Wang, Y. Peng, L. Lu, Z. Lu, M. Bagheri, dan 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), 2017, hal. 3462–3471.

L. Yao, E. Poblenz, D. Dagunts, B. Covington, D. Bernard, dan K. Lyman, “Learning to Diagnose from Scratch by Exploiting Dependencies Among Labels,” arXiv Prepr., hal. 1–12, 2017.

P. Rajpurkar, J. Irvin, K. Zhu, B. Yang, H. Mehta, T. Duan, D. Ding, A. Bagul, R.L. Ball, C. Langlotz, K. Shpanskaya, M.P. Lungren, dan A.Y. Ng,, “CheXNet: Radiologist-Level Pneumonia Detection on Chest X-Rays with Deep Learning,” arXiv Prepr., hal. 3–9, 2017.

D.S. Kermany, M. Goldbaum, W. Cai, dan M.A. Lewis, “Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning Resource Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning,” Cell, Vol. 172, No. 5, hal. 1122-1131.e9, 2018.

J-E. Bourcier, J. Paquet, M. Seinger, E. Gallard, J-P. Redonnet, F. Cheddadi, D. Garnier, J-M. Bourgeois, dan T. Geeraerts, “Performance Comparison of Lung Ultrasound and Chest X-ray for the Diagnosis of Pneumonia in the ED,” Am. J. Emerg. Med., Vol. 32, No. 2, hal. 115–118, 2014.

I. Sirazitdinov, M. Kholiavchenko, T. Mustafaev, Y. Yixuan, R. Kuleev, dan B. Ibragimov, “Deep Neural Network Ensemble for Pneumonia Localization from a Large-scale Chest X-ray Database,” Comput. Electical Eng., Vol. 78, hal. 388–399, 2019.

W.W. Chapman, M. Fizman, B.E. Chapman, dan P.J. Haug, “A Comparison of Classification Algorithms to Automatically Identify Chest X-Ray Reports That Support Pneumonia,” J. Biomed. Inform., Vol. 34, No. 1, hal. 4–14, 2001.

A.K. Jaiswal, P. Tiwari, S. Kumar, D. Gupta, A. Khanna, dan J.J.P.C. Rodrigues, “Identifying Pneumonia in Chest X-rays: A Deep Learning Approach,” Measurement, Vol. 145, hal. 511–518, 2019.

B. Biswas, S.Kr. Ghosh, S. Bhattacharyya, J. Platos, V. Snasel, dan A. Chakrabarti, “Chest X-ray Enhancement to Interpret Pneumonia Malformation Based on Fuzzy Soft Set and Dempster – Shafer Theory of Evidence,” Appl. Soft Comput. J., Vol. 86, hal. 105889, 2020.

P. Mooney (2018) “Chest X-Ray Images (Pneumonia),” [Online],, tanggal akses: 12-Jan-2020.

D.P. Kingma dan J. Ba, “Adam: A Method for Stochastic Optimization,” arXiv Prepr., hal. 1-15, 2014.

How to Cite
Maysanjaya, I. M. D. (2020). Classification of Pneumonia Based on Lung X-rays Images using Convolutional Neural Network. Jurnal Nasional Teknik Elektro Dan Teknologi Informasi, 9(2), 190-195.