InPeerReview commited on
Commit
642c84b
Β·
verified Β·
1 Parent(s): 026094a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +85 -20
README.md CHANGED
@@ -9,25 +9,90 @@
9
 
10
  ### Installation
11
  ```bash
12
- conda create --name rscd python=3.8
13
- conda activate rscd
14
- conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
15
- pip install pytorch-lightning==2.0.5
16
- pip install scikit-image==0.19.3 numpy==1.24.4
17
- pip install torchmetrics==1.0.1
18
- pip install -U catalyst==20.09
19
- pip install albumentations==1.3.1
20
- pip install einops==0.6.1
21
- pip install timm==0.6.7
22
- pip install addict==2.4.0
23
- pip install soundfile==0.12.1
24
- pip install ttach==0.0.3
25
- pip install prettytable==3.8.0
26
- pip install -U openmim
27
- pip install triton==2.0.0
28
- mim install mmcv
29
- pip install -U fvcore
 
 
 
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
- ## Dataset Preparation
33
- We evaluate our method on three public datasets: **LEVIR-CD**, **WHU-CD**, and **CLCD**.[Download](https://drive.google.com/drive/folders/1zxhJ7v3UPgNsKkdvkYCOW7DdKDAAy_ll) |
 
 
 
 
9
 
10
  ### Installation
11
  ```bash
12
+ conda create --name rscd python=3.8
13
+ conda activate rscd
14
+ conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
15
+ pip install pytorch-lightning==2.0.5
16
+ pip install scikit-image==0.19.3 numpy==1.24.4
17
+ pip install torchmetrics==1.0.1
18
+ pip install -U catalyst==20.09
19
+ pip install albumentations==1.3.1
20
+ pip install einops==0.6.1
21
+ pip install timm==0.6.7
22
+ pip install addict==2.4.0
23
+ pip install soundfile==0.12.1
24
+ pip install ttach==0.0.3
25
+ pip install prettytable==3.8.0
26
+ pip install -U openmim
27
+ pip install triton==2.0.0
28
+ mim install mmcv
29
+ pip install -U fvcore
30
+ ```
31
+ ### Dataset Preparation
32
+ We evaluate our method on three public datasets: **LEVIR-CD**, **WHU-CD**, and **CLCD**.
33
 
34
+ | Dataset | Link |
35
+ |-----------|------|
36
+ | LEVIR-CD | [Download](https://drive.google.com/file/d/1MEKc9UTM3j4zPFfkvFvjjsynGjZ5tRrF/view?usp=drive_link) |
37
+ | WHU-CD | [Download](https://drive.google.com/file/d/1N73eO20hjtEyYd33M6119U03DYkHjm5i/view?usp=drive_link) |
38
+ | CLCD | [Download](https://drive.google.com/file/d/19eW-Yad3SSiQNuB8WT5XOnvPvjxCp1Cz/view?usp=drive_link) |
39
+ ```bash
40
+ Please organize the datasets as follows:
41
+ rschangedetection
42
+ β”œβ”€β”€ rscd (code)
43
+ β”œβ”€β”€ work_dirs (save the model weights and training logs)
44
+ β”‚ └─CLCD_BS4_epoch200 (dataset)
45
+ β”‚ └─stnet (model)
46
+ β”‚ └─version_0 (version)
47
+ β”‚ β”‚ └─ckpts
48
+ β”‚ β”‚ β”œβ”€test (the best ckpts in test set)
49
+ β”‚ β”‚ └─val (the best ckpts in validation set)
50
+ β”‚ β”œβ”€log (tensorboard logs)
51
+ β”‚ β”œβ”€train_metrics.txt (train & val results per epoch)
52
+ β”‚ β”œβ”€test_metrics_max.txt (the best test results)
53
+ β”‚ └─test_metrics_rest.txt (other test results)
54
+ └── data
55
+ β”œβ”€β”€ LEVIR_CD
56
+ β”‚ β”œβ”€β”€ train
57
+ β”‚ β”‚ β”œβ”€β”€ A
58
+ β”‚ β”‚ β”‚ └── images1.png
59
+ β”‚ β”‚ β”œβ”€β”€ B
60
+ β”‚ β”‚ β”‚ └── images2.png
61
+ β”‚ β”‚ └── label
62
+ β”‚ β”‚ └── label.png
63
+ β”‚ β”œβ”€β”€ val (the same with train)
64
+ β”‚ └── test(the same with train)
65
+ β”œβ”€β”€ WHU_CD
66
+ β”‚ β”œβ”€β”€ train
67
+ β”‚ β”‚ β”œβ”€β”€ image1
68
+ β”‚ β”‚ β”‚ └── images1.png
69
+ β”‚ β”‚ β”œβ”€β”€ image2
70
+ β”‚ β”‚ β”‚ └── images2.png
71
+ β”‚ β”‚ └── label
72
+ β”‚ β”‚ └── label.png
73
+ β”‚ β”œβ”€β”€ val (the same with train)
74
+ β”‚ └── test(the same with train)
75
+ └── CLCD (the same with WHU_CD)
76
+ ```
77
+ ### Use example
78
+ Training
79
+ ```bash
80
+ python train.py -c configs/mamba_cttf.py
81
+ ```
82
+ Testing
83
+ ```bash
84
+ python test.py \
85
+ -c configs/mamba_cttf.py \
86
+ --ckpt work_dirs/CLCD_BS4_epoch200/mamba_cttf/version_0/ckpts/test/epoch=156.ckpt \
87
+ --output_dir work_dirs/CLCD_BS4_epoch200/mamba_cttf/version_0/ckpts/test \
88
+ ```
89
+ Count params and flops
90
+ ```bash
91
+ python tools/params_flops.py --size 256
92
+ ```
93
 
94
+ ### Acknowledgement
95
+ Thanks to previous open-sourced repo:
96
+ - [mmsegmentation](https://github.com/open-mmlab/mmsegmentation)
97
+ - [pytorch lightning](https://github.com/Lightning-AI/lightning)
98
+ - [fvcore](https://github.com/facebookresearch/fvcore)