CountPath: Automating Fragment Counting in Digital Pathology
Ana Beatriz Vieira, Maria Valente, Diana Montezuma, Tomé Albuquerque, Liliana Ribeiro, Domingos Oliveira, João Monteiro, Sofia Gonçalves, Isabel M. Pinto, Jaime S. Cardoso, Arlindo L. Oliveira
TL;DR
The paper tackles the time-consuming and subjective task of counting tissue fragments on digital pathology slides to verify macroscopic reports. It introduces a hybrid counting pipeline that combines YOLOv9 for set and fragment detection with a Vision Transformer (ViT) classifier for set counting, plus a rejection mechanism based on the integrality of the fragment-to-set ratio $N_{frag}/N_{set}$. On a dataset of $3{,}253$ WSIs, the approach achieves $0.932$ accuracy without rejection and $0.949$ with rejection, with ViT set counting reaching $0.993$ precision and $0.996$ F1 for sets; interobserver reliability among seven experts is $ICC=0.814$ and Fleiss' Kappa=0.74, with the automated method attaining $0.960$ accuracy on a 100-sample subset. The results demonstrate competitive performance against human experts and offer a scalable solution to standardize quality control and reduce manual workload in digital pathology.
Abstract
Quality control of medical images is a critical component of digital pathology, ensuring that diagnostic images meet required standards. A pre-analytical task within this process is the verification of the number of specimen fragments, a process that ensures that the number of fragments on a slide matches the number documented in the macroscopic report. This step is important to ensure that the slides contain the appropriate diagnostic material from the grossing process, thereby guaranteeing the accuracy of subsequent microscopic examination and diagnosis. Traditionally, this assessment is performed manually, requiring significant time and effort while being subject to significant variability due to its subjective nature. To address these challenges, this study explores an automated approach to fragment counting using the YOLOv9 and Vision Transformer models. Our results demonstrate that the automated system achieves a level of performance comparable to expert assessments, offering a reliable and efficient alternative to manual counting. Additionally, we present findings on interobserver variability, showing that the automated approach achieves an accuracy of 86%, which falls within the range of variation observed among experts (82-88%), further supporting its potential for integration into routine pathology workflows.
