CS Paper Radar

DINO-KNN: Training-Free Multiclass In-Context Segmentation via Nearest Neighbors

Hussain Alasmawi, Numan Saeed, Mohammad Yaqub

cs.CV ·submitted 2026-11-18 14:47 UTC · v1

Abstract

In-context segmentation (ICS) segments a target image given a few annotated reference images. Recent training-free methods built on frozen foundation models segment one class at a time and gain little from additional references. We study the multiclass, multi-reference setting and ask how far a simple joint decision rule can go. We introduce DINO-KNN, which stores every labeled reference patch of a frozen DINOv3 encoder in a single memory and labels each target patch by a distance-weighted vote of its k nearest neighbors. All classes are predicted in a single pass, with one label per pixel, without training or a mask decoder. We evaluate on eight datasets, four natural and four medical, with R=1 to 15 reference images and three reference seeds. DINO-KNN achieves the best average mIoU at every R; it is the best method on six of the eight datasets from R=3 and on seven of the eight from R=7. Its accuracy continues to grow with the number of references, from 37.8 mIoU at R=1 to 56.2 at R=15, while the strongest baseline, INSID3, rises from 36.1 to 42.9. DINO-KNN is also 2.1x faster than INSID3. The code will be made public.

Closest papers

Nearest neighbours by meaning across the whole index.

CAST: Calibrating Correspondences for Training-Free Biomedical In-Context Segmentation

cs.CV ·2026-11-17 ·Mingze Jiang, Jiashu Han, Haonan Chen, Zhiyi Li, Yilun Du +1 more
similarity 0.69
Abstract · 10 pages, 6 figures

Biomedical image segmentation must keep up with new anatomical structures, subjects, imaging modalities, and acquisition protocols, yet dense expert annotations are scarce and models trained on one cohort often struggle to transfer. In-context segmentation (ICS) offers a way out: a new structure is specified by a few annotated exemplars at inference time. However, reliable correspondence remains challenging in biomedical images, where adjacent structures often share similar appearances, and variations across subjects and imaging conditions further obscure their distinctions. We introduce CAST, a training-free framework built on a frozen DINOv3 backbone to calibrate fine-grained correspondences. Its stability test improves feature reliability at both global and patch-specific levels, while its coherence test assesses whether candidate correspondences are supported by consistent local structural context. Together, these tests enable more reliable correspondence across diverse anatomical structures and imaging conditions. Across eight biomedical benchmarks spanning 2D and 3D segmentation, cross-subject, and cross-modality transfer, CAST outperforms the strongest overall baseline by 12.34 percentage points in Dice and ranks first across all six volumetric settings. The versatility of CAST further opens up opportunities for challenging biomedical applications, including 2D-to-3D segmentation and atlas label transfer.

0.24

One-Shot Adaptive Segmentation For Scientific Images

cs.CV ·2026-10-07 ·Tejaswi V. Panchagnula, Allison M. Davis, Fengqing Zhu
similarity 0.65
Abstract

Scientific image segmentation methods rely on extensive annotation and task-specific training, limiting adaptation across imaging modalities and experimental conditions. We present a training-free, one-shot framework that specializes vision foundation models using a single annotated reference image. The framework combines DINOv3 representations with background-adaptive feature orthogonalization to suppress artifact-related feature directions, after which cosine similarity localizes candidate regions for SAM segmentation. We evaluate the framework on red-blood-cell microscopy, structured-illumination pool boiling, and chest radiography. Relative to the strongest baseline, the proposed method improves mean IoU by 5.91% and 78.62% on the microscopy and pool-boiling datasets, respectively, while achieving comparable performance on chest radiographs. These results demonstrate that one-shot reference conditioning can adapt general-purpose vision models to specialized scientific segmentation tasks.

0.18

INCISE: Training-Free In-Context Segmentation of Surgical Videos

cs.CV cs.AI ·2026-11-19 ·Yifan Xu, Bofang Zheng, Guangyu Meng, Nishchal Sapkota, Xianshi Ma +3 more
similarity 0.65
Abstract

