File size: 2,055 Bytes
5409f82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
## 🛠️ Requirements

### Environment
- **Linux system**,
- **Python** 3.8+, recommended 3.10
- **PyTorch** 2.0 or higher, recommended 2.1.0
- **CUDA** 11.7 or higher, recommended 12.1

### Environment Installation

It is recommended to use Miniconda for installation. The following commands will create a virtual environment named `stnr` and install PyTorch. In the following installation steps, the default installed CUDA version is 12.1. If your CUDA version is not 12.1, please modify it according to the actual situation.

```bash
# Create conda environment
conda create -n stnr python=3.8 -y
conda activate stnr

# Install PyTorch
pip install -r requirements.txt
```

## 📁 Dataset Preparation

We evaluate our method on five remote sensing change detection datasets: **WHU-CD**, **LEVIR-CD**, **SYSU-CD**.

| Dataset | Link |
|---------|------|
| WHU-CD | [Download](https://aistudio.baidu.com/datasetdetail/251669) |
| LEVIR-CD | [Download](https://opendatalab.org.cn/OpenDataLab/LEVIR-CD) |
| SYSU-CD | [Download](https://mail2sysueducn-my.sharepoint.com/personal/liumx23_mail2_sysu_edu_cn/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fliumx23%5Fmail2%5Fsysu%5Fedu%5Fcn%2FDocuments%2FSYSU%2DCD&ga=1) |



### Example of Training on LEVIR-CD Dataset

```bash
python main.py --file_root LEVIR --max_steps 80000 --model_type small --batch_size 16 --lr 2e-4 --gpu_id 0
```

### Example of Training on LEVIR-CD Dataset

```bash
python eval.py --file_root LEVIR --max_steps 80000 --model_type small --batch_size 16 --lr 2e-4 --gpu_id 0
```

## 📂 DATA Structure

```
├─Train
      ├─A          jpg/png
      ├─B          jpg/png
      └─label      jpg/png
  ├─Val
      ├─A 
      ├─B
      └─label
  ├─Test
      ├─A
      ├─B
      └─label
```

## 🙏 Acknowledgement

We sincerely thank the following works for their contributions:

- [ChangeViT](https://arxiv.org/pdf/2406.12847) – A state-of-the-art method for remote sensing change detection that inspired and influenced parts of this work.