| import os |
| import pandas as pd |
|
|
| METHODS = [ |
| 'FasterRCNN', |
| 'CenterNet2', |
| 'YOLO', |
| 'OmniParser', |
| |
| |
| '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) |
|
|