Abstract
Multi-class cell nuclei detection is a fundamental task in digital pathology, yet it remains challenging due to variations in cell morphology and density. We present the Affine-Consistent Transformer (AC-Former), a novel framework that treats nuclei detection as a direct sequence generation task. By utilizing an Adaptive Affine Transformer (AAT) and a Global-Local Collaborative Learning strategy, AC-Former achieves scale-invariant feature learning and state-of-the-art performance across multiple histopathology benchmarks, significantly reducing computational overhead compared to traditional segmentation-based methods.
Introduction
Accurate identification and classification of cell nuclei are vital for cancer diagnosis and grading. Traditional deep learning approaches typically rely on pixel-level masks, density maps, or bounding boxes. However, these methods often require expensive annotations, struggle with touching nuclei, or necessitate complex post-processing like Non-Maximum Suppression (NMS). Furthermore, standard data augmentation techniques are often "blind" to the most informative regions of an image. The AC-Former addresses these gaps by directly predicting $(x, y)$ coordinates and class labels, while adaptively learning the most effective image transformations for training.
Methods
The AC-Former architecture is built upon a transformer-based set prediction approach, utilizing deformable attention to bypass the "pixel-to-object" bottleneck.
Global-Local Collaborative Learning
The framework employs a dual-branch architecture consisting of a Global Network and a Local Network. The Global Network processes the entire image to capture broad context and acts as a teacher for the Local Network via Exponential Moving Average (EMA) updates. This collaborative learning forces the model to maintain consistency across different scales and distortions.
Adaptive Affine Transformer (AAT)
A key innovation is the AAT, a trainable module that replaces random cropping with learned affine transformations. The AAT analyzes input images to generate optimal scaling, rotation, and translation matrices, effectively "warping" the image to highlight regions most beneficial for training.
Direct Centroid Prediction
By employing the Hungarian algorithm for bipartite matching between predicted points and ground-truth centroids, the model enables end-to-end optimization. This approach eliminates the need for complex post-processing steps like watershed transforms, leading to faster inference times.
Results and Discussion
The AC-Former was evaluated on three major datasets: CoNSeP (colorectal adenocarcinoma), BRCA-M2C (breast cancer), and Lizard (a large-scale multi-tissue dataset).
Quantitative Performance
As shown in the table below, AC-Former consistently outperformed state-of-the-art methods such as Hovernet and MCSpatNet across all metrics. On the challenging Lizard dataset, it achieved a mean F-score ($\overline{F_c}$) of 0.557, a substantial improvement over the previous best of 0.474. Its detection F-score ($F_d$) of 0.782 on Lizard further demonstrates its robustness in high-density cell environments.
Computational Efficiency
Beyond accuracy, AC-Former offers significant efficiency gains. By avoiding heavy post-processing, the model achieves an inference speed of approximately 0.097 seconds per image, making it over three times faster than methods like Hovernet (~0.33 seconds).
Conclusion
The AC-Former simplifies multi-class cell nuclei detection by framing it as a direct coordinate prediction task. Through learned data augmentation and scale-consistent collaborative learning, it sets a new benchmark for accuracy and efficiency in digital pathology. Future work will focus on addressing boundary effects where nuclei are split at the edges of image patches to further improve detection reliability.
Summary updated