Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenDPR: Open-Vocabulary Change Detection via Vision-Centric Diffusion-Guided Prototype Retrieval for Remote Sensing Imagery

CVPR 2026

Paper CVPR Code Task


πŸ“’ News

  • 2026/06/28: Code and data are publicly available.
  • 2026/03/31: The paper is available on arXiv.
  • 2026/02/21: OpenDPR is accepted to CVPR 2026.

✨ Overview

Open-vocabulary change detection (OVCD) seeks to recognize arbitrary changes of interest by enabling generalization beyond a fixed set of predefined classes. We reformulate OVCD as a two-stage pipeline: first generate class-agnostic change proposals using visual foundation models (VFMs) such as SAM and DINOv2, and then perform category identification with vision-language models (VLMs) such as CLIP. We reveal that category identification errors are the primary bottleneck of OVCD, mainly due to the limited ability of VLMs based on image-text matching to represent fine-grained land-cover categories. To address this, we propose OpenDPR, a training-free vision-centric diffusion-guided prototype retrieval framework. OpenDPR leverages diffusion models to construct diverse prototypes for target categories offline, and to perform similarity retrieval with change proposals in the visual space during inference. The secondary bottleneck lies in change localization, due to the inherent lack of change priors in VFMs. To bridge this gap, we design a spatial-to-change weakly supervised change detection module named S2C to adapt their strong spatial modeling capabilities for change localization. Integrating the pretrained S2C into OpenDPR leads to an optional weakly supervised variant named OpenDPR-W, which further improves OVCD with minimal supervision. Experimental results on four benchmark datasets demonstrate that the proposed methods achieve state-of-the-art performance under both supervision modes. image


🧭 Project Structure

OpenDPR/
β”œβ”€β”€ dynamic_earth/              # Core model loading, proposal matching, and prototype retrieval
β”œβ”€β”€ infer_OpenDPR/              # Training-free OpenDPR inference scripts
β”‚   β”œβ”€β”€ WHU-CD/
β”‚   β”œβ”€β”€ LEVIR-CD/
β”‚   β”œβ”€β”€ SECOND/
β”‚   └── Hi-UCD-mini/
β”œβ”€β”€ infer_OpenDPR_W/            # OpenDPR-W inference scripts with S2C change-location priors
β”œβ”€β”€ eval/                       # Evaluation scripts
β”œβ”€β”€ support_set/                # Prototype support images and masks
β”œβ”€β”€ S2C_results/                # Provided S2C inference results for OpenDPR-W
└── third_party/segment_anything/

πŸ› οΈ Installation

The released inference and evaluation code has been tested with Python 3.9, PyTorch 2.1.0, CUDA 11.8, SAM, and DINOv2.

conda create -n opendpr python=3.9 -y
conda activate opendpr

Install PyTorch according to your CUDA version. For CUDA 11.8:

pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
pip install transformers==4.32.1 numpy==1.26.3 opencv-python==4.8.0.76 pillow tqdm scipy scikit-image scikit-learn

Install Segment Anything:

cd third_party/segment_anything
pip install -e .
cd ../..

πŸ—‚οΈ Preparation

Evaluation Datasets

Experiments are conducted on four datasets:

Dataset Task type Placeholder
WHU-CD Building change detection <WHU_CD_ROOT>
LEVIR-CD Building change detection <LEVIR_CD_ROOT>
SECOND Semantic change detection <SECOND_ROOT>
Hi-UCD mini Semantic change detection <HIUCD_ROOT>

Update the dataset placeholders in the corresponding inference and evaluation scripts before running.

For OpenDPR, inference is performed in a training-free manner using only the test set. For OpenDPR-W, weakly supervised pre-training is first conducted on the training set, and the model achieving the best F1 score on the validation set is used for binary change localization on the test set. Notably, as each image pair in the manually curated SECOND dataset inherently contains change, only OpenDPR is evaluated on this dataset. More details are provided in the Supplementary Material.

