amazon-science / mm-cot

Official implementation for "Multimodal Chain-of-Thought Reasoning in Language Models" (stay tuned and more will be updated)
https://arxiv.org/abs/2302.00923
Apache License 2.0
3.81k stars 315 forks source link

BUG: FileNotFoundError: [Errno 2] No such file or directory: 'vision_features/name_map.json' #10

Open psknlr opened 1 year ago

psknlr commented 1 year ago

Thank u for your great work and code, I have tried it, but got this error, can u help me solve it. It seems that lack of the josn files.

CUDA_VISIBLE_DEVICES=0,1 python main.py \

--model allenai/unifiedqa-t5-base \
--user_msg rationale --img_type detr \
--bs 8 --eval_bs 4 --eval_acc 10 --output_len 512 \
--final_eval --prompt_format QCM-LE

args Namespace(bs=8, caption_file='data/captions.json', data_root='data', epoch=20, eval_acc=10, eval_bs=4, eval_le=None, evaluate_dir=None, final_eval=True, img_type='detr', input_len=512, lr=5e-05, model='allenai/unifiedqa-t5-base', options=['A', 'B', 'C', 'D', 'E'], output_dir='experiments', output_len=512, prompt_format='QCM-LE', seed=42, test_le=None, test_split='test', train_split='train', use_caption=False, use_generate=False, user_msg='rationale', val_split='val') ====Input Arguments==== { "data_root": "data", "output_dir": "experiments", "model": "allenai/unifiedqa-t5-base", "options": [ "A", "B", "C", "D", "E" ], "epoch": 20, "lr": 5e-05, "bs": 8, "input_len": 512, "output_len": 512, "eval_bs": 4, "eval_acc": 10, "train_split": "train", "val_split": "val", "test_split": "test", "use_generate": false, "final_eval": true, "user_msg": "rationale", "img_type": "detr", "eval_le": null, "test_le": null, "evaluate_dir": null, "caption_file": "data/captions.json", "use_caption": false, "prompt_format": "QCM-LE", "seed": 42 } Traceback (most recent call last): File "main.py", line 374, in problems, qids, name_maps, image_features = load_data_img(args) # probelms, test question ids, shot example ids File "/root/mm-cot/utils_data.py", line 39, in load_data_img name_maps = json.load(open('vision_features/name_map.json')) FileNotFoundError: [Errno 2] No such file or directory: 'vision_features/name_map.json'

gcl916 commented 1 year ago

this json file come from the "vison_features" dataset which link "readme" shown.

adnanmig commented 1 year ago

Download the extracted vision features from vision_features and unzip the files under vision_features