TB Research

Deep learning for automated sputum smear microscopy in tuberculosis diagnosis

Kokane C, Deshpande NA, Bhute HA, Sarode HJ, Kodmelwar MK, Chavan S

The Indian journal of tuberculosis · 2025-11

Abstract

Background Tuberculosis (TB) is one of the world's major health issues, especially in low- and middle-income nations without many diagnostic methods. TB is a widespread global disease that continues to be a problem of low-income countries. Sputum smear microscopy is often the gold standard, although hand-identifying Acid-Fast Bacilli (AFB) can be tedious and subjective, leading to errors. Deep learning may automate and improve microscopy-based TB diagnosis, saving time and accuracy. Methods A study suggested deep learning to detect AFB in sputum smears. This is achievable with CNN designs. Experienced microbiologists hand-labelled a selection of clinical laboratory Ziehl-Neelsen stained sputum smear photos. A new training dataset of 8000 digitized microscopy images (collected from clinical laboratories and manually annotated by 3 experienced microbiologists) was used to train and validate three convolutional neural network (CNN) architectures, a custom CNN, ResNet50 and EfficientNetB0. The data were pre-processed, normalized and specifically augmented with the goal of improving robustness to staining and illumination variations, the class-weighted binary cross-entropy loss and minority over-sampling were utilized to treat the class imbalance (positive vs. negative fields [?] 1:4). Result Model evaluation was done using accuracy, precision, recall, F1-score, and AUC-ROC. When compared to ResNet50, the baseline CNN, EfficientNetB0 produced 92 % accuracy, 89.1 % sensitivity, 94.5 % AUC that made it the best architecture among those evaluated. The results show that, the modern deep learning architectures can match the performance of experts in terms of microscopy performance and can significantly reduce the time for analysis. Conclusion This work shows that deep learning models, notably EfficientNet, can automate TB sputum smear microscopy. The suggested method may help resource-constrained settings achieve high-throughput screening, decrease diagnostic delays, and eliminate human error. Next, the model will be integrated into a portable, point-of-care diagnostic device and tested in clinical workflows across varied geographies.

MeSH terms

  • Sputum
  • Humans
  • Mycobacterium tuberculosis
  • Tuberculosis, Pulmonary
  • Microscopy
  • Deep Learning
  • Neural Networks, Computer