Research Article | | Peer-Reviewed

Enhancing Early Tuberculosis Detection Using CGAN Augmentation and Deep Transfer Learning Models

Received: 13 October 2025     Accepted: 29 October 2025     Published: 28 November 2025
Views:       Downloads:
Abstract

Tuberculosis (TB) remains a leading infectious disease worldwide, and early, reliable screening using chest X-rays (CXRs) is essential in low-resource settings. The scarcity of labeled TB-positive CXR images limits the effectiveness of deep learning models. This study investigates whether Conditional Generative Adversarial Networks (CGANs) can generate realistic TB-positive CXR images to balance training data and improve the classification performance of fine-tuned deep transfer learning (DTL) models. We trained a CGAN (LSGAN formulation) to synthesize class-conditional grayscale CXR images at 128x128 resolution and used the generated images to augment the Shenzhen TB dataset. Three pre-trained DTL architectures (DenseNet121, VGG16, and MobileNetV3Small) were fine-tuned on both original and CGAN-augmented datasets. Experiments used stratified 70/10/20 train/validation/test splits and a fixed random seed (random_state=42) to ensure reproducibility. Model performance was evaluated using accuracy, precision, recall (sensitivity), F1-score, confusion matrices, and ROC/AUC curves. The experiments were executed on an NVIDIA Tesla P100 GPU (16GB) in a Kaggle runtime environment; total CGAN+classifier processing reported a wall-clock runtime of 39 minutes 30 seconds for the baseline experimental run. CGAN augmentation produced consistent improvements across models: DenseNet121 improved from 93.0% to 94.6% test accuracy, VGG16 improved from 96.3% to 96.8%, and MobileNetV3Small improved from 93.0% to 93.5%. Class-conditional GAN augmentation can modestly but usefully improve DTL classifier performance in TB detection when labeled data are scarce, though further cross-dataset validation is required before clinical deployment.

Published in International Journal of Data Science and Analysis (Volume 11, Issue 6)
DOI 10.11648/j.ijdsa.20251106.14
Page(s) 186-204
Creative Commons

This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited.

Copyright

Copyright © The Author(s), 2025. Published by Science Publishing Group

Keywords

Tuberculosis Detection, CGAN, Deep Transfer Learning, Medical Imaging, CNN, Data Augmentation

