Thales Francisco Mota Carvalho, Vívian Ludimila Aguiar Santos, João Victor Boechat Gomide, Lida Jouca de Assis Figueredo, Silvana Spíndola de Miranda, Ricardo de Oliveira Duarte, Frederico Gadelha Guimarães
The microscopic detection of Mycobacterium tuberculosis bacilli in Ziehl-Neelsen (ZN)-stained sputum smears remains essential for tuberculosis (TB) diagnosis, but it is limited by inter-observer variability, high operational workload, and a shortage of qualified specialists. Deep learning (DL) has shown strong potential to support this task; however, progress is constrained by the limited availability of well-annotated datasets and the lack of standardized evaluation protocols. This study presents a comprehensive investigation of DL-based object detection methods for TB bacillus identification, comprising (i) a systematic comparison of seven detectors, (ii) the introduction of a new annotated ZN-stained dataset containing 500 images, and (iii) an image-partitioning strategy designed to mitigate the performance degradation caused by heterogeneous image resolutions. Three public datasets and the proposed dataset were evaluated using cross-validation and cross-dataset experiments. Among the seven methods tested, Faster R-CNN consistently achieved the highest overall precision, sensitivity, F1-score, and average precision across datasets. The proposed partitioning strategy significantly improved detection performance, particularly for large images. Cross-dataset experiments revealed limited generalization across laboratories, underscoring the importance of standardized datasets and context-aware training. Overall, the proposed dataset and experimental findings offer practical guidance for future research toward robust, clinically deployable AI-assisted TB diagnostic workflows.