From Pixels to Pathology: The Power of CNNs in Detecting Tuberculosis




Tuberculosis, Chest x-ray images, ResNet50, InceptionV3, DenseNet121, Inception3, Model Performance


INTRODUCTION: Tuberculosis (TB) remains a significant global health threat, demanding trustworthy and effective detection techniques. This study investigates the utilization of deep learning models, specifically ResNet50, InceptionV3, AlexNet, DenseNet121, and Inception3, for diagnosing tuberculosis from chest X-ray images. With a substantial dataset comprising 4,000 chest X-ray images, sourced from seven different nations and categorized as TB-infected or normal, this research aims to evaluate the performance of various deep learning architectures in accurately distinguishing TB instances.
OBJECTIVES: The primary objective of this study is to assess the efficacy of different deep learning models in differentiating TB instances from chest X-ray images. By employing segmentation, data augmentation, and image pre-processing techniques, the research aims to enhance model performance and reliability in TB diagnosis.
METHODS: The chest X-ray image dataset, scaled to 224x224 pixels, underwent segmentation, data augmentation, and pre-processing before being fed into the deep learning models. The dataset was divided into 80% for model training and 20% for testing, utilizing a five-fold cross-validation technique. Performance evaluation metrics including accuracy, precision, recall, and F1-score were employed to assess the models' effectiveness in TB identification.
RESULTS: The findings indicate that ResNet50 and InceptionV3 models achieved near-perfect accuracy, precision, recall, and F1-scores, demonstrating their potential as reliable methods for TB identification. Despite exhibiting lower accuracy for the TB class, AlexNet also displayed good performance. However, DenseNet121 and Inception3 models showed room for improvement, particularly in precision and recall for the TB class.
CONCLUSION: This study underscores the potential of deep learning models in enhancing TB identification in chest X-ray images. It highlights the importance of segmentation, data augmentation, and image pre-processing techniques in improving model performance. Future research may explore hyperparameter tuning, alternative data augmentation strategies, and ensemble approaches to optimize the performance of these models further. Overall, this work contributes to the growing body of knowledge on the application of artificial intelligence in healthcare, particularly in disease diagnosis and detection.


Download data is not yet available.


Rahman, T., Khandakar, A., Kadir, M. A., Islam, K. R., Islam, K. F., Mazhar, R., Hamid, T., Islam, M. T., Kashem, S., Mahbub, Z. B., Ayari, M. A., & Chowdhury, M. E. H. (2020). Reliable Tuberculosis Detection using Chest X-ray with Deep Learning, Segmentation and Visualization. IEEE Access, 8, 1–1. DOI:

Shirsat, A., Kute, S., Haral, R., Patil, A., & Ubale, D. S. A. (2023). Tuberculosis Detection Using Chest X-Ray with Deep Learning and Visualization. International Journal for Research in Applied Science and Engineering Technology, 11(5), 3888–3894. DOI:

Huy, V. T. Q., & Lin, C.-M. (2023). An Improved Densenet Deep Neural Network Model for Tuberculosis Detection Using Chest X-Ray Images. IEEE Access, 11, 42839–42849. DOI:

Iqbal, A., Usman, M., & Ahmed, Z. (2022). An efficient deep learning-based framework for tuberculosis detection using chest X-ray images. Tuberculosis (Edinburgh, Scotland), 136, 102234–102234. DOI:

Acharya, V., Dhiman, G., Prakasha, K., Bahadur, P., Choraria, A., M, S., J, S., Prabhu, S., Chadaga, K., Viriyasitavat, W., & Kautish, S. (2022). AI-Assisted Tuberculosis Detection and Classification from Chest X-Rays Using a Deep Learning Normalization-Free Network Model. Computational Intelligence and Neuroscience, 2022, 1–19. DOI:

Akbari, M. N., & Azizi, A. (2023). Building a Convolutional Neural Network Model for Tuberculosis Detection Using Chest X-Ray Images. Ghalib Quarterly Journal, 1(1), 21–26. DOI:

Laeli, A. R., Rustam, Z., & Pandelaki, J. (2021). Tuberculosis Detection based on Chest X-Rays using Ensemble Method with CNN Feature Extraction. 2021 International Conference on Decision Aid Sciences and Application (DASA), 682–686. DOI:

Gabriella, I., Kamarga, S. A., & Setiawan, A. W. (2018). Early Detection of Tuberculosis using Chest X-Ray (CXR) with Computer-Aided Diagnosis. 2018 2nd International Conference on Biomedical Engineering (IBIOMED), 76–79. DOI:

