-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_coco14_qa_clims.sh
43 lines (33 loc) · 1.34 KB
/
run_coco14_qa_clims.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
36
37
38
39
COCO14_ROOT=/path/to/COCO2014
WORK_SPACE=work_space/QA-CLIMS_coco14
VQA_FG_FILE=vqa/coco_vqa_fg_blip.npy
VQA_BG_FILE=vqa/coco_vqa_bg_blip.npy
VQA_FG_CACHE=vqa/coco_vqa_fg_blip_ViT-L-14_cache.npy
VQA_BG_CACHE=vqa/coco_vqa_bg_blip_ViT-L-14_cache.npy
BATCH_SIZE=4
LR=0.00001
NCE_T=0.7
HYPER=30,24,0.2
MASK_ADAPTER_ALPHA=0.1
##### train QA-CLIMS to generate initial CAMs
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node 2 \
run_sample_coco.py \
--use_distributed_train True --work_space $WORK_SPACE \
--mscoco_root $COCO14_ROOT \
--cam_batch_size $BATCH_SIZE --clims_learning_rate $LR --nce_t $NCE_T --hyper $HYPER \
--mask_adapter_alpha $MASK_ADAPTER_ALPHA \
--vqa_fg_file $VQA_FG_FILE --vqa_fg_cache_file $VQA_FG_CACHE \
--vqa_bg_file $VQA_BG_FILE --vqa_bg_cache_file $VQA_BG_CACHE \
--use_mask_clip True --clip ViT-L/14 \
--train_qa_clims_pass True
CUDA_VISIBLE_DEVICES=0,1 python \
run_sample_coco.py \
--work_space $WORK_SPACE \
--mscoco_root $COCO14_ROOT \
--cam_batch_size $BATCH_SIZE --clims_learning_rate $LR --nce_t $NCE_T --hyper $HYPER \
--mask_adapter_alpha $MASK_ADAPTER_ALPHA \
--vqa_fg_file $VQA_FG_FILE --vqa_fg_cache_file $VQA_FG_CACHE \
--vqa_bg_file $VQA_BG_FILE --vqa_bg_cache_file $VQA_BG_CACHE \
--vqa_bg_cache_file $VQA_BG_CACHE \
--use_mask_clip True --clip ViT-L/14 \
--make_clims_pass True --eval_cam_pass True