Surgical video analysis requires video object segmentation (VOS), yet existing methods are commonly based on pretrained model fine-tuning using a large number of expert labels. In-context segmentation (ICS) offers the promise of bypassing this high cost by segmenting a target video using a few annotated references, which are the sole source of surgical knowledge for a frozen model. However, existing ICS methods tend to draw such references at random, which concentrate on a few views that dominate a surgical video and can miss other objects of interest (e.g., transient instruments and small structures). To address these challenges, we propose INCISE, a training-free ICS framework for surgical videos. INCISE selects unlabeled frames from multiple surgical videos that jointly cover the local appearances of a target video, and then segments the target video using these references. With only 1.7% of training frames selected and annotated as references and no target video frame labeled, INCISE obtains 67.2% mean mIoU and outperforms the best SOTA fine-tuned method by 9.2 points. We hope INCISE can help establish ICS as a practical alternative to fine-tuning in surgical video analysis and other domains with a costly labeling burden.

0.16

Leveraging Segmentation Representations for Efficient Classification: A Self-Configuring Framework Based on nnU-Net

cs.CV cs.AI ·2026-11-17 ·Renjun Cai, Antonio Javier Gallego, Félix Fuentes-Hurtado
benchmark similarity 0.64
Abstract

We propose a self-configuring framework that extends the nnU-Net workflow to both segmentation and classification in 3D medical imaging. Building on nnU-Net's self-configuring method, the framework reuses representations learned by a segmentation model for image-level classification. Its encoder features and predicted segmentation probabilities are used by a lightweight classifier. Two information-sharing strategies are investigated. In the frozen-backbone branch, features are augmented with region-of-interest information, predicted foreground volume, and segmentation confidence. In the adaptation branch, the final encoder stage is partially fine-tuned for classification, with an auxiliary segmentation loss to preserve segmentation-related information. Additional five-fold experiments showed that more complex configurations did not consistently improve classification performance. On the public validation leaderboard, our selected framework achieved an Overall score of 0.8056. In the official FLARE 2026 Task 2 final evaluation, our framework ranked first overall, achieving the highest DSC, NSD, and AUROC across all four testing tasks, including two hidden testing tasks. Local inference measurements also remained below the challenge limits of $60 \mathrm{s}$ per case and $4 \mathrm{GB}$ GPU memory. These results demonstrate the practical value of reusing segmentation representations for classification while maintaining a simple and efficient framework.

0.13

ReSA: Preserving Reference-Specified Foreground in In-Context Segmentation

cs.CV ·2026-11-20 ·Dezhao Su, Bingxu Hou, Jingdi Lei, Lin Qian, Likai Wang +1 more
similarity 0.63
Abstract · 35 pages, including appendices

In-context segmentation uses annotated references to specify the target and its extent in a query image. Accurately transferring this reference-specified foreground requires recovering target regions while suppressing irrelevant predictions. We propose ReSA, a reference-guided framework that unifies query adaptation and mask selection through a shared reference kernel. ReSA leverages foreground and background reference prototypes to constrain prediction changes during adaptation and guide foreground selection through reference-weighted reconstruction. This shared guidance promotes consistent use of reference information across prediction refinement and mask formation. ReSA further selects among adapted predictions and aligns boundary refinement with the selected foreground threshold. We establish a theoretical bound connecting reference-response changes during adaptation and soft reconstruction. With a frozen visual encoder and lightweight test-time adaptation, ReSA requires no offline task training. Ablation studies demonstrate improved foreground retention and effective suppression of false-positive regions, while qualitative results show more complete masks with fewer isolated artifacts. Across ten object, part, and cross-domain segmentation benchmarks, ReSA achieves the highest average mIoU among the evaluated methods, reaching 62.6% in 1-shot and 71.8% in 5-shot.

0.26

Reference-Guided Data Curation for 3D Medical Vision-Language Pretraining

cs.CV ·2026-11-17 ·Faidra Patsatzi, Ashwin Kumar, Chong Wang, Curtis P. Langlotz, Reinhard Heckel +1 more
publishedcode/data similarity 0.63
Abstract · Accepted at WACV 2027. Code: https://github.com/StanfordMIMI/data-curation-3d-medical-vlm