References
[1] Chen, X., Li, J., & Zhang, W. (2020). Advanced statistical change detection in sequential MRI analysis. IEEE Transactions on Medical Imaging, 39(11), 3542–3554.
[2] Frid-Adar, M., Klang, E., Amitai, M., Goldberger, J., & Greenspan, H. (2018). Synthetic data augmentation using GAN for improved liver lesion classification. IEEE Transactions on Medical Imaging, 38(3), 915–928.
[3] Nyambura, L., Imboga, H., & Waititu, A. (2024). A likelihood-based multiple change point algorithm for count data with allowance for over-dispersion. Journal of Applied Statistics, 51(2), 241–259.
[4] Goram Mufarah M Alshmrani et al. “A deep learning architecture for multi-class lung diseases classification using chest X-ray (CXR) images”. In: Alexandria Engineering Journal 64 (2023), pp. 923–935.
[5] Sivaramakrishnan Rajaraman and Sameer K Antani. “Modality-specific deep learning model ensembles toward improving TB detection in chest radiographs”. In: IEEE Access 8 (2020), pp. 27318–27326.
[6] Mehdi Mirza and Simon Osindero. “Conditional generative adversarial nets”. In: arXiv preprint arXiv: 1411.1784 (2014).
[7] Y. Hou et al. “Medical Image Synthesis and Augmentation Using Conditional Generative Adversarial Networks”. In: Journal of Medical Imaging and Health Informatics 15.2 (2025). Preprint or forthcoming, 2025, pp. 145–156.
[8] Brian Ngugi et al. “Utilization of digital tools to enhance COVID-19 and tuberculosis testing and linkage to care: a cross-sectional evaluation study among Bodaboda riders in the Nairobi Metropolis, Kenya”. In: PLOS ONE 18.6 (2023), e0287305.
[9] Sagar Kora Venu. “Improving the generalization of deep learning classification models in medical imaging using transfer learning and generative adversarial networks”. In: International Conference on Agents and Artificial Intelligence. Springer. 2021, pp. 218–235.
[10] Suresh Sankaranarayanan and Akshat Khare. “Implementing Data Augmentation Techniques Using Conditional Generative Adversarial Network-Based upon Chest X-Ray Images”. In: Intelligent Systems Conference. Springer. 2024, pp. 531–541.
[11] Wei Wen, Yanan Bai, and Weidong Cheng. “Generative Adversarial Learning Enhanced Fault Diagnosis for Planetary Gearbox under Varying Working Conditions”. In: Sensors 20.6 (2020), p. 1685.
[12] Alex Mirugwe, Lillian Tamale, and Juwa Nyirenda. “Improving Tuberculosis Detection in Chest X-ray Images through Transfer Learning and Deep Learning: A Comparative Study of CNN Architectures”. In: medRxiv (2024), pp. 2024–08.
[13] Kevser Sahinbas and Ferhat Ozgur Catak. “Transfer learning-based convolutional neural network for COVID-19 detection with X-ray images”. In: Data science for COVID-19. Elsevier, 2021, pp. 451–466.
[14] Linh T Duong et al. “Detection of tuberculosis from chest X-ray images: Boosting the performance with vision transformer and transfer learning”. In: Expert Systems with Applications 184 (2021), p. 115519.
[15] Pius Miri Ng’ang’a et al. “Modelling Diabetes Mellitus among Adult Kenyan Population Using Artificial Neural Network”. In: American Journal of Applied Mathematics and Statistics 6.5 (2018), pp. 183–189.
[16] Osman Güler and Kemal Polat. “Classification Performance of Deep Transfer Learning Methods for Pneumonia Detection from Chest X-Ray Images”. In: Journal of Artificial Intelligence and Systems 4 (Aug. 2023), pp. 107–126.
[17] Anthony G. Waititu, N. Wanjiru, and P. Kariuki. “Spatial Heterogeneity Modeling Using Machine Learning Based on a Hybrid of Random Forest and Convolutional Neural Network”. In: International Journal of Scientific Research and Engineering Development 7.2 (2024), pp. 421–430.
[18] T. Rahman et al. “Reliable Tuberculosis Detection Using Chest X-Ray with Deep Learning, Segmentation and Visualization”. In: IEEE Access 8 (2020), pp. 191586–191601.
[19] Priyanka Saha. “An Ensemble CNN-Dempster Shafer based tuberculosis detection from chest x-ray images”. In: 2022 IEEE Calcutta Conference (CALCON). 2022, pp. 228–232.
[20] Kyeongjin Ann et al. “Generation of high-resolution chest X-rays using multi-scale conditional generative adversarial network with attention”. In: Journal of Broadcast Engineering 25.1 (2020), pp. 1–12.
[21] Tomohiro Kikuchi et al. “Synthesis of Hybrid Data Consisting of Chest Radiographs and Tabular Clinical Records Using Dual Generative Models for COVID-19 Positive Cases”. In: Journal of Imaging Informatics in Medicine (2024), pp. 1–11.
[22] Laith Alzubaidi et al. “MedNet: pre-trained convolutional neural network model for the medical imaging tasks”. In: arXiv preprint arXiv: 2110.06512 (2021).
[23] Lucas C Ribas, Wallace Casaca, and Ricardo T Fares. “Conditional Generative Adversarial Networks and Deep Learning Data Augmentation: A Multi-Perspective Data-Driven Survey Across Multiple Application Fields and Classification Architectures”. In: AI 6.2 (2025), p. 32.
[24] Mark Sandler et al. “MobileNetV2: Inverted Residuals and Linear Bottlenecks”. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2018, pp. 4510–4520.
[25] Gao Huang et al. “Densely Connected Convolutional Networks”. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 2017, pp. 4700– 4708.
Cite This Article
  • APA Style

    Kamau, T. W., Waititu, A., Imboga, H., Mwelu, S. (2025). Enhancing Early Tuberculosis Detection Using CGAN Augmentation and Deep Transfer Learning Models. International Journal of Data Science and Analysis, 11(6), 186-204. https://doi.org/10.11648/j.ijdsa.20251106.14

    Copy | Download

    ACS Style

    Kamau, T. W.; Waititu, A.; Imboga, H.; Mwelu, S. Enhancing Early Tuberculosis Detection Using CGAN Augmentation and Deep Transfer Learning Models. Int. J. Data Sci. Anal. 2025, 11(6), 186-204. doi: 10.11648/j.ijdsa.20251106.14

    Copy | Download

    AMA Style

    Kamau TW, Waititu A, Imboga H, Mwelu S. Enhancing Early Tuberculosis Detection Using CGAN Augmentation and Deep Transfer Learning Models. Int J Data Sci Anal. 2025;11(6):186-204. doi: 10.11648/j.ijdsa.20251106.14

    Copy | Download

  • @article{10.11648/j.ijdsa.20251106.14,
      author = {Teresia Waithera Kamau and Anthony Waititu and Herbert Imboga and Susan Mwelu},
      title = {Enhancing Early Tuberculosis Detection Using CGAN Augmentation and Deep Transfer Learning Models},
      journal = {International Journal of Data Science and Analysis},
      volume = {11},
      number = {6},
      pages = {186-204},
      doi = {10.11648/j.ijdsa.20251106.14},
      url = {https://doi.org/10.11648/j.ijdsa.20251106.14},
      eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.ijdsa.20251106.14},
      abstract = {Tuberculosis (TB) remains a leading infectious disease worldwide, and early, reliable screening using chest X-rays (CXRs) is essential in low-resource settings. The scarcity of labeled TB-positive CXR images limits the effectiveness of deep learning models. This study investigates whether Conditional Generative Adversarial Networks (CGANs) can generate realistic TB-positive CXR images to balance training data and improve the classification performance of fine-tuned deep transfer learning (DTL) models. We trained a CGAN (LSGAN formulation) to synthesize class-conditional grayscale CXR images at 128x128 resolution and used the generated images to augment the Shenzhen TB dataset. Three pre-trained DTL architectures (DenseNet121, VGG16, and MobileNetV3Small) were fine-tuned on both original and CGAN-augmented datasets. Experiments used stratified 70/10/20 train/validation/test splits and a fixed random seed (random_state=42) to ensure reproducibility. Model performance was evaluated using accuracy, precision, recall (sensitivity), F1-score, confusion matrices, and ROC/AUC curves. The experiments were executed on an NVIDIA Tesla P100 GPU (16GB) in a Kaggle runtime environment; total CGAN+classifier processing reported a wall-clock runtime of 39 minutes 30 seconds for the baseline experimental run. CGAN augmentation produced consistent improvements across models: DenseNet121 improved from 93.0% to 94.6% test accuracy, VGG16 improved from 96.3% to 96.8%, and MobileNetV3Small improved from 93.0% to 93.5%. Class-conditional GAN augmentation can modestly but usefully improve DTL classifier performance in TB detection when labeled data are scarce, though further cross-dataset validation is required before clinical deployment.},
     year = {2025}
    }
    

    Copy | Download

  • TY  - JOUR
    T1  - Enhancing Early Tuberculosis Detection Using CGAN Augmentation and Deep Transfer Learning Models
    AU  - Teresia Waithera Kamau
    AU  - Anthony Waititu
    AU  - Herbert Imboga
    AU  - Susan Mwelu
    Y1  - 2025/11/28
    PY  - 2025
    N1  - https://doi.org/10.11648/j.ijdsa.20251106.14
    DO  - 10.11648/j.ijdsa.20251106.14
    T2  - International Journal of Data Science and Analysis
    JF  - International Journal of Data Science and Analysis
    JO  - International Journal of Data Science and Analysis
    SP  - 186
    EP  - 204
    PB  - Science Publishing Group
    SN  - 2575-1891
    UR  - https://doi.org/10.11648/j.ijdsa.20251106.14
    AB  - Tuberculosis (TB) remains a leading infectious disease worldwide, and early, reliable screening using chest X-rays (CXRs) is essential in low-resource settings. The scarcity of labeled TB-positive CXR images limits the effectiveness of deep learning models. This study investigates whether Conditional Generative Adversarial Networks (CGANs) can generate realistic TB-positive CXR images to balance training data and improve the classification performance of fine-tuned deep transfer learning (DTL) models. We trained a CGAN (LSGAN formulation) to synthesize class-conditional grayscale CXR images at 128x128 resolution and used the generated images to augment the Shenzhen TB dataset. Three pre-trained DTL architectures (DenseNet121, VGG16, and MobileNetV3Small) were fine-tuned on both original and CGAN-augmented datasets. Experiments used stratified 70/10/20 train/validation/test splits and a fixed random seed (random_state=42) to ensure reproducibility. Model performance was evaluated using accuracy, precision, recall (sensitivity), F1-score, confusion matrices, and ROC/AUC curves. The experiments were executed on an NVIDIA Tesla P100 GPU (16GB) in a Kaggle runtime environment; total CGAN+classifier processing reported a wall-clock runtime of 39 minutes 30 seconds for the baseline experimental run. CGAN augmentation produced consistent improvements across models: DenseNet121 improved from 93.0% to 94.6% test accuracy, VGG16 improved from 96.3% to 96.8%, and MobileNetV3Small improved from 93.0% to 93.5%. Class-conditional GAN augmentation can modestly but usefully improve DTL classifier performance in TB detection when labeled data are scarce, though further cross-dataset validation is required before clinical deployment.
    VL  - 11
    IS  - 6
    ER  - 

    Copy | Download

Author Information
  • Sections