Deep Learning-Based Automatic Detection and Diagnosis of Tuberculosis from Chest X-ray Images: A Comprehensive Analysis

Main Article Content

Paschal C. Ahanotu
Deborah A. Adedigba
Raza Hasan
Sellappan Palaniappan

Abstract

Tuberculosis (TB) continues to be one of the foremost public health issues in the world, and remains the second most salient communicable cause of death after COVID-19. In 2022, TB accounted for 10.6 million new infections and 1.3 million deaths globally. Conventional diagnostic approaches involving sputum smear microscopy, culture assays, and GeneXpert MTB/RIF are characterized by excessive turnaround times, elevated costs, and dependency on specialised infrastructure and trained personnel. These constraints are exacerbated in resource-poor countries, resulting in delayed diagnosis, delayed therapy initiation, and enhanced disease transmission. This work investigates the application of deep learning algorithms to automatically diagnose TB from chest X-ray images as a promising alternative method of diagnosis. The evolution of machine learning and deep learning technologies offers novel opportunities to address these diagnostic dilemmas because TB manifests apparent characteristics, such as pleural thickening, fibrosis, infiltration, masses, and nodules that are resolvable from chest X-ray images. We trained and tested four state-of-the-art convolutional neural networks (CNNs), that is, VGG16, ResNet50, InceptionV3, and DenseNet121, on a dataset of 4,200 chest X-rays with 700 positive TB cases and 3,500 normal cases. The approach comprises extensive data preprocessing, applying transfer learning techniques, balancing classes through weighted class consideration, and rigorous task evaluation using measures such as accuracy, precision, recall, and F1-score. DenseNet121 yielded the best-performing model with a total accuracy of 98.0% and balanced sensitivity and specificity between the two classes. The deep learning method proposed in this study holds great promise for enhancing the TB diagnosis accuracy, speed, and accessibility, particularly in resource-poor settings. This work finds critical applications in bridging the gap between diagnosing and treating TB and offers a scalable and cost-effective method for early diagnosis and prompt intervention in global TB control measures.

Article Details

How to Cite
Ahanotu, P. C. ., Adedigba, D. A. ., Hasan, R., & Palaniappan, S. . (2026). Deep Learning-Based Automatic Detection and Diagnosis of Tuberculosis from Chest X-ray Images: A Comprehensive Analysis. Journal of Informatics and Web Engineering, 5(1), 69–85. https://doi.org/10.33093/jiwe.2026.5.1.5
Section
Regular issue

References

World Health Organization, Global Tuberculosis Report 2023. Geneva, Switzerland: WHO, 2023. [Online]. Available: https://www.who.int/teams/global-tuberculosis-programme/tb-reports/global-tuberculosis-report-2023

World Health Organization, “Tuberculosis (TB),” Oct. 2023. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/tuberculosis

Centers for Disease Control and Prevention, “Tuberculosis: Risk Factors,” Mar. 2023. [Online]. Available: https://www.cdc.gov/tb/topic/basics/risk.htm

S. Jaeger, S. Candemir, S. Antani, Y. Xue, A. J. Clifford, J. Browning, and G. Thoma, “Two public chest X-ray datasets for computer-aided screening of pulmonary diseases,” Quantitative Imaging in Medicine and Surgery, vol. 4, no. 6, pp. 475–477, 2014.

Y. Dong, X. Ma, W. Guo, and J. Li, “Learning to read chest X-ray images from 16000+ examples using CNN,” in Proceedings of the 7th International Conference on Intelligent Computing and Signal Processing (ICSP), 2022, pp. 1097–1101, doi: 10.1109/ICSP54964.2022.9778636.

C. C. Boehme, P. Nabeta, R. Hillemann, D. Nicol, J. Shenai, F. Krapp, and M. D. Perkins, “Rapid molecular detection of tuberculosis and rifampin resistance,” The New England Journal of Medicine, vol. 363, no. 11, pp. 1005–1015, Sep. 2010, doi: 10.1056/NEJMoa0907847.

A. MacGregor-Fairlie, N. Akrami, J. W. Tay, and A. Wahid, “Tuberculosis diagnosis using machine learning and chest X-ray images,” Medical Hypotheses, vol. 138, pp. 109612, May 2020, doi: 10.1016/j.mehy.2020.109612.

O. Hrizi, M. Neji, and M. Ammar, “Tuberculosis disease diagnosis based on an optimized machine learning model,” Journal of Healthcare Engineering, vol. 2022, Art. no. 8950243, Jan. 2022, doi: 10.1155/2022/8950243.

