BGSINet-CD: Bitemporal Graph Semantic Interaction Network for Remote-Sensing Image Change Detection
November 30, 2024 ยท View on GitHub
Authors: Binge Cui, Chenglong Liu, Jianzhi Yu
Here, we provide the pytorch implementation of the paper: BGSINet-CD: Bitemporal Graph Semantic Interaction Network for Remote-Sensing Image Change Detection For more ore information, please see our published paper at arxiv.
๐๏ธUpdates
๐ Exciting News! ๐ Mar. 04th, 2024๏ผWe are thrilled to announce that BGSINet has been accepted for publication in IEEE GRSL! ๐ You can check it out here.
If you find the project interesting, please consider giving it a โญ๏ธ star โญ๏ธ to support us! Stay tuned for more updates! ๐ฅ
๐ญOverview

๐Graph Semantics Interaction Module (GSIM)

๐ Requirements
To run this project, you need to install the following dependencies:
albumentations>=1.3.0
numpy>=1.20.2
opencv_python>=4.7.0.72
opencv_python_headless>=4.7.0.72
Pillow>=9.4.0
Pillow>=9.5.0
scikit_learn>=1.0.2
torch>=1.9.0
torchvision>=0.10.0
๐ ๏ธ Installation
To clone this repository and get started, use the following commands:
git clone https://github.com/JackLiu-97/BSINet.git
cd BSINet
๐๏ธ Quick Start
1. Download Pretrained Models
You can download our BSINet pretrained models from the following links:
- WHU-CD: Baidu Drive (code: itrs)
- GZ-CD: Baidu Drive (code: itrs)
After downloading the pretrained model, place it in the output directory.
2. Run the Demo
Once you have placed the pretrained model in the output folder, you can run a demo to get started. Use the following command:
python demo.py --ckpt_url ${model_path} --data_path ${sample_data_path} --out_path ${save_path}
- Replace
${model_path}with the path to your downloaded pretrained model. - Replace
${sample_data_path}with the path to your sample data. - Replace
${save_path}with the directory where you want to save the prediction results.
3. Check the Results
After running the demo, you can find the prediction results saved in the ${save_path} directory.
๐ Training
To evaluate a model on the test subset, use:
python train.py --data_path ${train_data_path} --val_path ${val_data_path} --lr ${lr} --batch_size ${-batch_size}
๐ Evaluation
To evaluate a model on the test subset, use
python test.py --ckpt_url ${model_path} --data_path ${test_data_path}
-
๐ Supported Datasets
1. WHU Building Change Detection Dataset
-
Description: The dataset consists of two aerial images taken at different time phases, covering the exact location and containing 12,796 buildings within a 20.5 kmยฒ area.
-
Resolution: 0.2 m per pixel.
-
Image Size: 32,570 ร 15,354 pixels.
-
Preprocessing:
We crop the images to a 256 ร 256 size and randomly split them into training, validation, and test sets with the following distribution:
- Training: 6,096 images
- Validation: 762 images
- Test: 762 images
2. Guangzhou Dataset (GZ-CD)
- Description: Collected from 2006 to 2019, this dataset covers the suburbs of Guangzhou, China. To facilitate the generation of image pairs, the Google Earth service in BIGEMAP software was used. The dataset contains 19 seasonally varying VHR image pairs.
- Resolution: 0.55 m per pixel.
- Image Size: Ranges from 1,006 ร 1,168 pixels to 4,936 ร 5,224 pixels.
- Preprocessing: We crop the images to a 256 ร 256size and randomly divide them into training, validation, and test sets with the following distribution:
- Training: 2,876 images
- Validation: 353 images
- Test: 374 images
-
| Dataset | Name | Link |
|---|---|---|
| GZ-CD building change detection dataset | GZ | website |
| WHU building change detection dataset | WHU | website |
๐ License
The code is released for non-commercial and research purposes only. For commercial use, please contact the authors.