Machine learning techniques for bacteria detection in lungs using optical endomicroscopy images
Item Status
Embargo End Date
Date
Authors
Abstract
Pneumonia, a severe respiratory infection, presents a high mortality risk, particularly in critical care settings. The disease often requires prompt and accurate detection of bacterial presence in the lungs to guide appropriate antimicrobial therapy. Current diagnostic methods, including imaging techniques like X-rays and CT scans, lack the specificity needed for timely bacterial detection, often leading to delays, increased risks for patients, and the potential for antimicrobial resistance (AMR) due to the prolonged use of empirical broad-spectrum antibiotics. OEM facilitates real-time acquisition of in vivo and in situ optical biopsies, thus expediting bacterial detection. Nonetheless, visually analysing the vast number of images generated by the OEM in real time can be challenging, potentially impeding timely intervention. In this regard, the thesis introduces novel unsupervised and supervised machine learning methodologies to enhance detection accuracy and efficiency in OEM images.
Initially, a benchmark unsupervised approach was developed, leveraging a Hierarchical Bayesian Model (HBM) tailored specifically for bacterial detection in OEM images. This model effectively distinguishes bacterial presence by treating it as an outlier within the OEM image. The HBM utilizes probabilistic modeling to represent the OEM images as a combination of background intensity, random noise, and discrete shape bacteria. This probabilistic framework enables the model to isolate bacterial regions without requiring labeled data, which is particularly valuable given the scarcity of annotated OEM images. The detection process is further refined through an iterative algorithm that systematically identifies and removes bacteria one at a time. This iterative approach minimizes computational demands by sequentially focusing on individual bacterial detections, bypassing the need to calculate the full posterior distribution of all possible bacterial locations in each image. As a result, the HBM approach achieves high detection accuracy, establishing a robust baseline for bacterial detection in OEM images.
Secondly, EmiNet, is a supervised model specifically designed to leverage the temporal aspect of bacterial movement in sequences of OEM images, distinguish ing it from previous single frame approaches. By combining Convolutional Neural Networks (CNN) with Transformer architecture, EmiNet integrates both spatial and temporal features within a unified framework, allowing it to effectively iden tify bacteria that display subtle, frame-to-frame motion, as often observed due to airflow in lung tissue. This hybrid structure enables EmiNet to model moving bacteria with high precision, which is critical for enhancing bacteria detection. To train EmiNet, a novel synthetic dataset generation strategy was developed to simulate realistic bacterial motion patterns. This dataset incorporates two primary motion types informed by expert observations in clinical data. The use of this synthetic data enables EmiNet to learn motion-specific characteristics without relying on extensive real data annotations, which are challenging to obtain. By reflecting these motion patterns, EmiNet not only enhances detection performance but also addresses one of the primary limitations of single frame approaches, enabling more accurate segmentation in real-time applications. Finally, Back2Seg is introduced as a two-stage model that refines bacterial segmentation by focusing on background estimation from OEM image sequences.
This method aims to improve bacteria detection performance by accurately isolating bacteria from complex backgrounds that include various tissue structures and autofluorescent elements. The model begins with a CNN-Transformer network designed to estimate background information from the sequence of OEM images, effectively capturing the consistent patterns and features of the background tissue that remain stable across frames. This background estimation stage filters out non-bacterial elements by generating a clean background image sequence, which serves as a reference to identify bacteria more precisely in the subsequent segmentation phase. In the second stage, Back2Seg uses both the original OEM sequence and the estimated background sequence as inputs to refine the segmentation of bacteria. By incorporating background information, the model can more accurately distinguish bacteria. This dual-input approach allows Back2Seg to focus on bacterial features with enhanced specificity, improving detection accu racy. Back2Seg demonstrates improvements over both the Bayesian approach and EmiNet on certain performance metrics, offering a balanced compromise between the two methods.
Overall, this thesis significantly advances bacterial detection in OEM images by introducing novel machine-learning techniques that address key limitations of existing methods. The methodologies developed here not only enhance the accuracy and efficiency of bacterial detection but also pave the way for real-time diagnostic applications, potentially transforming the management of pneumonia and other infectious diseases. By enabling rapid, targeted clinical decisions, this work can help reduce unnecessary patient exposure to broad-spectrum treatments, ultimately helping to mitigate the progression of AMR. Furthermore, future work can focus on refining these models, exploring more complex bacterial motion patterns, and integrating advanced generative models to create even more realistic synthetic datasets.
This item appears in the following Collection(s)

