File size: 1,451 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import os
import pandas as pd

METHODS = [
    'FasterRCNN',
    'CenterNet2',
    'YOLO',
    'OmniParser',
    # 'GPT4V-E2E',
    # 'Gemini-E2E',
    'CogVLM',
    'Seed-E2E',
    'internVL-E2E',
    'Qwen3-VL-plus-E2E',
    'O4-E2E',
    'Claude4_5-sonnet-E2E',
    'Gemini-2_5-pro-E2E',
    'GPT5-E2E',

    'aaa_icse_test_set_merged_gpt4v_gpt4v_ape_d_object_bbox_r1s_bf',
    'realfse_union3_gpt4v_ape_d_object_bbox_gpu0123_s_bf',
    'realfse_union3_claude35sonnet_ape_d_object_bbox_gpu0123_s_bf',
    'realfse_union3_gemini15pro_ape_d_object_bbox_gpu0123_s_bf'
]
RESULT_ROOT = '../eval_context/results'

methods_row = {
    'row1': METHODS[:8],
    'row2': METHODS[8:],
}

def my_format(x):
    if x < 0.005:
        return r'$\approx$0.0'
    return f'{x:.2f}'

for row, methods in methods_row.items():
    method_dfs = []
    for method in methods:
        method_df = pd.DataFrame()
        for iou in [0.75, 0.8, 0.85, 0.9, 0.95]:
            df = pd.read_csv(os.path.join(RESULT_ROOT, f'{method}@{iou:.2f}.csv'))
            df = df[['precision', 'recall', 'f1']] * 100
            df = df.iloc[-1:]
            method_df = pd.concat([method_df, df], axis=0)
        method_dfs.append(method_df)

    df = pd.concat(method_dfs, axis=1)
    df.insert(0, column='IoU', value=['0.75', '0.80', '0.85', '0.90', '0.95'])
    df.to_csv(f'context_{row}.csv', index=False)
    df.to_latex(f'context_{row}.tex', index=False, float_format=my_format)