RCDGen: Referring Change Detection Synthetic Data Generator

Diffusion-based synthetic data generator for remote sensing change detection (proposed in our paper: https://arxiv.org/pdf/2512.11719). Given a pre-change image and a change-category prompt, the model synthesizes a post-change image together with the corresponding binary change mask.

Installation

Requires a custom diffusers pipeline. See the GitHub repository for full installation instructions.

git clone https://github.com/huggingface/diffusers.git
cd diffusers && git checkout v0.31.0 && pip install -e .

Then copy RCDGenSDPipeline.py from the GitHub repo into your diffusers installation:

cp RCDGenSDPipeline.py /path/to/diffusers/src/diffusers/pipelines/stable_diffusion/

Usage

import torch
from PIL import Image
from diffusers.pipelines.stable_diffusion.RCDGenSDPipeline import StableDiffusionInstructPix2PixPipeline
from diffusers import UNet2DConditionModel

# Load pipeline
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
    "yilmazkorkmaz/RCDGen", 
    torch_dtype=torch.float16
).to("cuda")

# Load EMA UNet (recommended)
unet = UNet2DConditionModel.from_pretrained(
    "yilmazkorkmaz/RCDGen", 
    subfolder="unet_ema",
    torch_dtype=torch.float16
)
pipe.unet = unet.cuda()

# Generate
image = Image.open("pre_change_image.png").convert("RGB")
output = pipe(
    "change in building",
    image=image,
    num_inference_steps=100,
    image_guidance_scale=1.5,
    guidance_scale=7.0,
).images

post_image = output[0][0]  # Generated post-change image
change_mask = output[1][0]  # Binary change mask

Supported Change Categories

The model was trained on the following change categories:

  • non-change
  • building
  • low vegetation
  • medium vegetation
  • tree
  • water bodies
  • non-vegetated ground surface
  • playground
  • impervious surface
  • bare ground

Use prompts like "change in building", "change in water bodies", etc.

Output

The model outputs two images:

  1. Post-change image: RGB image showing the scene after the specified change
  2. Change mask: Binary mask (0/255) indicating changed regions

Citation

@inproceedings{korkmaz2026referring,
  title     = {Referring Change Detection in Remote Sensing Imagery},
  author    = {Korkmaz, Yilmaz and Paranjape, Jay N. and de Melo, Celso M. and Patel, Vishal M.},
  booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  year      = {2026}
}

License

Apache License 2.0

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for yilmazkorkmaz/RCDGen