K. S. Mithra, W. S. Emmanuel, and M. Suresh, “A deep learning approach for automatic detection and classification of tuberculosis using chest X-ray images,” Biomedical Signal Processing and Control, vol. 71, pp. 103227, Jan. 2022, doi: 10.1016/j.bspc.2021.103227.

S. Hwang, H. Kim, J. Choi, and K. Kang, “A novel approach for tuberculosis screening based on deep convolutional neural networks,” in Proceedings of SPIE Medical Imaging, vol. 10950, pp. 109501Z, Mar. 2019, doi: 10.1117/12.2512749.

C. H. Genitha, A. K. Tyagi, and S. U. Aswathy, “Deep learning model for tuberculosis detection in chest X-rays,” in Intelligent Systems Design and Applications, Cham, Switzerland: Springer, 2023, pp. 684–693, doi: 10.1007/978-3-031-14651-2_62.

M. A. Hossain, A. S. Haque, S. A. Fattah, and C. Shahnaz, “Deep learning approaches for tuberculosis screening using chest X-ray images: A comparative study,” Computers in Biology and Medicine, vol. 145, pp. 105486, Jun. 2022, doi: 10.1016/j.compbiomed.2022.105486.

A. Karaca, S. Ünver, H. K. Akay, and A. Öztürk, “Tuberculosis detection in chest X-rays using deep learning,” in Proceedings of the International Conference on Innovation and Intelligence for Informatics, Computing, and Technologies (3ICT), 2021, pp. 490–494, doi: 10.1109/3ICT53449.2021.9581908.

Y. C. Shu and M. Liu, “Enabling accurate tuberculosis diagnosis through deep learning on patient CXR images,” in Proceedings of the 2nd International Conference on Algorithms, Data Mining, and Information Technology (ADMIT), 2023, pp. 40–45, doi: 10.1145/3625403.3625411.

T. Rahman, A. Khandakar, and M. E. H. Chowdhury, “Tuberculosis (TB) chest X-ray database,” IEEE Dataport, Oct. 2020, doi: 10.21227/mps8-kb56.

U. K. Lopes, E. V. T. da Silva, A. A. Júnior, and V. R. Q. Leithardt, “DenseNet-201 for tuberculosis classification,” Medical Image Analysis, vol. 77, pp. 102368, May 2022, doi: 10.1016/j.media.2022.102368.

X. Liu, J. Xu, H. Zhang, and Y. He, “TB-Net: A tailored deep learning approach for tuberculosis detection,” IEEE Journal of Biomedical and Health Informatics, vol. 26, no. 4, pp. 1735–1744, Apr. 2022, doi: 10.1109/JBHI.2021.3138765.

T. Rahman, M. Khandakar, A. Khandakar, Y. Qiblawey, and M. E. H. Chowdhury, “Reliable tuberculosis detection using chest X-ray with deep learning, segmentation and visualization,” IEEE Access, vol. 8, pp. 191586–191601, 2020, doi: 10.1109/ACCESS.2020.3031384.

World Health Organization, WHO Target Product Profiles for Tuberculosis Screening, WHO/HTM/TB/2022.04, 2022. [Online]. Available: https://www.who.int/publications/i/item/9789240044863

P. Rajpurkar, J. Irvin, K. Zhu, B. Yang, H. Mehta, T. Duan, and A. Y. Ng, “CheXNet: Radiologist-level pneumonia detection on chest X-rays,” arXiv: 1711.05225.

F. Pasa, V. Golkov, and D. Cremers, “Efficient training of CNNs with randomly weighted layers for extreme learning machines,” IEEE Transactions on Neural Networks and Learning Systems, vol. 32, no. 6, pp. 2467–2478, Jun. 2021, doi: 10.1109/TNNLS.2020.3005881.

M. Mirugwe, D. Brown, R. Thomas, and S. Vyas, “Improving tuberculosis detection in chest X-ray images through transfer learning and deep learning: Comparative study of convolutional neural network architectures,” JMIRx Medicine, vol. 6, no. 1, e66029, 2025.

M. A. Khan, S. Naz, M. U. Akram, A. M. Basit, and A. F. Hanif, “An explainable artificial intelligence model for multiple lung diseases classification from chest X-ray images,” Malaysian Journal of Computer Science, vol. 37, no. 2, pp. 121–135, 2024.

Most read articles by the same author(s)

1 2 > >>