DOI: 10.1111/exsy.70463 ISSN: 0266-4720

TB ‐ BasilNet : Weakly Supervised Segmentation of Tuberculosis Bacilli in Ziehl–Neelsen Sputum Smear Microscopy

Cuneyt Ozdemir, Özlem Genç, Serpil Genç, Mehmet Ali Gedik

ABSTRACT

Automated segmentation of Mycobacterium tuberculosis bacilli in Ziehl–Neelsen (ZN)‐stained sputum smear images remains challenging because bacilli are extremely small, sparse, and easily confused with staining artefacts. While prior studies report competitive classification and detection results, fewer provide a segmentation‐focused analysis under realistic weak supervision, and fewer still evaluate on slides that were never seen during training. We present TB‐BasilNet , a U‐Net‐based encoder–decoder that adds three lightweight, rod‐specific components—an oriented‐line stem, orientation‐aware convolutions in the high‐resolution encoder stages, and a full‐resolution branch—at a cost of only 1.3% additional parameters, and trained from expert bounding‐box annotations converted into pseudo‐masks by stain‐aware region‐of‐interest extraction. Models were evaluated on a single‐centre dataset of 1512 images from 28 smears under a slide‐level five‐fold cross‐validation protocol with three training seeds, native‐resolution patch training and sliding‐window inference, so that every reported score reflects performance on unseen slides. TB‐BasilNet achieved the highest mean Dice among the compared architectures (0.704 versus 0.696 for U‐Net) and exceeded U‐Net in every fold, with the highest pixel‐level recall (0.736) and bacillus‐level detection recall (0.833), and with a decision threshold that degrades more gracefully than the baselines. A component study shows that global‐context and attention modules, which are common in elaborate segmentation designs, reduce performance for thin sparse targets, whereas the proposed additions improve it. Inter‐slide variation (per‐slide Dice 0.40–0.87), stain precipitate and the box‐derived super‐vision are identified as the principal remaining constraints, indicating that slide‐level validation, annotation fidelity and morphology preservation matter more than architectural complexity in ZN bacillus segmentation.

More from our Archive