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)