Lungs X-Ray Image Segmentation and Classification of Lung Disease using Convolutional Neural Network Architectures

  • Bambang Suprihatin Universitas Sriwijaya, Indralaya, Indonesia
  • Yuli Andriani Universitas Sriwijaya, Indralaya, Indonesia
  • Fauziah Nuraini Kurdi Universitas Sriwijaya, Indralaya, Indonesia
  • Anita Desiani Universitas Sriwijaya, Indralaya, Indonesia
  • Ibra Giovani Dwi Putra Universitas Sriwijaya, Indralaya, Indonesia
  • Muhammad Akmal Shidqi Universitas Sriwijaya, Indralaya, Indonesia
Keywords: Classification, Convolutional Neural Network, Lung Disease, Segmentation


Lung disease is one of the biggest causes of death in the world. The SARS-CoV-2 virus causes diseases like COVID-19, and the bacteria Streptococcus sp., which causes pneumonia, are two sample causes of lung disease. X-ray images are used to detect the lung disease. This study aimed to combine the stages of segmentation and classification of lung disease. This study in segmentation aims to separate the features contained in the lung images. The classification aimed to provide holistic information on lung disease. This research method used the Deep Residual U-Net (DrU-Net) segmentation architecture and the Deep Residual Neural Network (DResNet) classification architecture. DrU-Net is a modified U-Net architecture with dropout added in its convolutional layers. DResNet is a modified Residual Network (ResNet) architecture with dropout added in its convolutional block layers. The result of this study was segmentation using the DrU-Net architecture obtained 99% for accuracy, 98% for precision, 98% for recalls, 98% for F1-Score, and 96.1% for IoU. The classification results of the segmented images using the DResNet architecture obtained 91% for accuracy, 86% for precision, 85% for recalls, and 84% for F1-Score. The performance results of DrU-Net architecture were excellent and robust in image segmentation. Unfortunately, the average performance of DResNet in classification was still below 90%. These results indicate that Dres-Net performs well in classifying lung disorders in 3 labels, namely Covid, Normal, and Pneumonia, but still needs improvement.


Download data is not yet available.


