English | [็ฎ€ไฝ“ไธญๆ–‡](README_zh.md) | [English](README.md) | [CSDN Blog](https://blog.csdn.net/weixin_62828995?spm=1000.2115.3001.5343)

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](https://i-blog.csdnimg.cn/direct/574c18c2382c442a8cb60b31de9c01ba.png) ## ๐Ÿš€ Updates - โœ… **[2024.06.01]** Open source code - โœ… **[2025.06.22]** Upload to [arXiv](https://arxiv.org/abs/2506.17944)ใ€‚ ## Model Zoo ![SOTA](https://i-blog.csdnimg.cn/direct/186edd2273c149bcb19f9aafb60b835b.png) ## Quick Start ### System Requirements - Python 3.12 - CUDA + PyTorch - HuggingFace - Stable network connection - High-quality proxy IPs (important) ### Installation #### 1. Create a virtual environment ```bash conda create -n segchange python=3.12 -y conda activate segchange ``` #### 2. Install dependencies ```bash pip install -r requirements.txt ``` #### 3. Configuring HuggingFace Images ```bash 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: ```text 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](./configs/config.yaml) to `default`. #### 2. Custom The structure of the dataset is as follows: ```text 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](./configs/config.yaml) to `custom`. ### Training #### Generate word embedding files Use [Text Generation](./examples/text_gen.py) and change the 'desc_embs' parameter file [configs](./configs/config.yaml) to 'None' to execute the script. ```bash 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 ```bash python train.py -c ./configs/config.yaml ``` ### testing ```bash python test.py -c ./configs/config.yaml ``` ### Inference TIF ```bash python infer.py -c ./configs/config.yaml ``` ### app demo ```bash 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](LICENSE) ### Citation If you use RT-FINE in your research, please cite:
bibtex ```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} } ```