From ad2a3e084ea9636734ee3349dc76cf7aa36b0e7d Mon Sep 17 00:00:00 2001 From: Tianrui Guan <502112826@qq.com> Date: Mon, 13 Nov 2023 14:25:42 -0500 Subject: [PATCH] update eval script --- gpt4v_benchmark.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/gpt4v_benchmark.py b/gpt4v_benchmark.py index 073e736..825cee1 100644 --- a/gpt4v_benchmark.py +++ b/gpt4v_benchmark.py @@ -11,19 +11,25 @@ ### to evaluate your method, implement and run generate_answer function! root_dir = "." +llava = False +# llava = True +# load_json = False +load_json = True input_file_name = "HallusionBench.tsv" + save_json_path_vd = "./hallusion_output_vd.json" -# save_json_path_vd = "./hallusion_output_vd_llava.json" save_json_path_vs = "./hallusion_output_vs.json" -# save_json_path_vs = "./hallusion_output_vs_llava.json" -# load_json = False -load_json = True model_output_entry = "gpt4v_output" -# model_output_entry = "llava_1_5_output" model_correctness_entry = "gpt4v_output_gpt_check" -# model_correctness_entry = "llava_1_5_output_gpt_check" model_correctness_entry_human = "gpt4v_output_human_check" -# model_correctness_entry_human = "llava_1_5_output_human_check" + +if llava: + save_json_path_vd = "./hallusion_output_vd_llava.json" + save_json_path_vs = "./hallusion_output_vs_llava.json" + model_output_entry = "llava_1_5_output" + model_correctness_entry = "llava_1_5_output_gpt_check" + model_correctness_entry_human = "llava_1_5_output_human_check" + col_idx = { 'category':0,