[1] Y. Qin, Y. Chen, J. Chen, K. Xu, F. Xu, and J. Shi, “The relationship between previous pulmonary tuberculosis and risk of lung
cancer in the future,” Infectious Agents and Cancer, vol. 17, no. 20, pp. 1–12, dec 2022.
[2] T. Pranata, A. Desiani, B. Suprihatin, H. Hanum, and F. Efriliyanti, “Segmentation of the Lungs on X-Ray Thorax Images with
the U-Net CNN Architecture,” Computer Engineering and Applications Journal, vol. 11, no. 2, pp. 101–111, 2022.
[3] A. M. Baig, A. Khaleeq, U. Ali, and H. Syeda, “Evidence of the COVID-19 Virus Targeting the CNS: Tissue Distribution,
HostVirus Interaction, and Proposed Neurotropic Mechanisms,” ACS Chemical Neuroscience, vol. 11, no. 7, pp. 995–998, apr
[4] M. Abu-Farha, T. A. Thanaraj, M. G. Qaddoumi, A. Hashem, J. Abubaker, and F. Al-Mulla, “The Role of Lipid Metabolism in
COVID-19 Virus Infection and as a Drug Target,” International Journal of Molecular Sciences, vol. 21, no. 10, pp. 1–11, may
[5] P. Pagliano, C. Sellitto, V. Conti, T. Ascione, and S. Esposito, “Characteristics of viral pneumonia in the COVID-19 era: an
update,” Infection, vol. 49, no. 4, pp. 607–616, 2021.
[6] M. Nour, Z. C¨omert, and K. Polat, “A Novel Medical Diagnosis model for COVID-19 infection detection based on Deep
Features and Bayesian Optimization,” Applied Soft Computing, vol. 97, no. December, pp. 1–13, dec 2020.
[7] M. Yahyatabar, P. Jouvet, and F. Cheriet, “Dense-Unet: a light model for lung fields segmentation in Chest X-Ray images,”
in 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), 2020, pp.
[8] H. Shaziya and K. Shyamala, “Pulmonary CT Images Segmentation using CNN and UNet Models of Deep Learning,” in 2020
IEEE Pune Section International Conference, PuneCon 2020, 2020, pp. 195–201.
[9] X. Zhang, J. Zhou, W. Sun, and S. K. Jha, “A Lightweight CNN Based on Transfer Learning for COVID-19 Diagnosis,”
Computers, Materials and Continua, vol. 72, no. 1, pp. 1123–1137, 2022.
[10] M. F. Aslan, K. Sabanci, A. Durdu, and M. F. Unlersen, “COVID-19 diagnosis using state-of-the-art CNN architecture features
and Bayesian Optimization,” Computers in Biology and Medicine, vol. 142, no. March, pp. 1–11, mar 2022.
[11] A. Das, “Adaptive UNet-based Lung Segmentation and Ensemble Learning with CNN-based Deep Features for Automated
COVID-19 Diagnosis,” Multimedia Tools and Applications, vol. 81, no. 4, pp. 5407–5441, 2022.
[12] M. F. Aslan, “A robust semantic lung segmentation study for CNN-based COVID-19 diagnosis,” Chemometrics and Intelligent
Laboratory Systems, vol. 231, no. 15, pp. 1–12, dec 2022.
[13] S. Niranjan Kumar, P. M. Bruntha, S. Isaac Daniel, J. A. Kirubakar, R. Elaine Kiruba, S. Sam, and S. Immanuel Alex Pandian,
“Lung Nodule Segmentation Using UNet,” in 2021 7th International Conference on Advanced Computing and Communication
Systems (ICACCS), vol. 1, 2021, pp. 420–424.
[14] S. A. Khan, M. Nazir, M. A. Khan, T. Saba, K. Javed, A. Rehman, T. Akram, and M. Awais, “Lungs nodule detection framework
from computed tomography images using support vector machine,” Microscopy Research and Technique, vol. 82, no. 8, pp.
1256–1266, aug 2019.
[15] D. Sarwinda, R. H. Paradisa, A. Bustamam, and P. Anggia, “Deep Learning in Image Classification using Residual Network
(ResNet) Variants for Detection of Colorectal Cancer,” Procedia Computer Science, vol. 179, pp. 423–431, 2021.
[16] B. Li and D. Lima, “Facial expression recognition via ResNet-50,” International Journal of Cognitive Computing in Engineering,
vol. 2, no. June, pp. 57–64, jun 2021.
[17] S. Bharati, P. Podder, M. R. H. Mondal, and V. S. Prasath, “CO-ResNet: Optimized ResNet model for COVID-19 diagnosis
from X-ray images,” International Journal of Hybrid Intelligent Systems, vol. 17, no. 1-2, pp. 71–85, jul 2021.
[18] T. A. Youssef, B. Aissam, D. Khalid, B. Imane, and J. E. Miloud, “Classification of chest pneumonia from x-ray images using
new architecture based on ResNet,” in 2020 IEEE 2nd International Conference on Electronics, Control, Optimization and
Computer Science (ICECOCS), 2020, pp. 1–5.
[19] Y. Ma, X. Xu, and Y. Li, “LungRN+NL: An Improved Adventitious Lung Sound Classification Using Non-Local Block ResNet
Neural Network with Mixup Data Augmentation,” in Interspeech 2020. ISCA: ISCA, oct 2020, pp. 2902–2906.
[20] A. Desiani, Erwin, B. Suprihatin, F. Efriliyanti, M. Arhami, and E. Setyaningsih, “VG-DropDNet a Robust Architecture for
Blood Vessels Segmentation on Retinal Image,” IEEE Access, vol. 10, no. June, pp. 92 067–92 083, 2022.
[21] J. Li, Y. Zhang, L. Gao, and X. Li, “Arrhythmia Classification Using Biased Dropout and Morphology-Rhythm Feature With
Incremental Broad Learning,” IEEE Access, vol. 9, pp. 66 132–66 140, 2021.
[22] A. A. A. Ali and S. Mallaiah, “Intelligent handwritten recognition using hybrid CNN architectures based-SVM classifier with
dropout,” Journal of King Saud University - Computer and Information Sciences, vol. 34, no. 6, pp. 3294–3300, 2022.
[23] D. Milan´es-Hermosilla, R. Trujillo Codorni´u, R. L´opez-Baracaldo, R. Sagar´o-Zamora, D. Delisle-Rodriguez, J. J. Villarejo-
Mayor, and J. R. Nu´n˜ez-A´ lvarez, “Monte Carlo Dropout for Uncertainty Estimation andMotor Imagery Classification,” Sensors,
vol. 21, no. October, pp. 1–18, oct 2021.
[24] C. Guo, M. Szemenyei, Y. Yi, W. Wang, B. Chen, and C. Fan, “SA-UNet: Spatial Attention U-Net for Retinal Vessel Segmentation,”
in 2020 25th International Conference on Pattern Recognition (ICPR), 2021, pp. 1236–1242.
[25] Faiz Nashrullah, Suryo Adhi Wibowo, and Gelar Budiman, “The Investigation of Epoch Parameters in ResNet-50 Architecture
for Pornographic Classification,” Journal of Computer, Electronic, and Telecommunication, vol. 1, no. 1, pp. 1–8, 2020.
[26] X. Wang, X. Deng, Q. Fu, Q. Zhou, J. Feng, H. Ma, W. Liu, and C. Zheng, “A Weakly-Supervised Framework for COVID-19
Classification and Lesion Localization from Chest CT,” IEEE Transactions on Medical Imaging, vol. 39, no. 8, pp. 2615–2625,
aug 2020.
[27] N. Paluru, A. Dayal, H. B. Jenssen, T. Sakinis, L. R. Cenkeramaddi, J. Prakash, and P. K. Yalavarthy, “Anam-Net: Anamorphic
Depth Embedding-Based Lightweight CNN for Segmentation of Anomalies in COVID-19 Chest CT Images,” IEEE Transactions
on Neural Networks and Learning Systems, vol. 32, no. 3, pp. 932–946, mar 2021.
[28] G. Pezzano, O. D´ıaz, V. Ribas, and P. Radeva, “CoLe-CNN+: Contect learning - Convolutional neural Network for COVID-
19-Ground-Glass-Opacities detection and segmentation,” Computers in Biology and Medicine, vol. 136, no. 104689, pp. 1–10,
[29] A. Souid, N. Sakli, and H. Sakli, “Classification and Predictions of Lung Diseases from Chest X-rays Using MobileNet V2,”
Applied Sciences, vol. 11, no. 6, pp. 1–16, mar 2021.
[30] A. Abbas, M. M. Abdelsamea, and M. M. Gaber, “Classification of COVID-19 in chest X-ray images using DeTraC deep
convolutional neural network,” Applied Intelligence, vol. 51, no. 2, pp. 854–864, feb 2021.
How to Cite
Suprihatin, B., Andriani, Y., Kurdi, F., Desiani, A., Dwi Putra, I., & Shidqi, M. (2023). Lungs X-Ray Image Segmentation and Classification of Lung Disease using Convolutional Neural Network Architectures. MATRIK : Jurnal Manajemen, Teknik Informatika Dan Rekayasa Komputer, 23(1), 67-78.