README.md

July 3, 2025 ยท View on GitHub

English | ็ฎ€ไฝ“ไธญๆ–‡ | English | CSDN Blog

SegChange-R1: LLM-Augmented Remote Sensing Change Detection

hf license prs issues arXiv pre-commit.ci status stars

๐Ÿ“„ This is the official implementation of the paper:
SegChange-R1: LLM-Augmented Remote Sensing Change Detection

Fei Zhou

Neusoft Institute Guangdong, China & Airace Technology Co.,Ltd., China

If you like SegChange-R1, please give us a โญ!

Remote sensing change detection is used in urban planning, terrain analysis, and environmental monitoring by analyzing feature changes in the same area over time. In this paper, we propose a large language model (LLM) augmented inference approach (SegChange-R1), which enhances the detection capability by integrating textual descriptive information and guides the model to focus on relevant change regions, accelerating convergence. We designed a linear attention-based spatial transformation module (BEV) to address modal misalignment by unifying features from different times into a BEV space. Furthermore, we introduce DVCD, a novel dataset for building change detection from UAV viewpoints. Experiments on four widely-used datasets demonstrate significant improvements over existing method.

Baseline

๐Ÿš€ Updates

  • โœ… [2024.06.01] Open source code
  • โœ… [2025.06.22] Upload to arXivใ€‚

Model Zoo

SOTA

Quick Start

System Requirements

  • Python 3.12
  • CUDA + PyTorch
  • HuggingFace
  • Stable network connection
  • High-quality proxy IPs (important)

Installation

1. Create a virtual environment

conda create -n segchange python=3.12 -y
conda activate segchange

2. Install dependencies

pip install -r requirements.txt

3. Configuring HuggingFace Images

vim ~/.bashrc

export HF_ENDPOINT="https://hf-mirror.com"

source ~/.bashrc

Data Preparation

Two dataset structure formats are supported๏ผš

1. Default

The structure of the dataset is as follows:

data/
  โ”œโ”€โ”€ train/
  โ”‚   โ”œโ”€โ”€ A/                  # First phase training image
  โ”‚   โ”œโ”€โ”€ B/                  # Second phase training image
  โ”‚   โ”œโ”€โ”€ label/              # Training Label (Change Mask)
  โ”‚   โ””โ”€โ”€ prompts.txt         # The training set text describes the prompt
  โ”œโ”€โ”€ val/
  โ”‚   โ”œโ”€โ”€ A/              
  โ”‚   โ”œโ”€โ”€ B/             
  โ”‚   โ”œโ”€โ”€ label/         
  โ”‚   โ””โ”€โ”€ prompts.txt 
  โ””โ”€โ”€ test/
      โ”œโ”€โ”€ A/            
      โ”œโ”€โ”€ B/             
      โ”œโ”€โ”€ label/      
      โ””โ”€โ”€ prompts.txt     

Change the data_format parameter file configs to default.

2. Custom

The structure of the dataset is as follows:

data/
  โ”œโ”€โ”€ A/                      # First phase training image
  โ”‚โ”€โ”€ B/                      # Second phase training image
  โ”‚โ”€โ”€ label/                  # Label (Change Mask)
  โ”‚โ”€โ”€ list                    # List file
  โ”‚   โ”œโ”€โ”€ train.txt           # A list of training sets
  โ”‚   โ”œโ”€โ”€ val.txt             # A list of validation sets
  โ”‚   โ””โ”€โ”€ test.txt            # A list of test sets
  โ””โ”€โ”€ prompts.txt             # Text description prompts

Change the data_format parameter file configs to custom.

Training

Generate word embedding files

Use Text Generation and change the 'desc_embs' parameter file configs to 'None' to execute the script.

python ./examples/text_gen.py -c ./configs/config.yaml

If you want to detect changes in multiple categories, you need to manually label the category description text.

Command-line training

python train.py -c ./configs/config.yaml

testing

python test.py -c ./configs/config.yaml

Inference TIF

python infer.py -c ./configs/config.yaml

app demo

cd examples/gradio_app
chmod +x ./run.sh
bash run.sh

DEDICATION

Submit issues and code improvements. Make sure to follow the project's code style and contribution guidelines.

LICENSE

This project uses Apache License 2.0

Citation

If you use RT-FINE in your research, please cite:

bibtex
@article{zhou2025segchange-r1,
  title={SegChange-R1: LLM-Augmented Remote Sensing Change Detection},
  author={Zhou, Fei},
  journal={arXiv preprint arXiv:2506.17944},
  year={2025},
  eprint={/2506.17944},
  archivePrefix={arXiv},
  primaryClass={cs.CV}
}