INESC TEC's PerCS-DINO Beats Segment Anything at Picking Specific Cells
A new benchmark and DINOv2-based framework let a model segment only the cell type matching a single reference, across 108 categories.
Takeaways
- New Personalized Cell Segmentation task: segment all cells matching a single reference, no retraining required.
- Benchmark reorganizes 5 public datasets into 1,372 images, 110k+ cells, 108 cell types.
- PerCS-DINO combines DINOv2 ViT-L, reference-guided cross-attention, and cell-level supervised contrastive loss.
- Reaches 73.9% AP at IoU 0.3 on PerCS test, beating adapted PerSAM (24.1%) and Cellpose-SAM (46.5%).
- Generalizes to unseen cell types with 66.0% AP@0.3 on the novel split.
- Main limits: coarse masks from backbone downsampling, and reliance on a single reference cell.
Current cell-segmentation models can outline nearly every cell in a microscopy image, although many biological studies need masks for one category, such as tumor cells, rare stem cells, or a specific nucleus type. Researchers at INESC TEC, the University of Porto, and the University of Glasgow address that problem with a new task, benchmark, and baseline model that outperforms adapted versions of Segment Anything and Cellpose in the reported experiments.
The paper calls the task Personalized Cell Segmentation, or PerCS. Given a query image and one annotated reference cell, a model must segment every cell in the query that belongs to the reference category. This reference-guided approach lets users select a category without retraining the model for each new cell type.
Generic masks miss the target
Cellpose and Cellpose-SAM perform class-agnostic segmentation, producing masks for structures that appear cell-like. Images containing several cell types therefore require another step to isolate the relevant category, and existing workflows may require labeled data and task-specific retraining.
Personalized segmentation methods developed for natural images also struggle in this setting. Microscopy images contain small, densely packed cells with variable morphology, weak boundaries, and modality-specific appearances across fluorescence, bright-field, and histology images. PerCS formalizes these conditions as a dedicated reference-guided segmentation problem.
Five datasets, 108 cell types
To construct the PerCS benchmark, the authors combine five public datasets: Cellpose, YeaZ, YeastNet, BriFiSeg, and CellSAM. The resulting collection contains 1,372 images and more than 110,000 annotated cells across fluorescence, bright-field, and histology modalities. Each image was manually assigned to one of 108 cell types, with independent verification used to remove ambiguous samples.
The benchmark separates familiar and unseen categories. Its training set contains 1,186 images, while the standard test set contains 105 images with cell types represented during training. A separate novel-category split contains 81 images from previously unseen types. During training, the pipeline randomly pastes cells from different categories into the same image to simulate mixed-type microscopy scenes.
The authors also introduce PerPanNuke, a reference-guided reformulation of the PanNuke histology dataset. This benchmark tests whether a model can distinguish nucleus categories that appear morphologically similar within the same image.
Reference matching meets cell flow
The proposed baseline, PerCS-DINO, adds reference conditioning and instance decoding to a DINOv2 ViT-L backbone. The authors selected DINOv2 because its self-supervised features captured subtle visual differences more effectively than the SAM ViT encoder in their experiments.
- Reference matching: The model computes cosine similarity between the reference embedding and every query-image patch. It concatenates the resulting similarity map with the query features and projects the combined representation to 256 dimensions.
- Feature fusion: A two-layer, four-head cross-attention transformer distributes information from the reference across the query image.
- Instance decoding: The decoder predicts two Cellpose-style vector fields, which direct each foreground pixel toward its cell center, and a probability map indicating whether the pixel belongs to the reference category.
- Cell-level separation: A supervised contrastive loss pools features within each annotated cell, draws embeddings from the same category together, and separates embeddings from different categories.
Training combines mean squared error for the vector fields, binary cross-entropy for the category map, and the cell-level contrastive loss. The three losses are summed. The model trains for 60 epochs with a batch size of one on a single NVIDIA A100, using Adam, an initial learning rate of 1e-5, weight decay of 0.1, and a tenfold learning-rate reduction during the final 10 epochs. The contrastive temperature is 0.1, and inputs are cropped to 336 × 336 pixels to align with DINOv2’s 14-pixel patch size.
PerCS-DINO leads at both thresholds
The evaluation pairs predicted and ground-truth instances one to one with the Hungarian algorithm, using intersection over union, or IoU, to measure mask overlap. Results include precision, recall, and a score the paper labels AP, calculated as TP / (TP + FP + FN) at IoU thresholds of 0.3 and 0.5. This AP definition is a threshold-specific instance score rather than the area under a precision-recall curve commonly used elsewhere.
| Method | PerCS test AP@0.3 | PerCS test AP@0.5 | Novel AP@0.3 | PerPanNuke AP@0.5 |
|---|---|---|---|---|
| PerSAM | 0.241 | 0.153 | 0.249 | 0.112 |
| Cellpose-SAM, filtered | 0.465 | 0.428 | Not reported | 0.334 |
| PerCS-DINO | 0.739 | 0.655 | 0.660 | 0.364 |
On the standard PerCS test set, PerCS-DINO exceeds the filtered Cellpose-SAM baseline by 0.274 AP at IoU 0.3 and 0.227 AP at IoU 0.5. It also reaches 0.660 AP on unseen categories, compared with 0.249 for PerSAM. The Cellpose-SAM result for the novel split is omitted because those images overlap with its pretraining data.
PerSAM’s lower scores show the difficulty of transferring personalized segmentation from natural images to dense microscopy data. Cellpose-SAM records stronger recall than PerSAM, accompanied by false positives from cells outside the requested category. On PerPanNuke, PerCS-DINO improves AP@0.5 from 0.334 to 0.364, a smaller margin that reflects the visual similarity among nucleus classes.
Coarse boundaries and one-shot ambiguity
The authors identify two main limitations that affect the reported results:
- Reduced boundary detail: Backbone downsampling removes spatial information needed for precise masks. PerCS-DINO consequently falls from 0.739 AP at IoU 0.3 to 0.655 at IoU 0.5 on the standard test set.
- Limited reference coverage: One example may capture only a narrow portion of a cell type’s morphological variation. On PerPanNuke, visually similar nuclei can produce false positives even when recall remains high.
The paper proposes multiple positive and negative reference cells as a future extension. Positive examples could represent variation within the target category, while negative examples could identify nearby categories that the model should exclude.
Paper available, code absent
The paper reports acceptance at ICASSP 2026, but the manuscript links no public implementation or pretrained checkpoint. Its constituent datasets are public, and the architecture builds on the open DINOv2 backbone and Cellpose flow-field decoder.
The public source datasets and reported training settings provide a basis for reimplementation. Exact reproduction would also require the authors’ 108-type reclassification, ambiguity filtering, data splits, and mixed-scene generation procedure, making a benchmark or code release especially relevant for independent comparison.