Foundations to Frontier
Tests
G. Computer Vision and Remote Sensing › G3 Modern Vision Architectures

Vision foundation models: SAM, depth, open-vocabulary detection and agglomerative backbones

A vision foundation model is a large network pre-trained once on broad data and then reused for many tasks, frozen or lightly adapted. By 2026 the toolbox includes general backbones (DINOv3, SigLIP 2, Perception Encoder), promptable segmenters (SAM, SAM 2 for video, SAM 3 for concepts), monocular depth (Depth Anything), open-vocabulary detectors (OWLv2, Grounding DINO), unified prompt-driven models (Florence-2), and agglomerative students such as AM-RADIO that distil several of these into one backbone. Earth observation has its own family (Prithvi, Clay, Galileo, AlphaEarth). This page covers what each family provides, how to choose and adapt one (probe, adapter or fine-tune), and the cost structure of promptable models. In the exercises you implement mask IoU, SAM's stability score, a cosine distillation loss and teacher standardisation. You then distil one student from a semantic (CLIP-like) and a geometric (DINO/SAM-like) teacher and probe it with 60 labels. A single-teacher student was blind to the other teacher's task (geometry R² −0.092; class accuracy 0.126). The balanced two-teacher student did both (0.526 and 0.638), beating raw inputs (0.407 and 0.250). Letting one teacher's features be 10× larger cost 6 points of class accuracy (0.463).

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

One big model, many jobs

Instead of training a new network for every vision task, teams now start from a few very large pre-trained models. One can outline any object you click on, another estimates how far away every pixel is, another finds objects you name in plain words, and general-purpose backbones give features for anything else. You add a small task-specific part and only a handful of labels. A newer idea merges several such models into one student by teaching it to imitate all of them at once. The teachers then have to be balanced, or the loudest one dominates. The demo shows how one teacher’s feature scale changes what the student learns.

Vision architecture lab
Teacher A (orange) supplies 50% of the regression target's variance, teacher B (teal) 50%. A student with limited width spends it on the larger teacher, so features are standardised per teacher first.
Why engineers care

Promptable segmenters and open-vocabulary detectors let an operator outline debris, ships or damaged buildings in new imagery with a click or a phrase, without a labelled training set for that object.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A foundation model is…
  2. 2. SAM segments objects given…
  3. 3. When distilling from several teachers, their features should be…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

The 2026 vision foundation-model landscape

  • Backbones: DINOv2/v3 (self-supervised, strongest dense features), SigLIP 2 and Perception Encoder (image–text, strongest semantics and VLM use), EVA, InternViT; usually frozen with a light head.
  • Segment Anything: SAM (Kirillov et al., ICCV 2023): an MAE ViT-H encoder turns a 1024 × 1024 image into a 64 × 64 embedding once; a light prompt encoder and mask decoder then answer each point or box prompt in tens of milliseconds, with three candidate masks, predicted IoU and a stability score; trained on SA-1B (11M images, 1.1B masks) built with a model-in-the-loop data engine. SAM 2 (Ravi et al., 2024) adds a memory bank for video and a Hiera encoder; SAM 3 (Meta, late 2025) segments every instance of a concept given a short noun phrase or an image exemplar.
  • Depth: Depth Anything (Yang et al., CVPR 2024) and V2 (NeurIPS 2024) train a DINOv2 encoder with a DPT head on labelled plus large pseudo-labelled data; metric-depth variants (Depth Pro, UniDepth, Metric3D) give absolute scale.
  • Open-vocabulary detection and grounding: OWL-ViT and OWLv2 (Minderer et al., 2022/2023) put detection heads on CLIP-style encoders; Grounding DINO (Liu et al., ECCV 2024) fuses text and image for phrase grounding; Florence-2 (Xiao et al., CVPR 2024) handles captioning, detection, grounding and segmentation as text-prompted sequence-to-sequence tasks.
  • Agglomerative models: AM-RADIO (Ranzinger et al., CVPR 2024) distils CLIP, DINOv2 and SAM into one student with a head per teacher; balancing teacher feature distributions (PHI-S, 2024) and resolution handling are central; Theia (2024) distils for robot learning.
  • Earth observation: Prithvi-EO-2.0 (NASA–IBM, 2024), Clay, SatMAE, Galileo (2025) and Google DeepMind’s AlphaEarth Foundations (2025) handle multispectral, SAR and time series; GEO-Bench and PANGAEA benchmark them, and well-tuned generic backbones are often competitive.
  • Adaptation ladder: zero-shot or prompting → frozen features with a linear/k-NN probe → light heads (DPT, Mask2Former) → adapters or LoRA → full fine-tuning; climb only as far as validation demands.
