# Optimizing TB Bacteria Detection Efficiency: Utilizing RetinaNet-Based Preprocessing Techniques for Small Image Patch Classification

**Authors:** Shwetha V., Barnini Banerjee, Vijaya Laxmi, Priya Kamath

PMC · DOI: 10.1155/ijbi/3559598 · 2025-10-05

## TL;DR

This paper presents an automated TB detection system using a two-stage AI pipeline that improves accuracy and efficiency in analyzing ZN-stained microscopy images.

## Contribution

A novel two-stage pipeline using RetinaNet with dilated convolutions for efficient TB bacilli detection and classification in microscopy images.

## Key findings

- The RetinaNet model achieved 0.94 average precision for WBCs and 0.97 for TB bacilli.
- The proposed CNN classifier achieved 93% classification accuracy, outperforming traditional CNNs.

## Abstract

Tuberculosis (TB), caused by Mycobacterium tuberculosis, is a re-emerging disease that necessitates early and accurate detection. While Ziehl–Neelsen (ZN) staining is effective in highlighting bacterial morphology, automation significantly accelerates the diagnostic workflow. However, detecting TB bacilli—which are typically much smaller than white blood cells (WBCs)—in stained images remains a considerable challenge. This study leverages the ZNSM-iDB dataset, which comprises approximately 2000 publicly available images captured using different staining methods. Notably, 800 images are fully stained with the ZN technique. We propose a novel two-stage pipeline where a RetinaNet-based object detection model functions as a preprocessing step to localize and isolate TB bacilli and WBCs from ZN-stained images. To address the challenges posed by low spatial resolution and background interference, the RetinaNet model is enhanced with dilated convolutional layers to improve fine-grained feature extraction. This approach not only facilitates accurate detection of small objects but also achieves an average precision (AP) of 0.94 for WBCs and 0.97 for TB bacilli. Following detection, a patch-based convolutional neural network (CNN) classifier is employed to classify the extracted regions. The proposed CNN model achieves a remarkable classification accuracy of 93%, outperforming other traditional CNN architectures. This framework demonstrates a robust and scalable solution for automated TB screening using ZN-stained microscopy images.

## Linked entities

- **Diseases:** Tuberculosis (MONDO:0018076)
- **Species:** Mycobacterium tuberculosis (taxon 1773)

## Full-text entities

- **Diseases:** TB (MESH:D014376)
- **Chemicals:** ZN (-)
- **Species:** Mycobacterium tuberculosis (species) [taxon 1773]

## Figures

10 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12515574/full.md

---
Source: https://tomesphere.com/paper/PMC12515574