TB Research

CNN-based image recognition of Acid-Fast Bacilli in sputum smears for enhanced tuberculosis diagnosis

Kokane C, Deshpande NA, Dhawas N, Deore SP, Kodmelwar MK, Bhandari MA

The Indian journal of tuberculosis · 2025-10

Abstract

Background Tuberculosis (TB) is still one of the deadliest infectious illnesses in the world, especially in countries with low or middle income. An early and correct evaluation is very important for treating diseases effectively and stopping them from spreading. The most common way to diagnose is through sputum smear microscopy, which includes finding Acid-Fast Bacilli (AFB) by hand under a microscope. But this method has some problems, like sensitivity that changes, the need for skilled microscopists, and mistakes made by people. Recent improvements in AI, particularly Convolutional Neural Networks (CNNs), could make AFB identification easier and more accurate. Methods This study suggests using CNN-based image recognition to automatically find AFB in sputum smear pictures. A large set of data was gathered from clinical labs. It included thousands of high-resolution pictures of AFB-positive and -negative samples. To make a ground truth collection, expert microbiologists labelled these pictures by hand. Techniques for adding more data were used to make the model more stable. Several CNN designs were tested, such as custom models and transfer learning methods that use ResNet50 and VGG16. A divided training-validation split was used to train the models, and the Adam optimiser and binary cross-entropy loss function were used to make them work better. Results The ResNet50 transfer learning model did better than the others, with a 95.5 % AUC-ROC, 93.2 % accuracy, 91.7 % precision, and 92.4 % recall. With over 90 % precision and an F1-score, the modified CNN also showed that it could compete. Adding more data and transfer learning made generalisation better and cut down on overfitting. The confusion matrix study showed that ResNet50 had better sensitivity and specificity, which is important for TB detection because it reduces the number of false positives. Conclusion The suggested CNN structure automatically finds AFB in sputum smear pictures, which improves the accuracy and regularity of diagnosis. This method can make the job of microscopists easier, cut down on mistakes in diagnosis, and improve TB treatment, especially in places with few resources. To make models more reliable and useful in the real world, more study should be done on adding more diagnostic tools and larger datasets.

MeSH terms

  • Sputum
  • Humans
  • Mycobacterium tuberculosis
  • Tuberculosis, Pulmonary
  • Microscopy
  • Sensitivity and Specificity
  • Neural Networks, Computer