-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathrun_ChangeFormer_LEVIR.sh
35 lines (26 loc) · 1.48 KB
/
run_ChangeFormer_LEVIR.sh
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
#!/usr/bin/env bash
#GPUs
gpus=0
#Set paths
checkpoint_root=/media/lidan/ssd2/ChangeFormer/checkpoints
vis_root=/media/lidan/ssd2/ChangeFormer/vis
data_name=LEVIR
img_size=256
batch_size=16
lr=0.0001
max_epochs=200
embed_dim=256
net_G=ChangeFormerV6 #ChangeFormerV6 is the finalized verion
lr_policy=linear
optimizer=adamw #Choices: sgd (set lr to 0.01), adam, adamw
loss=ce #Choices: ce, fl (Focal Loss), miou
multi_scale_train=True
multi_scale_infer=False
shuffle_AB=False
#Initializing from pretrained weights
pretrain=pretrained_changeformer/pretrained_changeformer.pt
#Train and Validation splits
split=train #trainval
split_val=test #test
project_name=CD_${net_G}_${data_name}_b${batch_size}_lr${lr}_${optimizer}_${split}_${split_val}_${max_epochs}_${lr_policy}_${loss}_multi_train_${multi_scale_train}_multi_infer_${multi_scale_infer}_shuffle_AB_${shuffle_AB}_embed_dim_${embed_dim}
CUDA_VISIBLE_DEVICES=1 python main_cd.py --img_size ${img_size} --loss ${loss} --checkpoint_root ${checkpoint_root} --vis_root ${vis_root} --lr_policy ${lr_policy} --optimizer ${optimizer} --pretrain ${pretrain} --split ${split} --split_val ${split_val} --net_G ${net_G} --multi_scale_train ${multi_scale_train} --multi_scale_infer ${multi_scale_infer} --gpu_ids ${gpus} --max_epochs ${max_epochs} --project_name ${project_name} --batch_size ${batch_size} --shuffle_AB ${shuffle_AB} --data_name ${data_name} --lr ${lr} --embed_dim ${embed_dim}