OpenDAS: Open-Vocabulary Domain Adaptation for Segmentation

Gonca Yilmaz, Songyou Peng, Marc Pollefeys, Francis Engelmann, Hermann Blum · Submission to ICLR 2025 · Rejected

TL;DR

OpenDAS introduces the task of open-vocabulary domain adaptation for segmentation, allowing Vision-Language Models (VLMs) like CLIP to adapt to specialized domains (such as autonomous driving or indoor offices) without sacrificing their ability to recognize unseen, novel concepts. By combining two-stage parameter-efficient prompt tuning with triplet loss and LLM-mined hard negative queries, OpenDAS boosts segment classification on both seen and novel classes, seamlessly slotting into existing 2D and 3D segmentation pipelines as a plug-and-play module.

What Problem Does This Paper Address?

Open-vocabulary segmentation (OVS) typically pairs class-agnostic mask proposal networks with pre-trained VLMs (e.g., CLIP) to segment arbitrary language queries. However, a significant gap remains between general-purpose VLMs and task-specific supervised models:

  1. Domain Gap & Mask Alignment: VLMs are pre-trained on internet-scale, noisy image-caption pairs rather than clean, pixel-level segmented masks in target domains (e.g., indoor robotics or urban driving).
  2. Entangled Concepts: Because image captions often describe co-occurring objects together, CLIP struggles to differentiate conceptually related adjacent items (e.g., door vs. door frame, sidewalk vs. road).
  3. The Novel Class Degradation Trap: While standard prompt tuning can adapt VLMs to target datasets, it frequently causes the model to overfit to seen base queries, severely degrading open-vocabulary generalization on unseen queries.

To bridge this gap, the authors formulate the problem of Open-Vocabulary Domain Adaptation (OVDA): adapting a model using a base vocabulary ($Q_{\text{base}}$) in a target domain while ensuring robust inference across both base and arbitrary novel classes ($Q_{\text{novel}}$).

Methods

OpenDAS builds on CLIP (ViT-L/14) and introduces a lightweight, two-stage prompt tuning framework:

[Target Image Segments] ──> [Visual Prompts (Stage 1)] ──> L_ce
                                                              │ (Freeze Visual)
[Base + Negative Queries] ─> [Textual Prompts (Stage 2)] ─> L_ce + Triplet Loss (L_t)
  • Deep Prompt Tuning: Concatenates learnable prompt tokens to both the input patch embeddings ($p_v^{(0)}, p_t^{(0)}$) and intermediate transformer layers up to depth $J$ ($p_v^{(j)}, p_t^{(j)}$ for $j < J$).
  • Sequential Two-Stage Optimization: Instead of joint multi-modal training (which distorts the joint embedding space), training is split into two phases:
  • Visual Prompt Optimization: Visual prompts are trained first using standard cross-entropy ($L_{\text{ce}}$) while keeping the original CLIP text encoder frozen. This adapts the visual representation to masked image patches without corrupting language features.
  • Textual Prompt Optimization: Visual prompts are frozen, and text prompts are optimized using a composite objective: cross-entropy combined with a margin-based triplet loss ($L_t$).
  • LLM-Assisted Triplet Mining: To make the triplet loss effective, GPT-4 generates 5 challenging, confusable negative candidates per class (e.g., generating "ceiling fan" and "skylight" for "ceiling").
  • Online Hard Negative Mining: During training, the hardest negative query is chosen dynamically based on the minimum $L_2$ distance between the candidate text embeddings and the visual segment embedding $v_i$.

Datasets

  • ADE20K-150: 150 indoor/outdoor semantic classes used to evaluate closed-set domain adaptation and cross-dataset transfer.
  • KITTI-360: Urban autonomous driving scenes with 37 semantic categories.
  • ScanNet++ Offices: A newly introduced benchmark curated from ScanNet++ consisting of 30 university office scenes (14 scenes / 7,989 images for adaptation; 16 scenes / 11,054 images for testing). The vocabulary contains 108 base queries and 125 novel queries.
  • Cross-Dataset Evaluation: Models adapted on ADE20K are evaluated directly on ScanNet++ Offices (47 base, 186 novel queries) and KITTI-360 (18 base, 19 novel queries).