Iqbal, A., Usman, M., & Ahmed, Z. (2023). Tuberculosis chest X-ray detection using CNN-based hybrid segmentation and classification approach. Biomedical Signal Processing and Control, 84, 104667. DOI:

Nkouanga, H. Y., & Vajda, S. (2021). Automatic Tuberculosis Detection Using Chest X-ray Analysis With Position Enhanced Structural Information. 2020 25th International Conference on Pattern Recognition (ICPR), 6439–6446. DOI:

Ghosh, H., Tusher, M.A., Rahat, I.S., Khasim, S., Mohanty, S.N. (2023). Water Quality Assessment Through Predictive Machine Learning. In: Intelligent Computing and Networking. IC-ICN 2023. Lecture Notes in Networks and Systems, vol 699. Springer, Singapore. DOI:

Mohanty, S.N.; Ghosh, H.; Rahat, I.S.; Reddy, C.V.R. Advanced Deep Learning Models for Corn Leaf Disease Classification: A Field Study in Bangladesh. Eng. Proc. 2023, 59, 69. DOI:

G. P. Rout and S. N. Mohanty, "A Hybrid Approach for Network Intrusion Detection," 2015 Fifth International Conference on Communication Systems and Network Technologies, Gwalior, India, 2015, pp. 614-617, doi: 10.1109/CSNT.2015.76. DOI:

Alenezi, F.; Armghan, A.; Mohanty, S.N.; Jhaveri, R.H.; Tiwari, P. Block-Greedy and CNN Based Underwater Image Dehazing for Novel Depth Estimation and Optimal Ambient Light. Water 2021, 13, 3470. DOI:

Becker, A. S., Blüthgen, C., Phi van, V. D., Sekaggya-Wiltshire, C., Castelnuovo, B., Kambugu, A., Fehr, J., & Frauenfelder, T. (2018). Detection of tuberculosis patterns in digital photographs of chest X-ray images using Deep Learning: feasibility study. The International Journal of Tuberculosis and Lung Disease, 22(3), 328–335. DOI:

Marginean, A. N., Muntean, D. D., Muntean, G. A., Priscu, A., Groza, A., Slavescu, R. R., Timbus, C. L., Munteanu, G. Z., Morosanu, C. O., Cosnarovici, M. M., & Pintea, C.-M. (2021). Reliable Learning with PDE-Based CNNs and DenseNets for Detecting COVID-19, Pneumonia, and Tuberculosis from Chest X-Ray Images. Mathematics (Basel), 9(4), 434. DOI:

Showkatian, E., Salehi, M., Ghaffari, H., Reiazi, R., & Sadighi, N. (2022). Deep learning-based automatic detection of tuberculosis disease in chest X-ray images. Polish Journal of Radiology, 87(1), e118–124. DOI:

Nguyen, Q. H., Nguyen, B. P., Dao, S. D., Unnikrishnan, B., Dhingra, R., Ravichandran, S. R., Satpathy, S., Raja, P. N., & Chua, M. C. H. (2019). Deep Learning Models for Tuberculosis Detection from Chest X-ray Images. 2019 26th International Conference on Telecommunications (ICT), 381–385. DOI:

Imam, O. T., Haque, M., Shahnaz, C., Imran, S. A., Tariqul Islam, M., & Islam, M. T. (2020). Detection of Tuberculosis from Chest X-Ray Images Based on Modified Inception Deep Neural Network Model. 2020 IEEE International Women in Engineering (WIE) Conference on Electrical and Computer Engineering (WIECON-ECE), 360–363. DOI:

Tavaziva, G., Majidulla, A., Nazish, A., Saeed, S., Benedetti, A., Khan, A. J., & Ahmad Khan, F. (2022). Diagnostic accuracy of a commercially available, deep learning-based chest X-ray interpretation software for detecting culture-confirmed pulmonary tuberculosis. International Journal of Infectious Diseases, 122, 15–20. DOI:

Kotei, E., & Thirunavukarasu, R. (2022). Ensemble Technique Coupled with Deep Transfer Learning Framework for Automatic Detection of Tuberculosis from Chest X-ray Radiographs. Healthcare (Basel), 10(11), 2335. DOI:




How to Cite

Ghosh H, P PK, Rahat IS, Hasan Nipu MM, Rama Krishna G, Ravindra JVR. From Pixels to Pathology: The Power of CNNs in Detecting Tuberculosis. EAI Endorsed Trans Perv Health Tech [Internet]. 2024 Mar. 25 [cited 2024 Apr. 25];10. Available from: