Segmentation of Tuberculosis Lungs on Computer Tomography Images




pathology segmentation, neural network, tuberculosis, U-Net, artificial intelligence, training networks


Background. Tuberculosis is a chronic lung disease that occurs due to a bacterial infection and is one of the top ten causes of human death. As part of the automated diagnostic system, the detecting tuberculosis lesions on computed tomograms of the lungs in automatic mode is an urgent task.

Objective. We are aimed to solve the lungs segmentation tuberculosis-affected areas problem on computer tomograms using digital image processing based on U-networks.

Methods. The data for training the network were provided by the specialists of National Institute of Phthisiology and Pulmonology named after F.V. Yanovsky, NAMS of Ukraine. We performed the image segmentation by applying artificial intelligence using the convolutional neural network UNet, which has been developed for medical segmentation tasks. We considered three versions of UNet networks with different parameter values. A feature of U-Net is the absence of fully connected layers. This network is an example of an encoder-decoder architecture, which shows high results in problems of semantic image segmentation. In the last two models, we applied the technique of early stopping of training which avoids the effect of overfitting the network. The number of training epochs is set with a margin, and the process of training network parameters stops as soon as the model performance stops improving on the test data set.

Results. The data set was divided into 320 samples (80%) for training, 40 samples (10%) for testing, and 40 samples (10%) for the exam. The effectiveness of the developed models was evaluated by the parameters: Precision, Recall, and Matthews correlation coefficient. The final model provides high performance on the exam, such as accuracy of 0.82, sensitivity of 0.75, Matthews correlation coefficient of 78%.

Conclusions. The conducted studies using the UNet network allowed us to obtain high results for the segmentation of tuberculosis lesions on computed tomography images. The proposed network will be used in the further development of diagnostic systems for tuberculosis.


Tuberculosis prevalence surveys: a handbook. Geneva: World Health Organization; 2011.

Chest radiography in tuberculosis detection: summary of current WHO recommendations and guidance on programmatic approaches. Geneva: World Health Organization; 2016. 39 p.

Lakhani P, Sundaram B. Deep learning at chest radiography: automated classification of pulmonary tuberculosis by using convolutional neural networks. Radiology. 2017;284(2):574-82. DOI: 10.1148/radiol.2017162326

Ronneberger O, Fischer P, Brox T. U-Net: convolutional networks for biomedical image segmentation. arXiv [Preprint] 2015. arXiv:1505.04597.

Bondina MM, Kalmychkov AS, Kriventsov VE. Comparative analysis of algorithms filtration of medical images. Herald of the National Technical University KhPI Subject Issue Information Science and Modelling. 2012;38:14-25.

Hwang S, Kim HE, Jeong J, Kim HJ. A novel approach for tuberculosis screening based on deep convolutional neural networks. In: Proceedings of SPIE 9785, Medical Imaging 2016 Computer-Aided Diagnosis; 2016 Mar 24. DOI: 10.1117/12.2216198

Liu C, Cao Y, Alcantara M, Liu B, Brunette M, Peinado J, et al. TX-CNN: detecting tuberculosis in chest X-ray images using convolutional neural network. In: IEEE International Conference on Image Processing; 2017. p. 2314-8. DOI: 10.1109/ICIP.2017.8296695

Hooda R, Sofat S, Kaur S, Mittal A, Meriaudeau F. Deep-learning: a potential method for tuberculosis detection using chest radiography. In: IEEE International Conference on Signal and Image Processing Applications; 2017; p. 497-502. DOI: 10.1109/ICSIPA.2017.8120663

Pedrazzoli D, Lalli M, Boccia D, Houben R, Kranzer K. Can tuberculosis patients in resource-constrained settings afford chest radiography? Eur Respir J. 2017;49(3):1601877. DOI: 10.1183/13993003.01877-2016

Nair V, Hinton GE. Rectified linear units improve restricted Boltzmann machines. In: Proceedings of the 27th International Conference on Machine Learning; 2010.

Ramachandran P, Zoph B, Le QV. Searching for activation functions. arXiv [Preprint] 2017. arXiv:1710.05941.

Swanly VE, Selvam L, Kumar PM, Renjith JA, Arunachalam M, Shunmuganathan KL. Smart spotting of pulmonary TB cavities using CT images. Comput Math Methods Med. 2013;2013:864854. DOI: 10.1155/2013/864854

Mossa AA, Eris H, Çevik U. Ensemble of deep learning models for automatic tuberculosis diagnosis using chest CT scans: contribution to the ImageCLEF-2020 challenges. In: Working notes of conference and labs of the evaluation forum; 2020 Sep 22-25; Thessaloniki.

Kalinovsky A, Liauchuk V, Tarasau A. Lesion detection in ct images using deep learning semantic segmentation technique. Int Arch Photogramm Remote Sens Spatial Inf Sci. 2017;XLII-2/W4;13-7. DOI: 10.5194/isprs-archives-XLII-2-W4-13-2017

Ayaz M, Shaukat F, Raja G. Ensemble learning based automatic detection of tuberculosis in chest X-ray images using hybrid feature descriptors. Phys Eng Sci Med. 2021;44(1):183-94. DOI: 10.1007/s13246-020-00966-0

Lopes UK, Valiati JF. Pre-trained convolutional neural networks as feature extractors for tuberculosis detection. Comput Biol Med. 2017;89(1):135-43. DOI: 10.1016/j.compbiomed.2017.08.001

Xu T, Cheng I, Long R, Mandal M. Novel coarse-to-fine dual scale technique for tuberculosis cavity detection in chest radiographs. EURASIP J Image Video Process. 2013;2013(1). DOI: 10.1186/1687-5281-2013-3

Rajaraman S, Folio LR, Dimperio J, Alderson PO, Antani SK. Improved semantic segmentation of tuberculosis-consistent findings in chest X-rays using augmented training of modality-specific U-Net models with weak localizations. Diagnostics (Basel). 2021;11(4):616. DOI: 10.3390/diagnostics11040616



How to Cite

Voronchuk , N., Bovsunovska, K., Davydko, A., Lynnyk, M., Мatviichuck O., Pavlov , A., & Nastenko, I. (2021). Segmentation of Tuberculosis Lungs on Computer Tomography Images. Innovative Biosystems and Bioengineering, 5(2), 117–124.