File size: 817 Bytes
1da285f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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'))