You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run the SUTD project following the "README.md", but in the final step "python train_SUTD.py" there is a problem like this. FileNotFoundError: [Errno 2] No such file or directory: 'data/sutd-qa/sutd-qa_vocab_oie_bert3.json'
In my files there is only
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_bert.json
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_object_bert.json
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_relation_bert.json
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_subject_bert.json
and I search for "vocab_oie_bert3" in the whole project, but only find it in "train_SUTD.py".
How can I solve this?
I run the SUTD project following the "README.md", but in the final step "python train_SUTD.py" there is a problem like this.
FileNotFoundError: [Errno 2] No such file or directory: 'data/sutd-qa/sutd-qa_vocab_oie_bert3.json'
In my files there is only
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_bert.json
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_object_bert.json
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_relation_bert.json
.../CMCIR-main/Code/data/sutd-qa/sutd-qa_vocab_subject_bert.json
and I search for "vocab_oie_bert3" in the whole project, but only find it in "train_SUTD.py".
How can I solve this?
2024-08-23 21:08:34,702 INFO video_file:datasets/SUTD-TrafficQA/annotations/R3_all.jsonl
2024-08-23 21:08:34,702 INFO video_dir:datasets/SUTD-TrafficQA/raw_videos/
2024-08-23 21:08:34,702 INFO exp_name:expSUTD-QA_Swin_VLAD_bert_learned_layer3v2
2024-08-23 21:08:34,703 INFO Create train_loader and val_loader.........
loading vocab from data/sutd-qa/sutd-qa_vocab_oie_bert3.json
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/stormai/userfile2/wk/CMCIR/CMCIR-main/Code/train_SUTD.py:438 in │
│ │
│ 435 │
│ 436 │
│ 437 if name == 'main': │
│ ❱ 438 │ main() │
│ 439 │
│ │
│ /home/stormai/userfile2/wk/CMCIR/CMCIR-main/Code/train_SUTD.py:434 in main │
│ │
│ 431 │ if torch.cuda.is_available(): │
│ 432 │ │ torch.cuda.manual_seed_all(cfg.seed) │
│ 433 │ │
│ ❱ 434 │ train_oie(cfg) │
│ 435 │
│ 436 │
│ 437 if name == 'main': │
│ │
│ /home/stormai/userfile2/wk/CMCIR/CMCIR-main/Code/train_SUTD.py:46 in train_oie │
│ │
│ 43 │ │ 'num_workers': cfg.num_workers, │
│ 44 │ │ 'shuffle': True │
│ 45 │ } │
│ ❱ 46 │ train_loader = VideoQADataLoader_oie_bert_opendended(**train_loader_kwargs) #,collat │
│ 47 │ logging.info("number of train instances: {}".format(len(train_loader.dataset))) │
│ 48 │ if cfg.val.flag: │
│ 49 │ │ val_loader_kwargs = { │
│ │
│ /home/stormai/userfile2/wk/CMCIR/CMCIR-main/Code/DataLoader.py:1638 in init │
│ │
│ 1635 │ def init(self, **kwargs): │
│ 1636 │ │ vocab_json_path = str(kwargs.pop('vocab_json')) │
│ 1637 │ │ print('loading vocab from %s' % (vocab_json_path)) │
│ ❱ 1638 │ │ vocab = load_vocab(vocab_json_path) │
│ 1639 │ │ │
│ 1640 │ │ vocab_subject_json_path = str(kwargs.pop('vocab_subject_json')) │
│ 1641 │ │ print('loading vocab_subject from %s' % (vocab_subject_json_path)) │
│ │
│ /home/stormai/userfile2/wk/CMCIR/CMCIR-main/Code/DataLoader.py:88 in load_vocab │
│ │
│ 85 │ return clips │
│ 86 │
│ 87 def load_vocab(path): │
│ ❱ 88 │ with open(path, 'r') as f: │
│ 89 │ │ vocab = json.load(f) │
│ 90 │ │ vocab['question_idx_to_token'] = invert_dict(vocab['question_token_to_idx']) │
│ 91 │ │ vocab['answer_idx_to_token'] = invert_dict(vocab['answer_token_to_idx']) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: 'data/sutd-qa/sutd-qa_vocab_oie_bert3.json'
The text was updated successfully, but these errors were encountered: