Cross-View Anchor Prompt Generator (V²-Anchor)
- The paper introduces V²-Anchor, which overcomes spatial prompting challenges in cross-view segmentation by translating object masks into normalized anchor prompts.
- It employs DINOv3 feature extraction, dense correspondence matching, and greedy stratified sampling to robustly select geometrically accurate anchor points.
- This non-learnable module seamlessly integrates with SAM2, delivering efficient, real-time, and geometry-aware segmentation performance across diverse viewpoints.
The Cross-View Anchor Prompt Generator (V²-Anchor) is a module within the V²-SAM cross-view object correspondence framework, designed to enable coordinate-based prompting for SAM2 in challenging cross-view segmentation scenarios. By leveraging DINOv3 patch-level features, V²-Anchor establishes geometry-aware correspondences between disparate views (e.g., egocentric to exocentric), enabling precise spatial localization of objects across drastic viewpoint, scale, and appearance changes. V²-Anchor is non-learnable, requires minimal computational resources, and restores SAM2’s strengths in point-based mask prompting even across highly non-trivial cross-view conditions (Pan et al., 25 Nov 2025).
1. Objectives and Motivating Principles
V²-Anchor addresses the core limitation of direct spatial prompting in cross-view setups, where the same object projects to different pixel locations in query and target views due to large viewpoint and appearance variations. In typical single-view SAM2 usage, spatial prompts (e.g., points, boxes) are defined with respect to a single image’s coordinate frame. Transferring these directly between views fails due to inherent geometric distortions. V²-Anchor’s goal is to uncouple prompt generation from the original image’s spatial layout by translating query-view object masks into reliable coordinate prompts in the target view, thereby “unlocking” coordinate-based segmentation for cross-view correspondence tasks.
2. Module Architecture and Feature Processing Pipeline
The V²-Anchor pipeline consists of several sequential stages leveraging DINOv3 ViT-L/16 features:
- DINOv3 Feature Extraction: Both query () and target () images are resized (longer side to 1024 px, aspect ratio preserved) and passed through a pre-trained DINOv3 encoder, yielding patchwise embeddings: and , with , a typical patch grid of (for patch size 16).
- Foreground Mask Projection: The object mask is downsampled to the patch grid, identifying the set of “foreground” patch indices .
- Dense Feature Matching: For each , cosine similarity is computed across all target patches to generate a dense heatmap , and the best target patch is selected per query patch.
- Point Stratification: 2D image coordinates (, ) are recovered for each correspondence. To eliminate redundancy and local correlation, greedy stratified sampling enforces a minimum pairwise distance , typically set to 32 px.
- Canonical Coordinate Transformation: Coordinates are normalized via a linear map to relative to target image size, providing compatibility with SAM2’s prompt encoder.
- Prompt Encoding: The normalized anchor points are packaged as a coordinate prompt vector and passed to SAM2.
3. Mathematical Formulation of Geometry-Aware Correspondences
The correspondence generation within V²-Anchor is described by the following equations:
- Dense Correspondence Heatmap:
where .
- Best-Match Target Selection:
- Stratified Anchor Sampling:
with typically set to twice the patch size.
- Coordinate Normalization:
so that .
4. End-to-End Anchor Point Generation Algorithm
The operational flow of V²-Anchor is as follows:
- Extract patch features from query and target images with DINOv3.
- Downsample the query mask to identify relevant foreground patches .
- For each , compute and find .
- Recover original-image coordinates for each correspondence.
- Assemble correspondence pairs .
- Greedily select target points via stratification threshold to form .
- Normalize each to producing .
- Input to SAM2’s Prompt Encoder, yielding the anchor prompt .
5. Integration with SAM2 Prompting and Inference Pipeline
V²-Anchor’s output—sparse, high-confidence anchor points—interfaces with the native SAM2 prompting mechanism. SAM2’s mask decoder is conditioned on coordinate, box, or mask prompts encoded by its Prompt Encoder. V²-Anchor supplies a small set (typically 1–3) of spatially stratified, normalized points in the target view’s coordinate frame. These anchors direct the mask decoder to focus on the corresponding object’s spatial extent in the new view. The Anchor Expert simply combines the anchor prompt with the (frozen) pre-trained decoder, requiring no further parameter tuning or supervision. Empirical ablation indicates sparse anchors maximize IoU, while overpopulating with anchors introduces noise.
6. Implementation Characteristics and Hyperparameters
A summary of V²-Anchor’s design settings is presented below.
| Component | Value/Setting | Notes |
|---|---|---|
| DINOv3 Encoder | ViT-L/16, ImageNet pre-trained | Patch size 16 px; 1024 px longest side |
| Patch Grid | Typically | For input |
| Stratification | 32 px | patch size |
| Num. Anchor Points | 1–3 (optimal); max 5 | Ablation shows sparse anchors best |
| Coord. Transform | Linear division by img dims | To SAM2-compatible |
| Params Added | 0 (non-learnable) | ~0.5GB per GPU for DINOv3 activations |
| Walltime | ~15 ms per image pair | Efficient for real-time use |
Notably, V²-Anchor does not introduce any trainable parameters or require learning-based adaptation. Its stateless architecture supports direct deployment and low-latency operation on standard GPU hardware.
7. Significance and Context Within Cross-View Segmenter Research
V²-Anchor constitutes the first practical solution to coordinate-based prompt transfer for cross-view mask segmentation in pre-trained SAM2. By leveraging DINOv3’s implicit encoding of both appearance and geometry, it enables robust object localization under severe geometric and photometric perturbation, without reliance on explicit 3D models or additional supervision. In the V²-SAM framework, the combination of V²-Anchor (geometry-aware anchor prompting) and V²-Visual (appearance-guided visual prompting) forms a multi-expert system, with selection governed by a Post-hoc Cyclic Consistency Selector for reliability. V²-SAM sets new performance benchmarks on Ego-Exo4D, DAVIS-2017, and HANDAL-X, demonstrating V²-Anchor’s effectiveness for both standard cross-view correspondence and robotic-ready scenarios (Pan et al., 25 Nov 2025). This suggests V²-Anchor is an enabling component for generalizable, prompt-driven segmentation in computational perception pipelines.