Deep Learning Based Classification of TB and Normal Chest X-rays Using a Custom CNN with Minimal Epoch Training

  • Zharifah Muthi'ah Universitas Bina Bangsa Getsempena
  • Oktalia Triananda Lovita Universitas Bina Bangsa Getsempena
  • Mohd Iqbal Muttaqin Universitas Bina Bangsa Getsempena
Keywords: Deep learning, Medical imaging, Custom Layer, CNN, Tuberculosis

Abstract

Tuberculosis (TB) is a major global health concern and remains one of the deadliest infectious diseases, particularly in developing countries. Early and accurate diagnosis is crucial to initiate timely treatment, prevent complications, and reduce transmission rates. Conventional diagnostic methods, such as sputum tests and laboratory cultures, are often time-consuming and require specialized resources. Therefore, there is a growing need for automated, efficient, and accurate computer-aided diagnosis (CAD) systems. This study proposes a lightweight Convolutional Neural Network (CNN) architecture to classify chest X-ray images into TB and normal categories. The model is trained using the publicly available Shenzhen chest X-ray dataset, with three training durations: 10, 25, and 50 epochs. Although the model trained for 25 epochs achieved a slightly higher accuracy (86.36%) compared to the 10 epochs model (85.61%), the latter is considered more optimal due to its better balance between performance and efficiency. Specifically, the 10 epochs model produced high precision (92.86%) and a competitive F1-score (84.27%) while requiring significantly less training time and computational resources. Moreover, it maintained stable validation performance without signs of overfitting. In contrast, models trained for longer durations showed diminishing returns or performance degradation, particularly at 50 epochs. These results indicate that a shorter training cycle, when coupled with appropriate architectural design and regularization, can yield a robust and efficient classification model. This approach is particularly beneficial for deployment in resource-constrained environments, where rapid and reliable TB screening using chest X-ray images is critically needed.

Downloads

Download data is not yet available.

References

WHO, Tuberculosis Report, vol. XLIX, no. 9-10–11. 2020. [Online]. Available: https://iris.who.int/handle/10665/336069

A. Iqbal, M. Usman, and Z. Ahmed, “Tuberculosis chest X-ray detection using CNN-based hybrid segmentation and classification approach,” Biomed. Signal Process. Control, vol. 84, p. 104667, 2023, doi: https://doi.org/10.1016/j.bspc.2023.104667.

U. Ahmad et al., “Large Scale Fish Images Classification and Localization using Transfer Learning and Localization Aware CNN Architecture,” Comput. Syst. Sci. Eng., vol. 45, no. 2, pp. 2125–2140, 2023, doi: 10.32604/csse.2023.031008.

J. Ao et al., “Stimulated Raman Scattering Microscopy Enables Gleason Scoring of Prostate Core Needle Biopsy by a Convolutional Neural Network,” Cancer Res., vol. 83, no. 4, pp. 641–651, 2023, doi: 10.1158/0008-5472.CAN-22-2146.

K. Murphy et al., “Computer aided detection of tuberculosis on chest radiographs: An evaluation of the CAD4TB v6 system,” Sci. Rep., vol. 10, no. 1, pp. 1–11, 2020, doi: 10.1038/s41598-020-62148-y.

A. Abbas, M. M. Abdelsamea, and M. M. Gaber, “DeTrac: Transfer Learning of Class Decomposed Medical Images in Convolutional Neural Networks,” IEEE Access, vol. 8, pp. 74901–74913, 2020, doi: 10.1109/ACCESS.2020.2989273.

W. Ren, A. Hasanzade Bashkandi, J. Afshar Jahanshahi, A. Qasim Mohammad AlHamad, D. Javaheri, and M. Mohammadi, “Brain tumor diagnosis using a step-by-step methodology based on courtship learning-based water strider algorithm,” Biomed. Signal Process. Control, vol. 83, p. 104614, 2023, doi: https://doi.org/10.1016/j.bspc.2023.104614.

M. K. Puttagunta and S. Ravi, “Detection of Tuberculosis based on Deep Learning based methods,” J. Phys. Conf. Ser., vol. 1767, no. 1, 2021, doi: 10.1088/1742-6596/1767/1/012004.

K. Jin et al., “MSHF: A Multi-Source Heterogeneous Fundus (MSHF) Dataset for Image Quality Assessment,” Sci. Data, vol. 10, no. 1, pp. 1–6, 2023, doi: 10.1038/s41597-023-02188-x.

J. Escorcia-Gutierrez, M. Gamarra, R. Soto-Diaz, S. Alsafari, A. Yafoz, and R. F. Mansour, “Optimal Synergic Deep Learning for COVID-19 Classification Using Chest X-Ray Images,” Comput. Mater. Contin., vol. 75, no. 3, pp. 5255–5270, 2023, doi: 10.32604/cmc.2023.033731.

A. Wong, J. R. H. Lee, H. Rahmat-Khah, A. Sabri, A. Alaref, and H. Liu, “TB-Net: A Tailored, Self-Attention Deep Convolutional Neural Network Design for Detection of Tuberculosis Cases From Chest X-Ray Images,” Front. Artif. Intell., vol. 5, no. April, pp. 1–10, 2022, doi: 10.3389/frai.2022.827299.

S. A. Salloum, K. M. Alomari, A. M. Alfaisal, R. A. Aljanada, and A. Basiouni, “Emotion recognition for enhanced learning: using AI to detect students’ emotions and adjust teaching methods,” Smart Learn. Environ., vol. 12, no. 1, 2025, doi: 10.1186/s40561-025-00374-5.

M. Irhamsyah, Q. A’yuni, K. Saddami, N. Nasaruddin, K. Munadi, and F. Arnia, “Impact of Using Various X-Ray Dataset in Detecting Tuberculosis Based on Deep Learning,” Radioelectron. Comput. Syst., vol. 2025, no. 1(113), pp. 165–186, 2025, doi: 10.32620/reks.2025.1.12.

S. Jaeger, S. Candemir, S. Antani, Y.-X. J. Wáng, P.-X. Lu, and G. Thoma, “Two public chest X-ray datasets for computer-aided screening of pulmonary diseases.,” Quant. Imaging Med. Surg., vol. 4, no. 6, pp. 475–477, Dec. 2014, doi: 10.3978/j.issn.2223-4292.2014.11.20.

Q. A’yuni, N. Nasaruddin, M. Irhamsyah, M. Azhary, and R. Roslidar, “Intelligent Tuberculosis Detection System with Continuous Learning on X-ray Images,” J. Electron. Electromed. Eng. Med. Informatics, vol. 7, no. 1, pp. 130–141, 2025, doi: 10.35882/jeeemi.v7i1.572.

A. Ahmadiar, M. Melinda, Z. Muthiah, Z. Zainal, and M. M. Rizky, “Thermal Image Classification of Autistic Children Using Res-Net Architecture,” vol. 7, no. 1, pp. 1–10, 2025.

Published
2025-07-14
How to Cite
[1]
Z. Muthi’ah, Oktalia Triananda Lovita, and Mohd Iqbal Muttaqin, “Deep Learning Based Classification of TB and Normal Chest X-rays Using a Custom CNN with Minimal Epoch Training”, JI, vol. 10, no. 2, pp. 272-279, Jul. 2025.