Orienter / baselines /CenterNet2 /get_results.py
stereoid's picture
Add files using upload-large-folder tool
1da285f verified
Raw
History Blame Contribute Delete
817 Bytes
import os
import shutil
# SPLIT = '613'
# SPLIT = 'genre'
SPLIT = 'cat'
OUTPUT_PATH = './output'
RESULT_PATH = f'../../evaluation/results/baselines/{SPLIT}/'
TASKS = ['interaction', 'semantics', 'interactable']
IS_FINETUNE = ['', '_finetune']
FORMATS = ['det']
for task in TASKS:
for format in FORMATS:
for is_finetune in IS_FINETUNE:
result_path = os.path.join(RESULT_PATH, format, task)
os.makedirs(result_path, exist_ok=True)
output_path = os.path.join(OUTPUT_PATH, format, task + is_finetune, SPLIT)
if not os.path.exists(output_path):
continue
shutil.copy2(os.path.join(output_path, 'inference_test/coco_instances_results.json'),
os.path.join(result_path, 'CenterNet2' + is_finetune + '.json'))