Domain adaptation has been vastly investigated in computer vision but still requires access to target images at train time, which might be intractable in some uncommon conditions. In this paper, we propose the task of `Prompt-driven Zero-shot Domain Adaptation', where we adapt a model trained on a source domain using only a single general textual description of the target domain, i.e., a prompt. First, we leverage a pretrained contrastive vision-language model (CLIP) to optimize affine transformations of source features, steering them towards target text embeddings, while preserving their content and semantics. Second, we show that augmented features can be used to perform zero-shot domain adaptation for semantic segmentation. Experiments demonstrate that our method significantly outperforms CLIP-based style transfer baselines on several datasets for the downstream task at hand. Our prompt-driven approach even outperforms one-shot unsupervised domain adaptation on some datasets, and gives comparable results on others. Our code is available at https://github.com/astra-vision/PODA.
翻译:领域适应在计算机视觉中已被广泛研究,但在训练时仍需访问目标图像,这在某些特殊条件下可能难以实现。本文提出“提示驱动的零样本领域适应”任务,即仅通过目标域的单条通用文本描述(即提示)来调整在源域上训练的模型。首先,我们利用预训练的对比视觉-语言模型(CLIP)优化源特征的仿射变换,使其向目标文本嵌入方向迁移,同时保留其内容与语义。其次,我们证明增强后的特征可用于语义分割的零样本领域适应。实验表明,我们的方法在多个数据集上显著优于基于CLIP的风格迁移基线方法,且在下游任务中表现更优。这种提示驱动方法甚至在某些数据集上超越单样本无监督领域适应,并在其他数据集上取得相当结果。我们的代码已开源:https://github.com/astra-vision/PODA。