From 7e5abbca0e8009ec732ee0776319c30ee25b68cd Mon Sep 17 00:00:00 2001 From: Ting-Jun Wang Date: Sun, 12 Jan 2025 14:32:43 +0800 Subject: [PATCH] fix: to instr_type --- datasets/REVERIE/annotations/to_instr_type.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/datasets/REVERIE/annotations/to_instr_type.py b/datasets/REVERIE/annotations/to_instr_type.py index 5e8c27d..4b7b418 100644 --- a/datasets/REVERIE/annotations/to_instr_type.py +++ b/datasets/REVERIE/annotations/to_instr_type.py @@ -11,7 +11,7 @@ def dump_json(data, filename): json.dump(data, fp) for f in os.listdir(): - if 'navgpt' in f: + if 'unseen' in f: print(f) data = load_json(f) @@ -21,7 +21,12 @@ for f in os.listdir(): new_i = i.copy() new_i['instruction'] = instr # new_i['instr_id'] = f'{new_i["id"]}_{index}' - new_i['new_reverie_id'] = f'{new_i["new_reverie_id"]}_{index}' + new_i['new_reverie_id'] = f'{new_i["id"]}_{index}' + new_i['gt_found'] = i['found'][index] + new_i['target'] = i['target_objects'][index] + new_i['clip_target'] = i['clip_target'][index] + del new_i['found'] + del new_i['target_objects'] del new_i['instructions'] new_data.append(new_i)