Spaces:
Runtime error
Runtime error
File size: 5,264 Bytes
02f8b79 | 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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | train_dataset:
dataset:
name: paired-image-folders
args:
# root_path_1: ./SAM_DATA_UNIFY/Overall_Update/split_image
# root_path_1: ./SAM_DATA_UNIFY2/OVERALL/split_image
root_path_1: ./TwoDecoder_data/Decoder1_delete_all_bg/image
# root_path_2: ./SAM_DATA_UNIFY/Overall_Update/split_gt
# root_path_2: ./SAM_DATA_UNIFY2/OVERALL/split_gt
root_path_2: ./TwoDecoder_data/Decoder1_delete_all_bg/gt
cache: none
split_key: train
wrapper:
name: train
args:
inp_size: 1024
augment: false
batch_size: 2
# batch_size: 4
val_dataset:
dataset:
name: paired-image-folders
args:
#root_path_1: ./TwoDecoder_data/Decoder1_delete_all_bg/image
# root_path_1: [{'ISAID': './SAM_DATA_UNIFY2/ISAID/split_image', 'WHU': './SAM_DATA_UNIFY2/WHU-OPT/split_images'}]
# root_path_1: [{'Decoder1': "/workspace/SAM_DATA_UNIFY3/Decoder1/split_image/", 'Decoder2': "/workspace/SAM_DATA_UNIFY3/Decoder2/split_image/"}]
# root_path_1: [{'Decoder1': "./SAM_DATA_UNIFY4/Decoder1/image", 'Decoder2': "/workspace/SAM_DATA_UNIFY4/Decoder2/image/"}]
# root_path_2: ./TwoDecoder_data/Decoder1_delete_all_bg/gt
# root_path_2: [{'ISAID': './SAM_DATA_UNIFY2/ISAID/split_gt', 'WHU': './SAM_DATA_UNIFY2/WHU-OPT/split_gt'}]
# root_path_2: [{'Decoder1': "/workspace/SAM_DATA_UNIFY3/Decoder1/split_gt/", 'Decoder2': "/workspace/SAM_DATA_UNIFY3/Decoder2/split_gt/"}]
# root_path_2: [{'Decoder1': "/workspace/SAM_DATA_UNIFY4/Decoder1/gt/", 'Decoder2': "/workspace/SAM_DATA_UNIFY4/Decoder2/gt/"}]
cache: none
split_key: test
wrapper:
name: val
args:
inp_size: 1024
# batch_size: 2
batch_size: 1
test_dataset:
dataset:
name: paired-image-folders
args:
# root_path_1: ./SingleHead_Data/Decoder/image
# root_path_1: ./SingleHead_Data/ISAID/split_image
# root_path_1: ./SingleHead_Data/GAOFEN/split_image
# root_path_1: ./SingleHead_Data/Potsdam/split_image
# root_path_1: ./SingleHead_Data/Vaihingen/split_image
# root_path_1: ./SingleHead_Data/SAR2020/split_image
# root_path_1: ./SingleHead_Data/WHU-OPT-SAR/split_image_opt
# root_path_1: ./TwoDecoder_data/Decoder1_delete_all_bg/image
# root_path_1: ./TwoDecoder_data/Vaihingen/image2
# root_path_1: ./TwoDecoder_data/Vaihingen/image1
# root_path_1: ./TwoDecoder_data/Potsdam/split_image1
# root_path_1: ./TwoDecoder_data/GAOFEN/split_image1
# root_path_1: ./TwoDecoder_data/GUOLV/ISAID/image
# root_path_1: ./ISAID/train/trainprompt/images
# root_path_1: ./yijisar_prompt/image
# root_path_1: ./ISAID/eval/eval_prompt_new/images
root_path_1: ./save/SAR_prompt/image
# root_path_1: ./TwoDecoder_data/Prompt_GUOLV_Data/prompt_all/image
# root_path_2: ./SingleHead_Data/Decoder/gt
# root_path_2: ./SingleHead_Data/ISAID/split_gt
# root_path_2: ./SingleHead_Data/GAOFEN/split_gt
# root_path_2: ./SingleHead_Data/Potsdam/split_gt
# root_path_2: ./SingleHead_Data/Vaihingen/split_gt
# root_path_2: ./SingleHead_Data/SAR2020/split_gt
# root_path_2: ./SingleHead_Data/SAR2020/split_gt
# root_path_2: ./SingleHead_Data/WHU-OPT-SAR/split_gt_opt
# root_path_2: ./TwoDecoder_data/Decoder1_delete_all_bg/gt
# root_path_2: ./TwoDecoder_data/Vaihingen/gt2
# root_path_2: ./TwoDecoder_data/Vaihingen/gt1
# root_path_2: ./TwoDecoder_data/Potsdam/split_gt1
# root_path_2: ./TwoDecoder_data/GAOFEN/split_gt1
# root_path_2: ./TwoDecoder_data/GUOLV/ISAID/gt
# root_path_2: ./ISAID/train/trainprompt/gt
# root_path_2: ./yijisar_prompt/gt
# root_path_2: ./ISAID/eval/eval_prompt_new/gt
root_path_2: ./save/SAR_prompt/gt
# root_path_2: ./TwoDecoder_data/Prompt_GUOLV_Data/prompt_all/gt
cache: none
split_key: test
wrapper:
name: val
args:
# inp_size: 1024
inp_size: 1024
batch_size: 1
#eval_type: cod
eval_type: f1
#sam_checkpoint: ./pretrained/sam_vit_l_0b3195.pth
#sam_checkpoint: sam_vit_h_4b8939.pth
sam_checkpoint: ./save/_multi_mo_multi_task_0626/model_epoch_last.pth
#sam_checkpoint: ./save/_fine_tuning_one_decoder/model_epoch_last.pth
data_norm:
inp:
sub:
- 0.5
div:
- 0.5
gt:
sub:
- 0.5
div:
- 0.5
gt_rgb:
sub:
- 0.5
div:
- 0.5
model:
name: sam
args:
inp_size: 1024
# loss: iou
loss: cr
encoder_mode:
name: sam
img_size: 1024
mlp_ratio: 4
patch_size: 16
qkv_bias: true
use_rel_pos: true
window_size: 14
out_chans: 256
scale_factor: 32
input_type: fft
freq_nums: 0.25
prompt_type: highpass
prompt_embed_dim: 256
tuning_stage: 1234
handcrafted_tune: true
embedding_tune: true
adaptor: adaptor
embed_dim: 1280
depth: 32
num_heads: 16
global_attn_indexes:
- 7
- 15
- 23
- 31
optimizer:
name: adamw
args:
# lr: 0.0002
# lr: 0.00002 #二卡
lr: 0.00004 #四卡
# lr: 0.00008
# lr: 0.00016
lr_min: 1.0e-8
#epoch_max: 20
epoch_max: 150
multi_step_lr:
milestones:
- 1
gamma: 0.1
epoch_val: 150
epoch_save: 1
#resume: 60
#start_epoch: 60
|