📝 Quick check (Level 1)
0/3 answered
  1. 1. SAM answers many prompts quickly because…
  2. 2. Depth Anything's encoder is…
  3. 3. AM-RADIO is trained by…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Choosing and adapting a foundation model

Exercise 1.

  • Mask IoU.
  • SAM’s stability score.
  • A cosine feature-distillation loss.
  • Per-teacher feature standardisation.

Practice.

  • Write down the task’s output (labels, masks, depth, boxes, text) and constraints (latency, licence, hardware) before choosing a model.
  • Try the cheapest rung first: prompting or zero-shot, then a linear probe on frozen features with a few hundred labels; measure on data from the deployment domain.
  • For masks, use SAM/SAM 2 interactively to bootstrap labels, then train a small specialist if latency matters.
  • For multispectral or SAR data, compare an EO foundation model with a generic backbone on your bands; adapt the patch embedding for extra channels.
  • Watch licences (SAM: Apache 2.0; DINOv3 and some EO models: custom) and the training data’s geography and sensor mix.
import numpy as np, torch
from sam2.sam2_image_predictor import SAM2ImagePredictor
from PIL import Image
pred = SAM2ImagePredictor.from_pretrained("facebook/sam2.1-hiera-large")
img = np.array(Image.open("apron.png").convert("RGB"))
with torch.inference_mode():
    pred.set_image(img)                                  # heavy encoder: once per image
    masks, scores, _ = pred.predict(point_coords=np.array([[420, 310]]), point_labels=np.array([1]))
best = masks[scores.argmax()]                             # light decoder: per prompt
🐍 Exercise 1: masks and multi-teacher distillation
Implement mask IoU, SAM's stability score, a cosine distillation loss and per-teacher standardisation.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The first adaptation to try is usually…
  2. 2. SAM is a good tool for…
  3. 3. Using a foundation model on SAR data may require…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Promptable models amortise. SAM’s cost per image is one encoder pass E plus one decoder pass d per prompt, so the time per prompt is E/N + d for N prompts. The design moves almost all compute into a reusable embedding, which is why interactive use in a browser is possible once the embedding is computed.

Stability score. For mask logits ℓ and threshold θ, SAM keeps masks whose IoU between the masks ℓ > θ + δ and ℓ > θ − δ is high. A crisp object boundary (steep logits) barely moves; a vague one does.

Multi-teacher distillation. A student f with a shared k-dimensional representation and a linear head per teacher minimises Σₜ ‖Hₜ f(x) − Tₜ(x)‖². With a linear student this is reduced-rank regression: the representation spans the top-k directions of the fitted targets. Each teacher’s share of those directions is proportional to its share of target variance, so a teacher whose features are 10× larger has 100× the weight and claims the student’s width. Standardising each teacher (or PHI-S, which also spreads variance evenly across dimensions with a Hadamard rotation) restores the balance; extra width removes the competition.

Why distilled features help with few labels. A probe on D raw input dimensions must find the task directions from the labels alone; a probe on k distilled dimensions starts from directions the teachers already found, so it needs fewer labels: the core economic argument for foundation models.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Time per prompt for SAM with N prompts is…
  2. 2. A teacher with 10× larger features gets a weight in the squared loss of…
  3. 3. Distilled features help most when…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

Can one student inherit the skills of two different teachers, and what goes wrong when the teachers are unbalanced?

History.

  • R. Bommasani et al., “On the opportunities and risks of foundation models” (2021).
  • A. Kirillov et al., “Segment Anything” (ICCV 2023); N. Ravi et al., “SAM 2” (2024).
  • M. Ranzinger, G. Heinrich, J. Kautz and P. Molchanov, “AM-RADIO: agglomerative vision foundation model” (CVPR 2024); M. Ranzinger et al., “PHI-S: distribution balancing for label-free multi-teacher distillation” (2024).

