README.md

April 25, 2026 · View on GitHub

[ICCV2025] UPRE: Zero-Shot Domain Adaptation for Object Detection via Unified Prompt and Representation Enhancement

arXiv

This is official implementation of UPRE.

Motivation of the method

Introduction

Zero-shot domain adaptation (ZSDA) presents substantial challenges due to the lack of images in the target domain. Previous approaches leverage Vision-Language Models (VLMs) to tackle this challenge, exploiting their zero-shot learning capabilities. However, these methods primarily address domain distribution shifts and overlook the misalignment between the detection task and VLMs, which rely on manually crafted prompts. To overcome these limitations, we propose the unified prompt and representation enhancement (UPRE) framework, which jointly optimizes both textual prompts and visual representations. Specifically, our approach introduces a multi-view domain prompt that combines linguistic domain priors with detection-specific knowledge, and a visual representation enhancement module that produces domain style variations. Furthermore, we introduce multi-level enhancement strategies, including relative domain distance and positive-negative separation, which align multi-modal representations at the image level and capture diverse visual representations at the instance level, respectively. Extensive experiments conducted on nine benchmark datasets demonstrate the superior performance of our framework in ZSDA detection scenarios.

Future Tasks

[1]: Update Github (✔️)
[2]: Update Code (✔️ )
[3]: Release Checkpoints ( )

Installation

Our code is based on Detectron2 and requires python >= 3.6

Install the required packages

pip install -r requirements.txt

Datasets

Set the environment variable DETECTRON2_DATASETS to the parent folder of the datasets

    path-to-parent-dir/
        /diverseWeather
            /daytime_clear
            /daytime_foggy
            ...
        /BDD100k
        /Cityscapes
        ...

Download Diverse Weather and Cross-Domain Datasets and place in the structure as shown.

Training

We train our models on a single A100 GPU.

    python train.py --config-file configs/diverse_weather.yaml 

    or 

    python train_voc.py --config-file configs/city2bdd100k.yaml

Testing

    python train.py --config-file configs/diverse_weather.yaml --eval-only MODEL.WEIGHTS last.pth
    

Acknowledgement

Our code are based on CLIP-GAP, CoOp, DetPro. Thanks for their great work.

Citation

@article{zhang2025upre,
  title={UPRE: Zero-Shot Domain Adaptation for Object Detection via Unified Prompt and Representation Enhancement},
  author={Zhang, Xiao and Wei, Fei and Wang, Yong and Zhao, Wenda and Li, Feiyi and Chu, Xiangxiang},
  journal={arXiv preprint arXiv:2507.00721},
  year={2025}
}