InPeerReview commited on
Commit
50754c6
Β·
verified Β·
1 Parent(s): 77087df

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -3
README.md CHANGED
@@ -1,3 +1,113 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## πŸ› οΈ Requirements
2
+
3
+ ### Environment
4
+ - **Linux system**, Windows is not tested, depending on whether and can be installed `causal-conv1d` and `mamba-ssm`
5
+ - **Python** 3.8+, recommended 3.10
6
+ - **PyTorch** 2.0 or higher, recommended 2.1.0
7
+ - **CUDA** 11.7 or higher, recommended 12.1
8
+
9
+ ### Environment Installation
10
+
11
+ 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.
12
+
13
+ ```bash
14
+ # Create conda environment
15
+ conda create -n stnr python=3.8 -y
16
+ conda activate stnr
17
+
18
+ # Install PyTorch
19
+ pip install torch==2.1.0 torchvision==0.14.0 torchaudio==0.13.0
20
+
21
+ # Install dependencies
22
+ pip install causal_conv1d mamba_ssm packaging
23
+ pip install timm==0.4.12
24
+ pip install pytest chardet yacs termcolor
25
+ pip install submitit tensorboardX
26
+ pip install triton==2.0.0
27
+
28
+ # Or simply run
29
+ pip install -r requirements.txt
30
+ ```
31
+
32
+ ## πŸ“ Dataset Preparation
33
+
34
+ We evaluate our method on five remote sensing change detection datasets: **WHU-CD**, **LEVIR-CD**, **LEVIR-CD+**, **SYSU-CD**, and **SVCD**.
35
+
36
+ | Dataset | Link |
37
+ |---------|------|
38
+ | WHU-CD | [Download](https://github.com/RuiZhang97/ISNet) |
39
+ | LEVIR-CD | [Download](https://github.com/YimianDai/sirst) |
40
+ | LEVIR-CD+ | [Download](https://github.com/Tianfang-Zhang/AGPCNet) |
41
+ | SYSU-CD | [Download](https://github.com/Tianfang-Zhang/AGPCNet) |
42
+ | SVCD | [Download](https://github.com/Tianfang-Zhang/AGPCNet) |
43
+
44
+ Please organize the datasets as follows:
45
+
46
+ ```
47
+ ${DATASET_ROOT} # Dataset root directory, for example: /home/username/data/LEVIR-CD
48
+ β”œβ”€β”€ A
49
+ β”‚ β”œβ”€β”€ train_1_1.png
50
+ β”‚ β”œβ”€β”€ train_1_2.png
51
+ β”‚ β”œβ”€β”€...
52
+ β”‚ β”œβ”€β”€ val_1_1.png
53
+ β”‚ β”œβ”€β”€ val_1_2.png
54
+ β”‚ β”œβ”€β”€...
55
+ β”‚ β”œβ”€β”€ test_1_1.png
56
+ β”‚ β”œβ”€β”€ test_1_2.png
57
+ β”‚ └── ...
58
+ β”œβ”€β”€ B
59
+ β”‚ β”œβ”€β”€ train_1_1.png
60
+ β”‚ β”œβ”€β”€ train_1_2.png
61
+ β”‚ β”œβ”€β”€...
62
+ β”‚ β”œβ”€β”€ val_1_1.png
63
+ β”‚ β”œβ”€β”€ val_1_2.png
64
+ β”‚ β”œβ”€β”€...
65
+ β”‚ β”œβ”€β”€ test_1_1.png
66
+ β”‚ β”œβ”€β”€ test_1_2.png
67
+ β”‚ └── ...
68
+ β”œβ”€β”€ label
69
+ β”‚ β”œβ”€β”€ train_1_1.png
70
+ β”‚ β”œβ”€β”€ train_1_2.png
71
+ β”‚ β”œβ”€β”€...
72
+ β”‚ β”œβ”€β”€ val_1_1.png
73
+ β”‚ β”œβ”€β”€ val_1_2.png
74
+ β”‚ β”œβ”€β”€...
75
+ β”‚ β”œβ”€β”€ test_1_1.png
76
+ β”‚ β”œβ”€β”€ test_1_2.png
77
+ β”‚ └── ...
78
+ β”œβ”€β”€ list
79
+ β”‚ β”œβ”€β”€ train.txt
80
+ β”‚ β”œβ”€β”€ val.txt
81
+ β”‚ └── test.txt
82
+ ```
83
+
84
+
85
+ ## πŸ”§ Model Training and Testing
86
+
87
+ All configuration for model training and testing is stored in the local folder `config`. Below are the example commands to train and test the model on the **LEVIR-CD** dataset.
88
+
89
+ ### Example of Training on LEVIR-CD Dataset
90
+
91
+ ```bash
92
+ python train_cd.py --config/levir/levir.json
93
+ ```
94
+
95
+ ### Example of Training on LEVIR-CD Dataset
96
+
97
+ ```bash
98
+ python test_cd.py --config/levir/levir_test.json
99
+ ```
100
+
101
+ ## πŸ“‚ Project Structure
102
+
103
+ ```
104
+ STNR-Det/
105
+ β”œβ”€β”€ dataset/ # Dataset loading and preprocessing
106
+ β”œβ”€β”€ model/ # Network architecture (STNR-Det)
107
+ β”œβ”€β”€ utils/ # Utility functions
108
+ β”œβ”€β”€ weight/ # Pretrained weights
109
+ β”œβ”€β”€ main.py # Main entry point
110
+ β”œβ”€β”€ requirements.txt # Dependencies
111
+ └── README.md
112
+
113
+ ```