English | [็ฎไฝไธญๆ](README_zh.md) | [English](README.md) | [CSDN Blog](https://blog.csdn.net/weixin_62828995?spm=1000.2115.3001.5343)
๐ 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.  ## ๐ Updates - โ **[2024.06.01]** Open source code - โ **[2025.06.22]** Upload to [arXiv](https://arxiv.org/abs/2506.17944)ใ ## Model Zoo  ## 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: