-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_R_cpt_adapted.py
More file actions
29 lines (24 loc) · 1013 Bytes
/
Copy pathrun_R_cpt_adapted.py
File metadata and controls
29 lines (24 loc) · 1013 Bytes
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
import os
dataset_list = [
['refcoco', 'unc', 'val'], ['refcoco', 'unc', 'testA'], ['refcoco', 'unc', 'testB'],
['refcoco+', 'unc', 'val'], ['refcoco+', 'unc', 'testA'], ['refcoco+', 'unc', 'testB'],
['refcocog', 'umd', 'val'], ['refcocog', 'umd', 'test']
]
experiment = 'R_cpt_adapted'
clip_model = 'ViT-B/32,RN50x16'
save_dir = f'./output/{clip_model.replace("/", "-")}/{experiment}'
for (dataset, split_by, split) in dataset_list:
print(dataset, split_by, split)
split = split.lower()
cmd = f"CUDA_VISIBLE_DEVICES=0 python main.py \
--input_file reclip_data/{dataset}_{split}.jsonl \
--image_root reclip_data/train2014 \
--method parse \
--box_method_aggregator sum \
--clip_model {clip_model} \
--detector_file reclip_data/{dataset}_dets_dict.json \
--box_representation_method crop,shade \
--cache_path {save_dir}/cache/ \
--results_path {save_dir}/{dataset}-{split}.json"
print(cmd)
os.system(cmd)