Training 3D vision-language models (VLMs) on large medical imaging datasets collected across institutions is constrained by data quality. Vast, uncurated pools of image-report pairs are characterized by redundancy, class imbalance, and cross-institutional heterogeneity. We address this challenge of data curation for improving 3D VLM pretraining by proposing an offline, training-free, reference-guided data curation recipe. Our approach leverages a small, high-quality reference set to independently extract quality signals for each modality of a large, uncurated pool and merges them through a rank-aggregation step into a single ranking that guides sample selection. We validate this method on datasets comprising 35k 3D abdominal CT volume-report pairs from two institutions and 58k 2D chest X-ray image-report pairs. On 3D CT, using our reference-guided data curation strategy, our curated model matches the zero-shot disease classification performance of a state-of-the-art baseline (Merlin) while using $3.3\times$ less training data and a reference set of 5k samples. On 2D chest X-rays, our method yields a curated model that matches or exceeds the zero-shot disease classification performance of a model trained on the full pool while using up to $10\times$ less training data and a reference set of only 74 samples. Ablations show that the selection is stable under resampling of the reference, that smaller reference sets still outperform random sampling, and that label rebalancing does not improve performance. To support reproducibility, we release our code.

0.51

PatchHead: Learning Spatial Patch Evidence for Generalizable AI-Generated Image Detection

cs.CV ·2026-08-10 ·Shengbo Qi, Hongyi Fang, Benjia Zhou, Rui Mao
similarity 0.63
Abstract

AI-generated image detectors generalize poorly when their training and test images originate from different generators or datasets. Despite the rich spatial representations produced by vision foundation models like DINO, existing detectors typically classify images using only the globally aggregated CLS token. We hypothesize that globally aggregating DINO features into a single CLS token obscures spatially distributed generation traces. To test this hypothesis, we introduce PatchHead, a lightweight spatial aggregation head that preserves the two-dimensional organization of DINO patch tokens and integrates evidence across neighboring regions. During training, we freeze the pretrained DINO backbone and optimize only the inserted LoRA adapters, PatchHead, and auxiliary projection head. Across nine cross-dataset benchmarks spanning manually curated and in-the-wild settings, PatchHead ranks first on seven datasets and second on the remaining two. It improves the strongest prior method from 91.6% to 94.6% in average balanced accuracy (+3.0 points) and raises the worst-case accuracy from 82.4% to 89.4% (+6.9 points), while introducing only 8.6% more trainable parameters and 0.08% additional FLOPs. Further qualitative analysis suggests that PatchHead (i) reduces class-conditional domain discrepancy, and (ii) redirects the representation from content-dominated saliency toward spatially distributed authenticity evidence. Together, these observations provide a representation-level account of why spatial patch aggregation transfers more reliably across generators and datasets than a single CLS-based global representation. Our code and models will be made available upon acceptance.

0.04

State-Message Interaction Adapter for Cross-Domain Few-Shot Segmentation

cs.CV ·2026-11-16 ·Hang Xing, Yan Xia, Yongjiang Liu, Siqi Zhang, Xueming Ding
similarity 0.63
Abstract · 17 pages, 9 figures, 7 tables, including the appendix

Cross-domain few-shot segmentation adapts natural-image pretrained encoders to medical or industrial domains from a few pixel-annotated support masks. Within frozen DINOv3, intermediate per-head attention messages already carry target-background distinctions that baseline final-layer similarities and predictions do not consistently reflect. We propose the State-Message Interaction Adapter (SMIA) to learn how per-head messages should update each receiving token representation while keeping pretrained attention and FFN parameters frozen. Inserted right after per-head aggregation, SMIA conditions the transformation of each head's aggregated output (message) on each patch's pre-attention feature (state), allowing similar contextual messages to produce distinct or opposing updates depending on the receiving position. Because scarce support masks cover only limited state-message combinations, a shared low-rank bilinear map confines the learned interactions to low-dimensional state, message, and output subspaces. Added before each adapted block's frozen FFN, these updates yield adapted features that are refined by frozen FFNs and deeper blocks for linear readout. With only 0.51M trainable parameters and single-pass, support-free inference, SMIA achieves six-dataset mean mIoUs of 77.40% at 5 shots and 80.99% at 10 shots across 20 medical and industrial tasks, surpassing the strongest prior methods by +3.61 and +3.93 percentage points. In controlled 10-shot comparisons across three benchmarks on the same DINOv3 backbone, SMIA also outperforms parameter-matched AdaptFormer, LoRA, and ParaX with a better precision-recall balance.

0.28