[IEEE TGRS 2024 ] Change-Agent: Toward Interactive Comprehensive Remote Sensing Change Interpretation and Analysis
[IEEE TGRS 2024 ] Change-Agent: Toward Interactive Comprehensive Remote Sensing Change Interpretation and Analysis
Official PyTorch implementation of the paper: "Change-Agent: Toward Interactive Comprehensive Remote Sensing Change Interpretation and Analysis" in [IEEE] (Accepted by IEEE TGRS 2024)
The overview of the MCI model:
Environment Installation:
Step 1: Create a virtual environment named Multi_change_env and activate it.
conda create -n Multi_change_env python=3.9
conda activate Multi_change_envStep 2: Download or clone the repository.
git clone https://github.com/Chen-Yang-Liu/Change-Agent.git
cd ./Change-Agent/Multi_changeStep 3: Install dependencies.
pip install -r requirements.txtDownload Dataset:
Link: LEVIR-MCI. The data structure of LEVIR-MCI is organized as follows:
├─/DATA_PATH_ROOT/Levir-MCI-dataset/
├─LevirCCcaptions.json
├─images
├─train
│ ├─A
│ ├─B
│ ├─label
├─val
│ ├─A
│ ├─B
│ ├─label
├─test
│ ├─A
│ ├─B
│ ├─label where folder A contains pre-phase images, folder B contains post-phase images, and folder label contains the change detection masks.
Extract text files for the descriptions of each image pair in LEVIR-MCI:
python preprocess_data.py After that, you can find some generated files in ./data/LEVIR_MCI/.
Make sure you performed the data preparation above. Then, start training as follows:
python train.py --train_goal 2 --data_folder /DATA_PATH_ROOT/Levir-MCI-dataset/images --savepath ./models_ckpt/python test.py --data_folder /DATA_PATH_ROOT/Levir-MCI-dataset/images --checkpoint {checkpoint_PATH}We recommend training the model 5 times to get an average score.
Run inference to get started as follows:
python predict.py --imgA_path {imgA_path} --imgB_path {imgA_path} --mask_save_path ./CDmask.pngYou can modify --checkpoint of Change_Perception.define_args() in predict.py. Then you can use your own model, of course, you also can download our pretrained model MCI_model.pth here: [Hugging face]. After that, put it in ./models_ckpt/.
Agent Installation:
cd ./Change-Agent/lagent-main
pip install -e .[all]Run Agent:
cd into the Multi_change folder:
cd ./Change-Agent/Multi_change(1) Run Agent Cli Demo:
# You need to install streamlit first
# pip install streamlit
python try_chat.py(2) Run Agent Web Demo:
# You need to install streamlit first
# pip install streamlit
streamlit run react_web_demo.pyIf you find this paper useful in your research, please consider citing:
…Thanks to the following repository:
This repo is distributed under MIT License. The code can be used for academic purposes only.
If you have any other questions❓, please contact us in time
No open issues yet, or sync has not completed.