Segmentation of Chest X-Ray Images Using U-Net Model

Keywords: U-Net, Segmentation, Deep learning, Coronavirus, lung, X-ray, CNN


Medical imaging, such as chest X-rays, gives an acceptable image of lung functions.  Manipulating these images by a radiologist is difficult, thus delaying the diagnosis. Coronavirus is a disease that affects the lung area. Lung segmentation has a significant function in assessing lung disorders. The process of segmentation has seen widespread use of deep learning algorithms. The U-Net is one of the most significant semantic segmentation frameworks for a convolutional neural network. In this paper, the proposed U-Net architecture is evaluated on 565 datasets divided into 500 training images and 65 validation images, For chest X-ray. The findings of the experiments demonstrate that the suggested strategy successfully achieved competitive outcomes with 91.47% and 89.18% accuracy, 0.7494 and 0.7480 IoU, 19.23% and 26.11% loss for training and validation images, respectively.

Author Biography

Mohammed Y. Kamil, College of Science, Mustansiriyah University, Baghdad, Iraq

Mohammed Y. Kamil holds a Master of Science (M.Sc.) in optics from Mustansiriyah university in 2005. and Ph.D. in digital image processing from Mustansiriyah university, Iraq, in 2011, besides several professional certificates and skills. He is currently a professor with the physics department at Mustansiriyah University, Baghdad, Iraq. He is a member of the Institute of Electrical and Electronics Engineers (IEEE) and an editor in the Iraqi Journal of Physics. His research areas of interest include medical image processing, computer vision, and Artificial Intelligence. He can be contacted at email:


Alquran, H., Alsleti, M., Alsharif, R., Qasmieh, I. A., Alqudah, A. M., and Harun, N. H. B. Employing texture features of chest xray images and machine learning in covid-19 detection and classification. MENDEL Journal 27, 1 (2021), 9–17.

Amami, R., Al Saif, S. A., Amami, R., Eleraky, H. A., Melouli, F., and Baazaoui, M. The use of an incremental learning algorithm for diagnosing covid-19 from chest x-ray images. MENDEL Journal 28, 1 (2022), 1–7.

Chen, X., Yao, L., and Zhang, Y. Residual attention u-net for automated multi-class segmentation of covid-19 chest ct images. arXiv preprint arXiv:2004.05645 (2020).

Falk, T., Mai, D., Bensch, R., Cicek, O., Abdulkadir, A., Marrakchi, Y., Bohm, A., Deubner, J., Jackel, Z., Seiwald, K., et al. U-net: deep learning for cell counting, detection, and morphometry. Nature methods 16, 1 (2019), 67–70.

Fernandez-Moral, E., Martins, R., Wolf, D., and Rives, P. A new metric for evaluating semantic segmentation: leveraging global and contour accuracy. In 2018 IEEE intelligent vehicles symposium (iv) (2018), IEEE, pp. 1051–1056.

Furutani, K., Hirano, Y., and Kido, S. Segmentation of lung region from chest x-ray images using u-net. In International Forum on Medical Imaging in Asia 2019 (2019), vol. 11050, SPIE, pp. 165–169.

Kamil, M. Y. Morphological gradient in brain magnetic resonance imaging based on intuitionistic fuzzy approach. In 2016 Al-Sadeq International Conference on Multidisciplinary in IT and Communication Science and Applications (AICMITCSA) (2016), IEEE, pp. 1–3.

Li, Y., Dong, X., Shi, W., Miao, Y., Yang, H., and Jiang, Z. Lung fields segmentation in chest radiographs using dense-u-net and fully connected crf. In Twelfth International Conference on Graphics and Image Processing (ICGIP 2020) (2021), vol. 11720, SPIE, pp. 297–304.

Liu, X., Zhang, Y., Jing, H., Wang, L., and Zhao, S. Ore image segmentation method using u-net and res unet convolutional networks. RSC advances 10, 16 (2020), 9396–9406.

