Towards fully automated analysis of sputum smear microscopy images

  • Marios Zachariou

Student thesis: Doctoral Thesis (PhD)


Sputum smear microscopy is used for diagnosis and treatment monitoring of pulmonary tuberculosis (TB). Automation of image analysis can make this technique less laborious and more consistent. This research employs artificial intelligence to improve automation of Mycobacterium tuberculosis (Mtb) cell detection, bacterial load quantification, and phenotyping from fluorescence microscopy images.

I first introduce a non-learning, computer vision (CV) approach for bacteria detection, employing ridge-based approach using the Hessian matrix to detect ridges of Mtb bacteria, complemented by geometric analysis. The effectiveness of this approach is
assessed through a custom metric using the Hu moment vector. Results demonstrate lower performance relative to literature metrics, motivating the need for deep learning (DL) to capture bacterial morphology.

Subsequently, I develop an automated pipeline for detection, classification, and counting of bacteria using DL techniques. Firstly, Cycle-GANs transfer labels from labelled to unlabeled fields of view (FOVs). Pre-trained DL models are used for subsequent classification and regression tasks. An ablation study confirms pipeline efficacy, with a count error within 5%.

For downstream analysis, microscopy slides are divided into tiles, each of which is sequentially cropped and magnified. A subsequent filtering stage eliminates non-salient FOVs by applying pre-trained DL models along with a novel method that employs dual convolutional neural network (CNN)-based encoders for feature extraction: one encoder is dedicated to learning bacterial appearance, and the other focuses on bacterial shape, which both precede into a bottleneck of a smaller CNN classifier network. The proposed model outperforms others in accuracy, yields no false positives, and excels across decision thresholds.

Mtb cell lipid content and length may be related to antibiotic tolerance, underscoring the need to locate bacteria within paired FOV images stained with distinct cell identification and lipid detection, and to measure bacterial dimensions. I employ a
proposed UNet-like model for precise bacterial localization. By combining CNNs and feature descriptors, my method automates reporting of both lipid content and cell length. Application of the approaches described here may assist clinical TB care
and therapeutics research.
Date of Award3 Dec 2024
Original languageEnglish
Awarding Institution
  • University of St Andrews
SupervisorDerek James Sloan (Supervisor) & Oggie Arandelovic (Supervisor)


  • Fluorescence
  • Microscopy
  • Tuberculosis
  • Mycobacterium tuberculosis
  • Machine learning
  • Computer vision
  • Classification
  • Regression
  • Segmentation
  • Treatment monitoring

Access Status

  • Full text open

Cite this