Exercise 2. Distilling a semantic and a geometric teacher into one student.

  • World: scenes with a class (10 classes), a 2-D geometric quantity (layout or depth) and 8 nuisance factors, rendered nonlinearly into 32-dimensional observations.
  • Teachers: A (CLIP-like) outputs 16 features depending only on the class; B (DINO/SAM-like) outputs 16 features depending only on the geometry.
  • Student: fixed random ReLU features (256) with a learned 8-dimensional shared representation and a linear head per teacher, fitted on 3000 unlabelled scenes (reduced-rank regression, the optimal linear student).
  • Probes: linear, trained on only 60 labelled scenes, tested on 1000: class accuracy (chance 0.1) and geometry R².
student class accuracy geometry R²
teacher A only 0.631 −0.092
teacher B only 0.126 0.656
A + B, balanced 0.526 0.638
A + B, teacher B 10× larger 0.463 0.634
A + B, balanced, width 16 0.583 0.616
raw observations (32 dimensions) 0.407 0.250
  • Single teachers transfer only their own skill: the semantic student knows nothing about geometry and vice versa.
  • One balanced student did both, well above raw observations, at some cost in class accuracy at width 8 (0.526 against 0.631).
  • Imbalance hurt on every seed: with teacher B 10× larger, class accuracy fell to 0.463, 0.483 and 0.514 (balanced: 0.526, 0.574 and 0.604) while geometry barely changed.
  • Width relieves competition: doubling it raised class accuracy on all seeds (0.583, 0.600 and 0.647), though geometry R² dipped slightly (0.638 to 0.616 on seed 0): more dimensions are harder to probe with 60 labels.
  • Caveat: linear students on fixed random features; real agglomerative models train the whole backbone and handle resolution and token mismatches.
🐍 Exercise 2 (research): can one student inherit the skills of two different teachers, and what goes wrong when the teachers are unbalanced?
Distil students from a semantic teacher, a geometric teacher or both (balanced or not) and compare few-label probes for class and geometry.

Vision foundation models in AI, robotics and aerospace

  • Earth observation: AlphaEarth Foundations publishes annual embedding fields for the whole land surface; Prithvi-EO-2.0 and Clay are fine-tuned for floods, burn scars and crop mapping with small labelled sets; SAM-based tools speed up annotation of buildings and fields.
  • Robotics: policies consume DINOv2, SigLIP or RADIO features (Theia distils several for robot learning); SAM 2 tracks objects for manipulation; Depth Anything gives dense depth from a single camera.
  • Aerospace inspection and space situational awareness: open-vocabulary detection and promptable segmentation find new defect or object types from a phrase or a few clicks, followed by a probe once examples accumulate.

References

  1. R. Bommasani et al. (2021). “On the opportunities and risks of foundation models.” arXiv.
  2. A. Kirillov et al. (2023). “Segment Anything.” ICCV.
  3. N. Ravi et al. (2024). “SAM 2: segment anything in images and videos.” arXiv (ICLR 2025).
  4. L. Yang et al. (2024). “Depth Anything: unleashing the power of large-scale unlabeled data.” CVPR.
  5. M. Minderer, A. Gritsenko and N. Houlsby (2023). “Scaling open-vocabulary object detection.” NeurIPS.
  6. S. Liu et al. (2024). “Grounding DINO: marrying DINO with grounded pre-training for open-set object detection.” ECCV.
  7. B. Xiao et al. (2024). “Florence-2: advancing a unified representation for a variety of vision tasks.” CVPR.
  8. M. Ranzinger, G. Heinrich, J. Kautz and P. Molchanov (2024). “AM-RADIO: agglomerative vision foundation model — reduce all domains into one.” CVPR.
  9. M. Ranzinger et al. (2024). “PHI-S: distribution balancing for label-free multi-teacher distillation.” arXiv.
  10. A. Lacoste et al. (2023). “GEO-Bench: toward foundation models for Earth monitoring.” NeurIPS Datasets and Benchmarks.