Improving Automated Tuberculosis Diagnosis in Chest X-Rays Through U-Net Lung Segmentation and Domain-Specific CNN Classification
Keywords:
Deep Learning; U-Net; Convolutional Neural Network; Chest X-Ray; Medical Image Analysis; Lung Segmentation; Tuberculosis.Abstract
Tuberculosis (TB) is a life-threatening infectious disease caused by Mycobacterium tuberculosis that remains among the leading causes of preventable mortality worldwide, with over 10 million new cases and 1.6 million deaths reported in 2022. Delayed or inaccurate diagnosis in resource-constrained settings significantly contributes to disease spread. To address this challenge, we propose a two-stage deep learning pipeline for automated TB detection from chest X-ray (CXR) images. In the first stage, a U-Net architecture performs lung segmentation, achieving a Dice coefficient of 0.9592 and a Jaccard Index of 0.9217, ensuring precise delineation of the pulmonary region of interest. In the second stage, a custom Convolutional Neural Network (CNN) classifies the segmented images as TB-positive or normal, attaining 98% accuracy, 98% precision, and 99% recall for normal images, and 98% accuracy, 98% precision, and 94% recall for TB-positive images. These results consistently outperform existing approaches, including MobileNet-based transfer learning, HOG+LBP feature fusion, and standard CNN methods. The proposed pipeline demonstrates strong potential as a scalable, fast, and accurate diagnostic aid, particularly suited for deployment in resource-limited clinical environments where radiologist capacity is constrained.
References
[1] Ronneberger, O., Fischer, P., & Brox, T. (2015). U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), LNCS 9351, pp. 234–241. Springer. https://doi.org/10.1007/978-3-319-24574-4_28
[2] Jaeger, S., Candemir, S., Antani, S., Wang, Y. X. J., Lu, P. X., & Thoma, G. (2014). Two public chest X-ray datasets for computer-aided screening of pulmonary diseases. Quantitative Imaging in Medicine and Surgery, 4(6), 475–477.
[3] World Health Organization. (2022). Global Tuberculosis Report 2022. WHO Press, Geneva. https://www.who.int/publications/i/item/9789240061729
[5] Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press. https://www.deeplearningbook.org
[6] Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR). https://arxiv.org/abs/1412.6980
[7] He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778. https://doi.org/10.1109/CVPR.2016.90
[11] Hansun, S., Nathaniel, A., Miduk, S. A., Wicaksana, A., & Kristanda, M. B. (2023). Machine and deep learning for tuberculosis detection on chest X-rays: Systematic literature review. Journal of Medical Internet Research, 25, e43154. https://doi.org/10.2196/43154
[12] Ayaz, M., Shaukat, F., & Raja, G. (2021). Ensemble learning based automatic detection of tuberculosis in chest X-ray images using hybrid feature descriptors. Physical and Engineering Sciences in Medicine, 44(1), 183–194. https://doi.org/10.1007/s13246-020-00966-0
[13] Ibrahim, A. U., Ozsoz, M., Serte, S., Al-Turjman, F., & Yakoi, P. S. (2021). Pneumonia classification using deep learning from chest X-ray images during COVID-19. Cognitive Computation, 1–13. https://doi.org/10.1007/s12559-020-09787-5
[14] Gelaw, Y., Getaneh, Z., & Melku, M. (2021). Anemia as a risk factor for tuberculosis: A systematic review and meta-analysis. Environmental Health and Preventive Medicine, 26(1), 13. https://doi.org/10.1186/s12199-020-00931-z
[15] Gröschel, M. I., Walker, T. M., van der Werf, T. S., Lange, C., & Niemann, S. (2021). GenTB: A user-friendly genome-based predictor for tuberculosis resistance powered by machine learning. Genome Medicine, 13(1), 138. https://doi.org/10.1186/s13073-021-00953-4
[16] Ullah, U., Ali, M. Y., Khan, M. I., & Nadeem, M. (2022). Tuberculosis diagnosis from sputum using Raman spectroscopy. Biomedical Vibrational Spectroscopy 2022: Advances in Research and Industry, 11942. https://doi.org/10.1117/12.2608594
[19] Park, M., Lee, J., Park, J., Park, C., & Chang, H. (2023). Distinguishing nontuberculous mycobacterial lung disease and Mycobacterium tuberculosis lung disease on X-ray images using deep transfer learning. BMC Infectious Diseases, 23(1), 43. https://doi.org/10.1186/s12879-023-07996-5
[21] Wajgi, R., Thirumalaisamy, R., Bhagat, S., & Shetty, A. (2024). Optimized tuberculosis classification system for chest X-ray images: Fusing hyperparameter tuning with transfer learning approaches. Engineering Reports. https://doi.org/10.1002/eng2.12900
[22] Rahman, T., Khandakar, A., Qiblawey, Y., Tahir, A., Kiranyaz, S., Kashem, S. B. A., & Chowdhury, M. E. H. (2024). TB-CXRNet: Tuberculosis and drug-resistant tuberculosis detection technique using chest X-ray images. Cognitive Computation, 16(3), 1393–1412. https://doi.org/10.1007/s12559-024-10259-3
[23] Smith, J. P., Bregman, S., & Whalen, C. C. (2023). Machine learning to predict bacteriologic confirmation of Mycobacterium tuberculosis in infants and very young children. PLOS Digital Health, 2(5), e0000249. https://doi.org/10.1371/journal.pdig.0000249
[24] D.R., Sreevalli, B. M., Jayaprashanth, S., & Pradeep, N. (2024). DeepXray: A deep learning system for TB detection and severity prediction. Proceedings of the 2024 IEEE International Conference on I2CT. https://doi.org/10.1109/i2ct61223.2024.10543961
[25] Genitha, C. H., Evangeline, J. P., Kavitha, C. S., & Martin, J. (2023). Automated framework for the tuberculosis detection and classification in X-ray images using deep learning algorithm. 2023 International Conference on Self Sustainable Artificial Intelligence Systems (ICSSAS). https://doi.org/10.1109/icssas57918.2023.10331715
[26] Hossain, M. B., Emon, M. M. H., Islam, M. S., & Kabir, M. N. (2024). An effective identification of tuberculosis in chest X-rays using convolutional neural network model. 6th International Conference on Electrical Engineering and Information & Communication Technology (ICEEICT). https://doi.org/10.1109/iceeict62016.2024.10534374
[32] Singh, M., Punn, N. S., Agarwal, S., & Gupta, S. K. (2022). Evolution of machine learning in tuberculosis diagnosis: A review of deep learning-based medical applications. Electronics, 11(17), 2634. https://doi.org/10.3390/electronics11172634
[33] Amin, S. U., Hossain, M. S., & Alhamid, M. F. (2024). An automated chest X-ray analysis for COVID-19, tuberculosis, and pneumonia employing ensemble learning approach. Biomedical Signal Processing and Control, 87, 105408. https://doi.org/10.1016/j.bspc.2023.105408
[34] Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., & Batra, D. (2017). Grad-CAM: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pp. 618–626. https://doi.org/10.1109/ICCV.2017.74
[35] Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems (NeurIPS), 30. https://proceedings.neurips.cc/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html