Key Insights and Ideas

  • Sequential Training Preserves the Semantic Manifold: Prior multi-modal methods (e.g., MaPLe) train visual and textual prompts simultaneously. OpenDAS shows that optimizing visual prompts first against a frozen text encoder anchors visual domain adaptation to CLIP’s original text geometry, preventing catastrophic forgetting.
  • Triplet Loss Enforces Disentanglement: Adding triplet loss with LLM-generated hard negatives pulls representations of true classes close while pushing confusable categories apart (demonstrated via t-SNE, separating carpet from floor and monitor from webcam).
  • Extreme Parameter Efficiency: OpenDAS uses only $\sim$233K trainable parameters—around 1.2% of MaPLe's $\sim$18.9M parameters—while yielding higher performance on both base and novel sets.

Key Results

  • Ground-Truth Mask Classification:
  • KITTI-360: Achieves 75.7% Accuracy / 75.2% Weighted-F1, outperforming MaPLe (69.9% / 68.6%) and zero-shot CLIP (19.1% / 23.4%).
  • Novel Query Generalization (ScanNet++ Offices): Achieves 23.0% Novel-F1 (+11.0% over zero-shot CLIP; previous methods like VPT and CoCoOp scored only 12.8% and 12.7%).
  • Cross-Dataset Transfer (ADE20K $\rightarrow$ ScanNet++): Yields 21.6% Novel-F1 (vs. 11.0% for zero-shot CLIP and 16.8% for MaPLe).
  • Plug-and-Play Integration into Full Segmentation Pipelines:
  • 2D Semantic Segmentation: Boosts OVSeg by +6.0% mIoU (29.8% $\rightarrow$ 35.8%) and FC-CLIP by +3.0% mIoU (34.3% $\rightarrow$ 37.3%) on ADE20K-150.
  • 3D Instance Segmentation: Replacing CLIP in OpenMask3D improves performance on ScanNet++ Offices by +4.1% AP (8.1% $\rightarrow$ 12.2%) and +9.9% $\text{AP}_{25}$ (14.1% $\rightarrow$ 24.0%).

Limitations and Future Work

  • Supervision Requirements: Adaptation currently relies on dense ground-truth segmentation masks in the target domain, which are costly to label. The authors highlight few-shot open-vocabulary domain adaptation as an important future direction.
  • Decoupled OVS Architectures Only: OpenDAS was evaluated exclusively on decoupled pipelines (where mask proposals and mask classifications are separate stages). Adapting unified, end-to-end open-vocabulary segmentation models remains an open question.

Summary updated

Abstract

Recently, Vision-Language Models (VLMs) have advanced segmentation techniques by shifting from the traditional segmentation of a closed-set of predefined object classes to open-vocabulary segmentation (OVS), allowing users to segment novel classes and concepts unseen during training of the segmentation model. However, this flexibility comes with a trade-off: fully-supervised closed-set methods still outperform OVS methods on base classes, that is on classes on which they have been explicitly trained. This is due to the lack of pixel-aligned training masks for VLMs (which are trained on image-caption pairs), and the absence of domain-specific knowledge, such as autonomous driving. Therefore, we propose the task of open-vocabulary domain adaptation to infuse domain-specific knowledge into VLMs while preserving their open-vocabulary nature. By doing so, we achieve improved performance in base and novel classes. Existing VLM adaptation methods improve performance on base (training) queries, but fail to fully preserve the open-set capabilities of VLMs on novel queries. To address this shortcoming, we combine parameter-efficient prompt tuning with a triplet-loss-based training strategy that uses auxiliary negative queries. Notably, our approach is the only parameter-efficient method that consistently surpasses the original VLM on novel classes. Our adapted VLMs can seamlessly be integrated into existing OVS pipelines, e.g., improving OVSeg by +6.0% mIoU on ADE20K for open-vocabulary 2D segmentation, and OpenMask3D by +4.1% AP on ScanNet++ Offices for open-vocabulary 3D instance segmentation without other changes.
BibTeX
@misc{yilmaz2024opendas,
  author = {Gonca Yilmaz and Songyou Peng and Marc Pollefeys and Francis Engelmann and Hermann Blum},
  title = {{OpenDAS: Open-Vocabulary Domain Adaptation for Segmentation}},
  year = {2024},
  eprint = {2405.20141},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.20141},
}
Figure