kennymckormick commited on
Commit
2942a81
1 Parent(s): 3307746
Files changed (3) hide show
  1. app.py +2 -2
  2. gen_table.py +4 -4
  3. meta_data.py +1 -1
app.py CHANGED
@@ -57,7 +57,7 @@ with gr.Blocks() as demo:
57
  new_fields = [field for field in fields if field not in filter_list]
58
  df = generate_table(results, new_fields)
59
 
60
- df['flag'] = [model_size_flag(x, model_size) for x in df['Parameters (B)']]
61
  df = df[df['flag']]
62
  df.pop('flag')
63
  if len(df):
@@ -119,7 +119,7 @@ with gr.Blocks() as demo:
119
  s = structs[DATASETS.index(dataset_name)]
120
  headers = s.check_box['essential'] + fields
121
  df = cp.deepcopy(s.table)
122
- df['flag'] = [model_size_flag(x, model_size) for x in df['Parameters (B)']]
123
  df = df[df['flag']]
124
  df.pop('flag')
125
  if len(df):
 
57
  new_fields = [field for field in fields if field not in filter_list]
58
  df = generate_table(results, new_fields)
59
 
60
+ df['flag'] = [model_size_flag(x, model_size) for x in df['Param (B)']]
61
  df = df[df['flag']]
62
  df.pop('flag')
63
  if len(df):
 
119
  s = structs[DATASETS.index(dataset_name)]
120
  headers = s.check_box['essential'] + fields
121
  df = cp.deepcopy(s.table)
122
+ df['flag'] = [model_size_flag(x, model_size) for x in df['Param (B)']]
123
  df = df[df['flag']]
124
  df.pop('flag')
125
  if len(df):
gen_table.py CHANGED
@@ -63,7 +63,7 @@ def model_type_flag(line, FIELDS):
63
 
64
  def BUILD_L1_DF(results, fields):
65
  check_box = {}
66
- check_box['essential'] = ['Method', 'Parameters (B)', 'Language Model', 'Vision Model']
67
  # revise there to set default dataset
68
  check_box['required'] = ['Avg Score', 'Avg Rank'] + DEFAULT_BENCH
69
  check_box['avg'] = ['Avg Score', 'Avg Rank']
@@ -95,7 +95,7 @@ def BUILD_L2_DF(results, dataset):
95
  continue
96
  meta = item['META']
97
  for k in META_FIELDS:
98
- if k == 'Parameters (B)':
99
  param = meta['Parameters']
100
  res[k].append(float(param.replace('B', '')) if param != '' else None)
101
  elif k == 'Method':
@@ -120,7 +120,7 @@ def BUILD_L2_DF(results, dataset):
120
  df = df.iloc[::-1]
121
 
122
  check_box = {}
123
- check_box['essential'] = ['Method', 'Parameters (B)', 'Language Model', 'Vision Model']
124
  check_box['required'] = required_fields
125
  check_box['all'] = all_fields
126
  type_map = defaultdict(lambda: 'number')
@@ -143,7 +143,7 @@ def generate_table(results, fields):
143
  item = results[m]
144
  meta = item['META']
145
  for k in META_FIELDS:
146
- if k == 'Parameters (B)':
147
  param = meta['Parameters']
148
  res[k].append(float(param.replace('B', '')) if param != '' else None)
149
  elif k == 'Method':
 
63
 
64
  def BUILD_L1_DF(results, fields):
65
  check_box = {}
66
+ check_box['essential'] = ['Method', 'Param (B)', 'Language Model', 'Vision Model']
67
  # revise there to set default dataset
68
  check_box['required'] = ['Avg Score', 'Avg Rank'] + DEFAULT_BENCH
69
  check_box['avg'] = ['Avg Score', 'Avg Rank']
 
95
  continue
96
  meta = item['META']
97
  for k in META_FIELDS:
98
+ if k == 'Param (B)':
99
  param = meta['Parameters']
100
  res[k].append(float(param.replace('B', '')) if param != '' else None)
101
  elif k == 'Method':
 
120
  df = df.iloc[::-1]
121
 
122
  check_box = {}
123
+ check_box['essential'] = ['Method', 'Param (B)', 'Language Model', 'Vision Model']
124
  check_box['required'] = required_fields
125
  check_box['all'] = all_fields
126
  type_map = defaultdict(lambda: 'number')
 
143
  item = results[m]
144
  meta = item['META']
145
  for k in META_FIELDS:
146
+ if k == 'Param (B)':
147
  param = meta['Parameters']
148
  res[k].append(float(param.replace('B', '')) if param != '' else None)
149
  elif k == 'Method':
meta_data.py CHANGED
@@ -20,7 +20,7 @@ This leaderboard was last updated: {}.
20
  OpenVLM Leaderboard only includes open-source VLMs or API models that are publicly available. To add your own model to the leaderboard, please create a PR in [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) to support your VLM and then we will help with the evaluation and updating the leaderboard. For any questions or concerns, please feel free to contact us at [opencompass,duanhaodong]@pjlab.org.cn.
21
  """
22
  # CONSTANTS-FIELDS
23
- META_FIELDS = ['Method', 'Parameters (B)', 'Language Model', 'Vision Model', 'OpenSource', 'Verified']
24
  MAIN_FIELDS = [
25
  'MMBench_V11', 'MMStar', 'MME',
26
  'MMMU_VAL', 'MathVista', 'OCRBench', 'AI2D',
 
20
  OpenVLM Leaderboard only includes open-source VLMs or API models that are publicly available. To add your own model to the leaderboard, please create a PR in [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) to support your VLM and then we will help with the evaluation and updating the leaderboard. For any questions or concerns, please feel free to contact us at [opencompass,duanhaodong]@pjlab.org.cn.
21
  """
22
  # CONSTANTS-FIELDS
23
+ META_FIELDS = ['Method', 'Param (B)', 'Language Model', 'Vision Model', 'OpenSource', 'Verified']
24
  MAIN_FIELDS = [
25
  'MMBench_V11', 'MMStar', 'MME',
26
  'MMMU_VAL', 'MathVista', 'OCRBench', 'AI2D',