Deep learning-based classification of benign anorectal lesions on endoanal ultrasound: a proof-of-concept study
Maria João Almeida, Miguel Mascarenhas, Miguel Martins, F Mendes, Joana Mota, Pedro Cardoso, Antonio Pinto da Costa, Pedro Diaz Donoso, Pablo Farina, Matias La Francesca, Mateo Santillán, Ariadna Accialini, Pamela Jacinto, J Ferreira, B Mendes, G Macedo, Castro Poças
Benign anorectal conditions—including fissures, lacerations, and fistulas—are common and often require precise imaging for adequate diagnosis and surgical planning. Endoanal ultrasonography (EAUS) offers excellent visualization of the sphincter complex but remains underused due to operator dependency and technical complexity. Artificial intelligence (AI) may help standardize EAUS interpretation and improve diagnostic performance. The aim of the study was to develop a CNN capable of classifying common benign anorectal lesions on three-dimensional EAUS exams. A total of 201 three-dimensional EAUS exams performed between April 2022 and January 2024 were analyzed. Overall, 4722 anonymized lesion-containing frames were classified into fissures ( n = 573), external lacerations ( n = 2133), internal lacerations ( n = 1778), intersphincteric fistulas ( n = 140), and transsphincteric fistulas ( n = 98). A CNN was trained using bounding-box–guided attention to prioritize relevant lesion features. 90% of the dataset was used for training and validation, and 10% was held out for independent testing. In the independent frame-level test set, the model showed variable performance across lesion categories. Sensitivity and precision were, respectively, 96.5% and 96.5% for fissures, 76.6% and 95.9% for external lacerations, 96.6% and 77.5% for internal lacerations, 85.7% and 100.0% for intersphincteric fistulas, and 90.0% and 81.8% for transsphincteric fistulas. Macro-averaged accuracy, sensitivity, specificity, precision, and balanced accuracy were 94.8%, 89.1%, 95.9%, 90.3%, and 92.5%, respectively. The corresponding weighted-average values were 90.0%, 87.1%, 92.3%, 88.9%, and 89.7%. This retrospective, frame-level proof-of-concept study suggests that CNN-based analysis may support the automated classification of benign anorectal lesions on EAUS images, highlighting the potential of AI to standardize EAUS interpretation, and expand acess to high-quality proctologic imaging. However, the findings should be interpreted as preliminary and do not establish clinical readiness. Further studies using patient- or examination-level splitting, larger multicenter datasets, and prospective external validation are required before considering clinical implementation.