Munawar, F., Azmat, S., Iqbal, T., Gronlund, C., and Ali, H. Segmentation of lungs in chest x-ray image using generative adversarial networks. IEEE Access 8 (2020), 153535–153545.

Park, J., Yun, J., Kim, N., Park, B., Cho, Y., Park, H. J., Song, M., Lee, M., and Seo, J. B. Fully automated lung lobe segmentation in volumetric chest ct with 3d u-net: validation with intra-and extra-datasets. Journal of digital imaging 33, 1 (2020), 221–230.

Radhi, E. A., and Kamil, M. Y. Breast tumor detection via active contour technique. International Journal of Intelligent Engineering and Systems 14, 4 (2021), 561–570.

Radhi, E. A., and Kamil, M. Y. Breast tumor segmentation in mammography image via chanvese technique. Indonesian Journal of Electrical Engineering and Computer Science 22, 2 2021), 809–817.

Rahman, M. F., Tseng, T.-L. B., Pokojovy, M., Qian, W., Totada, B., and Xu, H. An automatic approach to lung region segmentation in chest x-ray images using adapted u-net architecture. In Medical Imaging 2021: Physics of Medical Imaging (2021), vol. 11595, SPIE, pp. 894–901.

Rajakumar, G., Leela, R. S. J., Darney, P. E., Narayanan, K. L., Krishnan, R. S., and Robinson, Y. H. Seg-net: Automatic lung infection segmentation of covid-19 from ct images. In 2021 5th International Conference on Trends in Electronics and Informatics (ICOEI) (2021), IEEE, pp. 739–744.

Rajaraman, S., Folio, L. R., Dimperio, J., Alderson, P. O., and Antani, S. K. Improved semantic segmentation of tuberculosis—consistent findings in chest x-rays using augmented training of modality-specific u-net models with weak localizations. Diagnostics 11, 4 (2021), 616.

Rashid, R., Akram, M. U., and Hassan, T. Fully convolutional neural network for lungs segmentation from chest x-rays. In International Conference Image Analysis and Recognition (2018), Springer, pp. 71–80.

Saood, A., and Hatem, I. Covid-19 lung ct image segmentation using deep learning methods: U-net versus segnet. BMC Medical Imaging 21, 1 (2021), 1–10.

Shamsolmoali, P., Zareapoor, M., Wang, R., Zhou, H., and Yang, J. A novel deep structure u-net for sea-land segmentation in remote sensing images. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 12, 9 (2019), 3219–3232.

Waiker, D., Baghel, P. D., Varma, K. R., and Sahu, S. P. Effective semantic segmentation of lung x-ray images using u-net architecture. In 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC) (2020), IEEE, pp. 603–607.

Xie, F., Huang, Z., Shi, Z., Wang, T., Song, G., Wang, B., and Liu, Z. Duda-net: a double u-shaped dilated attention network for automatic infection area segmentation in covid-19 lung ct images. International Journal of Computer Assisted Radiology and Surgery 16, 9 (2021), 1425–1434.

Yan, Q., Wang, B., Gong, D., Luo, C., Zhao, W., Shen, J., Shi, Q., Jin, S., Zhang, L., and You, Z. Covid-19 chest ct image segmentation–a deep convolutional neural network solution. arXiv preprint arXiv:2004.10987 (2020).

Zhang, X., Han, L., Sobeih, T., Han, L., Dempsey, N., Lechareas, S., Tridente, A., Chen, H., and White, S. Cxr-net: An encoderdecoder- encoder multitask deep neural network for explainable and accurate diagnosis of covid-19 pneumonia with chest x-ray images. arXiv preprint arXiv:2110.10813 (2021).

Zhang, X., Wang, G., and Zhao, S.-G. Covseg-net: A deep convolution neural network for covid-19 lung ct image segmentation. International Journal of Imaging Systems and Technology 31, 3 (2021), 1071–1086.

How to Cite
Kamil, M. and Hashem, S. 2022. Segmentation of Chest X-Ray Images Using U-Net Model. MENDEL. 28, 2 (Dec. 2022), 49-53. DOI:
Research articles