We thank Kevis-Kokitsi Maninis for help with the evaluations, and Goker Erdogan for comments on the draft.
TL;DR Pre-trained vision encoders like DINOv2 produce features that are poorly aligned across visual modalities — an RGB image and its depth map of the same scene look as dissimilar as two unrelated images in feature space. We propose the Omnivorous Vision Encoder, a lightweight post-training recipe that aligns RGB, depth, and segmentation into a shared feature space while preserving DINOv2's semantic power. The result: near-perfect cross-modal retrieval, improved downstream performance, and zero-shot transfer to unseen modalities.
Pre-trained vision encoders like DINOv2 have demonstrated exceptional performance on unimodal tasks. However, we observe that their features are poorly aligned across different visual modalities. For instance, the feature embedding for an RGB image and its corresponding depth map of the same scene exhibit a cosine similarity that is nearly identical to that of two random, unrelated images. To address this, we propose the Omnivorous Vision Encoder, a post-training framework that learns a modality-agnostic feature space. We fine-tune the encoder with a dual objective: first, to maximize the feature alignment between different modalities of the same scene; and second, a distillation objective that anchors the learned representations to a fully frozen teacher. The resulting student encoder becomes "omnivorous" by producing more consistent embeddings for a given scene, regardless of the input modality (RGB, Depth, Segmentation, etc.). This approach enables robust cross-modal understanding while retaining the discriminative semantics of the original foundation model.
Pretrained visual features like DINOv2 are resilient to alterations like image color. But features vary significantly for different sensory views of the same scene, e.g., segmentation maps and depth maps. The model treats these like random, unrelated RGB images (measured by patchwise cosine similarity).
Ideally, we would like an "Omnivorous" representation, which aligns information across visual modalities, and an encoder that outputs this aligned representation regardless of which input modality is observed.
Off-the-shelf vision encoders show poor cross-modal alignment. Cosine similarity between randomly paired RGB images (top), between RGB and depth of the same scene (middle), and between RGB and grayscale of the same scene (bottom). While the numbers vary by dataset, the pattern of cross-modal misalignment remains consistent.
We adopt a parameter-efficient teacher-student framework. The student encoder is initialized from DINOv2. The early layers ($f^*$) are shared and frozen; only the final layers (the adapter $g$) are updated. The teacher's output serves as a stable anchor, preventing catastrophic forgetting during alignment training.
Omnivorous Vision Encoder architecture. A frozen encoder $f^*$ extracts features from a spectrum of modalities (Depth, RGB, Segmentation). A trainable modality-agnostic adapter $g$ maps these features into a common, aligned embedding space. We also apply a modality mixup during training for smooth interpolation between modalities.
We colorize depth and segmentation maps using a natural color palette derived from the corresponding RGB image, creating "hard positives" that force alignment based on structural content rather than color statistics. We then randomly blend modalities during training, smoothly interpolating between Depth ↔ RGB ↔ Segmentation.
Training data. Depth and segmentation maps are first colorized, then blended with the RGB image (with a randomly sampled alpha between 0–50%). This creates a continuous spectrum of modalities for training.
Our training objective combines two complementary losses:
1. Cross-modal alignment loss ($\mathcal{L}_{\text{align}}$): A symmetric InfoNCE loss computed over all modality pairs. Features from the same scene but different modalities are brought together; features from different scenes are pushed apart.
$$\mathcal{L}_{\text{align}} = \frac{1}{3} \sum_{k_1=1}^{3} \sum_{k_2>k_1}^{3}\mathcal{L}_\text{InfoNCE}(m_{k_1}, m_{k_2})$$2. Anchoring loss ($\mathcal{L}_{\text{anchor}}$): Distills from the frozen teacher, keeping the student's output close to the teacher's pre-trained representation. This prevents "representational drift" or collapse.
$$\mathcal{L}_{\text{anchor}} = \frac{1}{|M|} \sum_{m \in M} (1 - \text{sim}(h_m, h^*_m))$$The total objective is:
$$\mathcal{L}_{\text{total}} = \mathcal{L}_{\text{align}} + \lambda_{\text{anchor}} \cdot \mathcal{L}_{\text{anchor}}$$Using $\mathcal{L}_{\text{align}}$ alone causes representations to collapse; using $\mathcal{L}_{\text{anchor}}$ alone preserves DINOv2 but doesn't improve alignment. Together, they strike a principled balance.
The trade-off between cross-modal alignment and cross-scene discernibility, controlled by $\lambda_{\text{anchor}}$. Frozen DINOv2 (light blue) is discriminative but poorly aligned. Low $\lambda_{\text{anchor}}$ prioritizes alignment at the cost of discriminability.
We evaluate the alignment of the feature space by performing cross-modal retrieval: given a query in one modality (e.g., RGB), retrieve the matching scene in another modality (e.g., Depth). We average results across all 6 directed modality pairs (RGB, Depth, Segmentation).
| Dataset | Model | R@1 ↑ | R@5 ↑ | mAP ↑ | MedR ↓ |
|---|---|---|---|---|---|
| MOVi (N=128) | |||||
| DINOv2 ViT-B/14 | 15.5 | 33.1 | 25.2 | 19.3 | |
| Omnivorous ViT-B/14 | 86.2 | 96.5 | 90.9 | 1.0 | |
| ScanNet (N=3072) | |||||
| DINOv2 ViT-B/14 | 4.6 | 10.8 | 8.1 | 401.8 | |
| Omnivorous ViT-B/14 | 46.1 | 71.4 | 57.7 | 2.0 | |
| TartanAir (N=128) | |||||
| DINOv2 ViT-B/14 | 46.6 | 68.5 | 57.1 | 1.8 | |
| Omnivorous ViT-B/14 | 90.6 | 99.2 | 94.6 | 1.0 | |
Inter-modal retrieval (GAP features), averaged across all 6 directed modality pairs. On ScanNet, median rank drops from 402 → 2.
We evaluate on standard benchmarks using linear probes from frozen features. Omnivorous training preserves—or improves—DINOv2's performance across classification, depth estimation, and segmentation.
ImageNet (linear probe)
| Model | Acc ↑ |
|---|---|
| DINOv2 | 80.4% |
| Omnivorous | 83.8% |
Linear head
| Model | NAVI | NYUv2 |
|---|---|---|
| DINOv2 | 0.697 | 0.875 |
| Omnivorous | 0.706 | 0.896 |
Linear head
| Model | ADE20K | VOC |
|---|---|---|
| DINOv2 | 0.463 | 0.814 |
| Omnivorous | 0.475 | 0.826 |
A key promise of a unified feature space is training a task head on one modality and deploying it on another without retraining. We train a depth prediction head from RGB images only, then switch the input to segmentation maps and NOCS (Normalized Object Coordinate Space) maps at test time.
| Input Modality | Model | δ₁ ↑ | RMSE ↓ |
|---|---|---|---|
| RGB (training distribution) | |||
| DINOv2 | 0.420 | 0.318 | |
| Omnivorous | 0.463 | 0.290 | |
| Segmentation (in-distribution for Omni.) | |||
| DINOv2 | 0.042 | 0.792 | |
| Omnivorous | 0.169 | 0.507 | |
| NOCS (out-of-distribution for both) | |||
| DINOv2 | 0.014 | 0.979 | |
| Omnivorous | 0.029 | 0.822 | |
Cross-modal transfer on depth prediction (DPT head). Heads trained on RGB images, tested zero-shot on novel modalities. DINOv2 fails catastrophically; Omnivorous generalizes.
DINOv2 (DPT)
Omnivorous (DPT)
Qualitative depth predictions from RGB (top), Segmentation (middle), and NOCS (bottom) inputs.
We visualize the top three principal components of the features. Frozen DINOv2 features (middle row) show that RGB, Depth, and Segmentation occupy disjoint subspaces. Adapted Omnivorous features (bottom row) align closely, confirming a shared semantic space.
PCA visualizations on MOVi (left) and ScanNet (right).
All conclusions generalize when scaling from ViT-B/14 to ViT-L/14. Performance gains are often larger; e.g., for cross-modal transfer to NOCS inputs, Omnivorous outperforms DINOv2 by 10.7 percentage points on ViT-L/14 vs. 1.5pp on ViT-B/14.
| Model (ViT-L/14) | Cls. ↑ | Depth δ₁ ↑ | Seg. mIoU ↑ | 3D Corr. ↑ | Normals ↑ |
|---|---|---|---|---|---|
| DINOv2 | 0.853 | 0.890 | 0.636 | 28.80 | 45.1 |
| Omnivorous | 0.855 | 0.917 | 0.650 | 29.89 | 45.3 |
Downstream evals for larger ViT-L/14 models across classification, depth, segmentation, 3D correspondence, and normals estimation.
Omnivorous post-training can improve visual foundation models in three key ways:
Our modality-agnostic encoder shows improved generalization to novel visual modalities, paving the way for a more foundational vision model.
We thank Kevis-Kokitsi Maninis for help with the evaluations, and Goker Erdogan for comments on the draft.