Abstract
In low-resource areas, the most common method of tuberculosis (TB) diagnosis is visual identification of rod-shaped TB bacilli in microscopic images of sputum smears. We present an algorithm for automated TB detection using images from digital microscopes such as CellScope, a novel, portable device capable of brightfield and fluorescence microscopy. Automated processing on such platforms could save lives by bringing healthcare to rural areas with limited access to laboratory-based diagnostics. Our algorithm applies morphological operations and template matching with a Gaussian kernel to identify candidate TB-objects. We characterize these objects using Hu moments, geometric and photometric features, and histograms of oriented gradients and then perform support vector machine classification. We test our algorithm on a large set of CellScope images (594 images corresponding to 290 patients) from sputum smears collected at clinics in Uganda. Our object-level classification performance is highly accurate, with Average Precision of 89.2%±2.1%. For slide-level classification, our algorithm performs at the level of human readers, demonstrating the potential for making a significant impact on global healthcare.
Introduction
Tuberculosis remains one of the world’s deadliest infectious diseases, particularly in low-resource areas. The current "gold standard" for diagnosis—bacterial culture—takes weeks to yield results. Consequently, the most common diagnostic method is manual microscopy, where a technician must spend hours identifying tiny, rod-shaped bacilli in sputum smears.
This manual process is riddled with bottlenecks: it requires expensive laboratory infrastructure, highly trained staff, and is prone to human error caused by fatigue and inter-evaluator variability. There is an urgent need for a portable, automated diagnostic tool that can provide rapid, consistent results in rural or underserved clinics.
Mobile Microscopy Hardware
The proposed solution utilizes the CellScope, a portable microscope that leverages a mobile phone camera for imaging. This device is designed for field use, providing a scalable alternative to traditional laboratory-based fluorescence microscopy (FM).
Automated Detection Pipeline
The researchers developed a three-stage automated detection pipeline specifically optimized for fluorescence images captured by the CellScope:
- Candidate TB-Object Identification: To isolate potential bacilli, the algorithm applies a white top-hat transform to reduce background noise, followed by template matching with a Gaussian kernel. This process highlights bright spots, which are then binarized into "candidate" objects.
- Feature Representation: Each candidate is described by a 102-dimensional feature vector. This includes 8 Hu Moments (for rotation and scale invariance), 14 geometric/photometric descriptors (such as area and eccentricity), and 80 Histograms of Oriented Gradients (HOG) features to capture local shape.
- Discriminative Classification: The system utilizes an Intersection Kernel (IK) SVM for classification. To diagnose a patient at the slide level, the algorithm averages the scores of the top three highest-probability objects found on the slide.
Experimental Results
The study utilized a real-world dataset from clinics in Uganda, consisting of 594 CellScope images from 290 patients. The dataset was nearly balanced, with 296 TB-positive and 298 TB-negative images. Ground truth was established via laboratory culture results and manual labeling by expert human readers.
- Object-Level Accuracy: The system achieved an Average Precision (AP) of 89.2% ± 2.1% in identifying individual bacilli.
- Slide-Level Diagnosis: The IKSVM classifier reached a slide-level Average Precision of 92.3% and an Average Specificity of 88.0%.
- Human-Level Performance: The algorithm performed at a level statistically comparable to expert human readers, significantly outperforming previous baseline methods such as GMM-based approaches (~79.7% AP).
Discussion and Conclusion
A key insight of this work is the "Top K" strategy; by averaging the top three candidate objects, the algorithm mimics the human technician's process of searching for the most convincing evidence to confirm a diagnosis. Furthermore, combining HOG features with rotation-invariant Hu moments proved essential for handling the random orientations of bacteria on a slide.
While highly effective, the current system faces limitations. The 8-bit monochrome camera used in the CellScope ignores color information that could be useful in brightfield microscopy. Additionally, the algorithm remains dependent on the quality of chemical staining. Future work will focus on optimizing the pipeline for real-time processing on mobile devices and expanding the system's capabilities to handle various staining qualities.
Summary updated