Model Weights

Download the required checkpoints yourself and replace the placeholders in the scripts.

Placeholder Meaning Where used
<SAM_CHECKPOINT> Path to the SAM checkpoint, such as sam_vit_h_4b8939.pth infer_OpenDPR/**/infer_*.py, infer_OpenDPR_W/**/infer_*.py
<DINOV2_MODEL_DIR> Local directory of the downloaded DINOv2 model dynamic_earth/utils/model.py

The released inference scripts use SAM (ViT-H) and DINOv2 (ViT-B/14) by default. Users are encouraged to flexibly try other model variants.

Implementation Details

In this work, we use GPT-4 to generate diverse descriptions, DiffusionSat for image generation, and APE for class-specific localization. Our method does not rely on a specific foundation model, and users are encouraged to flexibly try stronger alternatives.

We provide the support sets used in our experiments in support_set. If you use the provided data, the accuracy should be close to the reported results. The performance of OpenDPR is highly dependent on the quality of the support set. Therefore, using stronger foundation models or conducting more careful support-set verification is expected to further improve the results.


πŸš€ Quick Start

Run commands from the repository root. The inference scripts for OpenDPR and OpenDPR-W are provided in infer_OpenDPR and infer_OpenDPR_W, respectively. In each dataset directory, infer_all.py performs multi-class inference jointly, while infer_building.py and the other infer_*.py scripts perform class-wise inference. We provide the binary S2C change-localization results used by OpenDPR-W in S2C_results. Below are some examples.

πŸ§ͺ OpenDPR

python infer_OpenDPR/LEVIR-CD/infer_building.py
python infer_OpenDPR/WHU-CD/infer_building.py
python infer_OpenDPR/SECOND/infer_all.py
python infer_OpenDPR/Hi-UCD-mini/infer_all.py

🧩 OpenDPR-W

python infer_OpenDPR_W/LEVIR-CD/infer_building.py
python infer_OpenDPR_W/WHU-CD/infer_building.py
python infer_OpenDPR_W/Hi-UCD-mini/infer_all.py

Default outputs are saved under:

output/{DATASET}/infer_{CLASS_OR_ALL}

πŸ“ Evaluation

Evaluation scripts are provided in eval. Update the ground-truth placeholders before running.

Our evaluation protocol follows DynamicEarth, i.e., we use class-wise binary change evaluation and report IoU and F1 for each category, without evaluating the semantic change direction. Therefore, during multi-class inference, we derive a binary change map for each category from the multi-class semantic predictions: if a changed proposal is predicted as class i in either T1 or T2, its mask is merged into class_i. For example, in SECOND, class_0 corresponds to water, and class_5 corresponds to playground.

python eval/evaluate_LEVIR-CD.py
python eval/evaluate_WHU-CD.py
python eval/evaluate_HiUCD-mini.py
python eval/evaluate_SECOND.py

Default prediction paths follow the output directories used by the inference scripts.


πŸ“ Results

image image

πŸ“Œ Citation

If you find this project useful, please consider citing:

@InProceedings{Guo_2026_CVPR,
    author    = {Guo, Qi and Wang, Jue and Liu, Yinhe and Zhong, Yanfei},
    title     = {OpenDPR: Open-Vocabulary Change Detection via Vision-Centric Diffusion-Guided Prototype Retrieval for Remote Sensing Imagery},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2026},
    pages     = {20399-20409}
}

πŸ™ Acknowledgement

This project is built upon DynamicEarth, the first OVCD codebase released by the Earth Vision Community. We sincerely thank the authors for their valuable contribution.

We also thank the contributors of Segment Anything, DINOv2, APE, DiffusionSat, and the benchmark datasets used in this work.

About

OpenDPR: Open-Vocabulary Change Detection via Vision-Centric Diffusion-Guided Prototype Retrieval for Remote Sensing Imagery

Resources

Stars

26 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages