Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vlmeval/dataset/image_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def dump_image(self, line):
decode_base64_to_image_file(line['image'], tgt_path)
tgt_path = [tgt_path]
else:
tgt_path = osp.join(self.img_root, f"{line['index']}.jpg")
tgt_path = osp.join(self.img_root, f"{line['index']}.png")
if not read_ok(tgt_path):
decode_base64_to_image_file(line['image'], tgt_path)
tgt_path = [tgt_path]
Expand Down
19 changes: 18 additions & 1 deletion vlmeval/dataset/image_mcq.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,24 @@ def evaluate_heuristic(self, eval_file, **judge_kwargs):
circular = True

model = judge_kwargs.get('model', 'exact_matching')
name_str_map = {'chatgpt-0125': 'openai', 'gpt-4-0125': 'gpt4'}
# For the full list of supported judge backends / model aliases, see:
# vlmeval/dataset/utils/judge_util.py (build_judge: model_map)
name_str_map = {
'gpt-4-turbo': 'gpt-4-turbo',
'gpt-4-0613': 'gpt-4-0613',
'gpt-4-0125': 'gpt-4-0125',
'gpt-4-0409': 'gpt-4-0409',
'chatgpt-1106': 'chatgpt-1106',
'chatgpt-0125': 'chatgpt-0125',
'gpt-4o': 'gpt-4o',
'gpt-4o-0806': 'gpt-4o-0806',
'gpt-4o-1120': 'gpt-4o-1120',
'gpt-4o-mini': 'gpt-4o-mini',
}
if model != 'exact_matching' and model not in name_str_map:
raise ValueError(
f'Unsupported judge model: {model}. Allowed: {list(name_str_map)} + exact_matching'
)
name_str = name_str_map[model] if model in name_str_map else model

if model == 'exact_matching':
Expand Down
2 changes: 1 addition & 1 deletion vlmeval/smp/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def LMUDataRoot():


def HFCacheRoot():
cache_list = ['HUGGINGFACE_HUB_CACHE', 'HF_HOME']
cache_list = ['HF_HUB_CACHE', 'HUGGINGFACE_HUB_CACHE', 'HF_HOME']
for cache_name in cache_list:
if cache_name in os.environ and osp.exists(os.environ[cache_name]):
if os.environ[cache_name].split('/')[-1] == 'hub':
Expand Down