RingMo-SAM / configs /fine_tuning_one_decoder.yaml
AI-Cyber's picture
Upload 2 files
02f8b79
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