Spaces:
Running
Running
Upload 6 files
Browse files- app.py +488 -0
- constants.py +52 -0
- file/model_name_Open-Domain.json +9 -0
- file/results_Human-Domain.csv +15 -0
- file/results_Open-Domain.csv +9 -0
- file/results_Single-Domain.csv +10 -0
app.py
ADDED
@@ -0,0 +1,488 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
__all__ = ['block', 'make_clickable_model', 'make_clickable_user', 'get_submissions']
|
2 |
+
|
3 |
+
import gradio as gr
|
4 |
+
import pandas as pd
|
5 |
+
import json
|
6 |
+
import io
|
7 |
+
|
8 |
+
from constants import *
|
9 |
+
|
10 |
+
global filter_component, data_component_opendomain, data_component_humandomain, data_component_singledomain
|
11 |
+
|
12 |
+
def upload_file(files):
|
13 |
+
file_paths = [file.name for file in files]
|
14 |
+
return file_paths
|
15 |
+
|
16 |
+
|
17 |
+
def compute_scores(input_data):
|
18 |
+
return [None, [
|
19 |
+
input_data["total_score"],
|
20 |
+
input_data["aes_score"],
|
21 |
+
input_data["motion_score"],
|
22 |
+
input_data["facesim_cur"],
|
23 |
+
input_data["gme_score"],
|
24 |
+
input_data["nexus_score"],
|
25 |
+
input_data["natural_score"]
|
26 |
+
]]
|
27 |
+
|
28 |
+
def compute_scores_human_domain(input_data):
|
29 |
+
return [None, [
|
30 |
+
input_data["total_score"],
|
31 |
+
input_data["aes_score"],
|
32 |
+
input_data["motion_score"],
|
33 |
+
input_data["facesim_cur"],
|
34 |
+
input_data["gme_score"],
|
35 |
+
input_data["natural_score"]
|
36 |
+
]]
|
37 |
+
|
38 |
+
def add_opendomain_eval(
|
39 |
+
input_file,
|
40 |
+
model_name_textbox: str,
|
41 |
+
revision_name_textbox: str,
|
42 |
+
venue_type_dropdown: str,
|
43 |
+
model_link: str,
|
44 |
+
):
|
45 |
+
if input_file is None:
|
46 |
+
return "Error! Empty file!"
|
47 |
+
else:
|
48 |
+
selected_model_data = json.load(io.BytesIO(input_file))
|
49 |
+
|
50 |
+
scores = compute_scores(selected_model_data)
|
51 |
+
input_data = scores[1]
|
52 |
+
input_data = [float(i) for i in input_data]
|
53 |
+
|
54 |
+
csv_data = pd.read_csv(CSV_DIR_OPEN_DOMAIN_RESULTS)
|
55 |
+
|
56 |
+
if revision_name_textbox == '':
|
57 |
+
col = csv_data.shape[0]
|
58 |
+
model_name = model_name_textbox
|
59 |
+
name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in csv_data['Model']]
|
60 |
+
assert model_name not in name_list
|
61 |
+
else:
|
62 |
+
model_name = revision_name_textbox
|
63 |
+
model_name_list = csv_data['Model']
|
64 |
+
name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in model_name_list]
|
65 |
+
if revision_name_textbox not in name_list:
|
66 |
+
col = csv_data.shape[0]
|
67 |
+
else:
|
68 |
+
col = name_list.index(revision_name_textbox)
|
69 |
+
|
70 |
+
if model_link == '':
|
71 |
+
model_name = model_name # no url
|
72 |
+
else:
|
73 |
+
model_name = '[' + model_name + '](' + model_link + ')'
|
74 |
+
|
75 |
+
venue = venue_type_dropdown
|
76 |
+
|
77 |
+
new_data = [
|
78 |
+
model_name,
|
79 |
+
venue,
|
80 |
+
f"{input_data[0] * 100:.2f}%",
|
81 |
+
f"{input_data[1] * 100:.2f}%",
|
82 |
+
f"{input_data[2] * 100:.2f}%",
|
83 |
+
f"{input_data[3] * 100:.2f}%",
|
84 |
+
f"{input_data[4] * 100:.2f}%",
|
85 |
+
f"{input_data[5] * 100:.2f}%",
|
86 |
+
f"{input_data[6] * 100:.2f}%",
|
87 |
+
]
|
88 |
+
csv_data.loc[col] = new_data
|
89 |
+
csv_data.to_csv(CSV_DIR_OPEN_DOMAIN_RESULTS, index=False)
|
90 |
+
return "Evaluation successfully submitted!"
|
91 |
+
|
92 |
+
|
93 |
+
def add_humandomain_eval(
|
94 |
+
input_file,
|
95 |
+
model_name_textbox: str,
|
96 |
+
revision_name_textbox: str,
|
97 |
+
venue_type_dropdown: str,
|
98 |
+
model_link: str,
|
99 |
+
):
|
100 |
+
if input_file is None:
|
101 |
+
return "Error! Empty file!"
|
102 |
+
else:
|
103 |
+
selected_model_data = json.load(io.BytesIO(input_file))
|
104 |
+
|
105 |
+
scores = compute_scores_human_domain(selected_model_data)
|
106 |
+
input_data = scores[1]
|
107 |
+
input_data = [float(i) for i in input_data]
|
108 |
+
|
109 |
+
csv_data = pd.read_csv(CSV_DIR_HUMAN_DOMAIN_RESULTS)
|
110 |
+
|
111 |
+
if revision_name_textbox == '':
|
112 |
+
col = csv_data.shape[0]
|
113 |
+
model_name = model_name_textbox
|
114 |
+
name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in csv_data['Model']]
|
115 |
+
assert model_name not in name_list
|
116 |
+
else:
|
117 |
+
model_name = revision_name_textbox
|
118 |
+
model_name_list = csv_data['Model']
|
119 |
+
name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in model_name_list]
|
120 |
+
if revision_name_textbox not in name_list:
|
121 |
+
col = csv_data.shape[0]
|
122 |
+
else:
|
123 |
+
col = name_list.index(revision_name_textbox)
|
124 |
+
|
125 |
+
if model_link == '':
|
126 |
+
model_name = model_name # no url
|
127 |
+
else:
|
128 |
+
model_name = '[' + model_name + '](' + model_link + ')'
|
129 |
+
|
130 |
+
venue = venue_type_dropdown
|
131 |
+
|
132 |
+
new_data = [
|
133 |
+
model_name,
|
134 |
+
venue,
|
135 |
+
f"{input_data[0] * 100:.2f}%",
|
136 |
+
f"{input_data[1] * 100:.2f}%",
|
137 |
+
f"{input_data[2] * 100:.2f}%",
|
138 |
+
f"{input_data[3] * 100:.2f}%",
|
139 |
+
f"{input_data[4] * 100:.2f}%",
|
140 |
+
f"{input_data[5] * 100:.2f}%",
|
141 |
+
]
|
142 |
+
csv_data.loc[col] = new_data
|
143 |
+
csv_data.to_csv(CSV_DIR_HUMAN_DOMAIN_RESULTS, index=False)
|
144 |
+
return "Evaluation successfully submitted!"
|
145 |
+
|
146 |
+
|
147 |
+
def add_singledomain_eval(
|
148 |
+
input_file,
|
149 |
+
model_name_textbox: str,
|
150 |
+
revision_name_textbox: str,
|
151 |
+
venue_type_dropdown: str,
|
152 |
+
model_link: str,
|
153 |
+
):
|
154 |
+
if input_file is None:
|
155 |
+
return "Error! Empty file!"
|
156 |
+
else:
|
157 |
+
selected_model_data = json.load(io.BytesIO(input_file))
|
158 |
+
|
159 |
+
scores = compute_scores(selected_model_data)
|
160 |
+
input_data = scores[1]
|
161 |
+
input_data = [float(i) for i in input_data]
|
162 |
+
|
163 |
+
csv_data = pd.read_csv(CSV_DIR_SINGLE_DOMAIN_RESULTS)
|
164 |
+
|
165 |
+
if revision_name_textbox == '':
|
166 |
+
col = csv_data.shape[0]
|
167 |
+
model_name = model_name_textbox
|
168 |
+
name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in csv_data['Model']]
|
169 |
+
assert model_name not in name_list
|
170 |
+
else:
|
171 |
+
model_name = revision_name_textbox
|
172 |
+
model_name_list = csv_data['Model']
|
173 |
+
name_list = [name.split(']')[0][1:] if name.endswith(')') else name for name in model_name_list]
|
174 |
+
if revision_name_textbox not in name_list:
|
175 |
+
col = csv_data.shape[0]
|
176 |
+
else:
|
177 |
+
col = name_list.index(revision_name_textbox)
|
178 |
+
|
179 |
+
if model_link == '':
|
180 |
+
model_name = model_name # no url
|
181 |
+
else:
|
182 |
+
model_name = '[' + model_name + '](' + model_link + ')'
|
183 |
+
|
184 |
+
venue = venue_type_dropdown
|
185 |
+
|
186 |
+
new_data = [
|
187 |
+
model_name,
|
188 |
+
venue,
|
189 |
+
f"{input_data[0] * 100:.2f}%",
|
190 |
+
f"{input_data[1] * 100:.2f}%",
|
191 |
+
f"{input_data[2] * 100:.2f}%",
|
192 |
+
f"{input_data[3] * 100:.2f}%",
|
193 |
+
f"{input_data[4] * 100:.2f}%",
|
194 |
+
f"{input_data[5] * 100:.2f}%",
|
195 |
+
f"{input_data[6] * 100:.2f}%",
|
196 |
+
]
|
197 |
+
csv_data.loc[col] = new_data
|
198 |
+
csv_data.to_csv(CSV_DIR_SINGLE_DOMAIN_RESULTS, index=False)
|
199 |
+
return "Evaluation successfully submitted!"
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
def get_all_df_opendomain():
|
204 |
+
df = pd.read_csv(CSV_DIR_OPEN_DOMAIN_RESULTS)
|
205 |
+
df = df.sort_values(by="TotalScore↑", ascending=False)
|
206 |
+
return df
|
207 |
+
|
208 |
+
def get_baseline_df_opendomain():
|
209 |
+
df = pd.read_csv(CSV_DIR_OPEN_DOMAIN_RESULTS)
|
210 |
+
df = df.sort_values(by="TotalScore↑", ascending=False)
|
211 |
+
present_columns = MODEL_INFO + checkbox_group_opendomain.value
|
212 |
+
df = df[present_columns]
|
213 |
+
return df
|
214 |
+
|
215 |
+
def get_all_df_humandomain():
|
216 |
+
df = pd.read_csv(CSV_DIR_HUMAN_DOMAIN_RESULTS)
|
217 |
+
df = df.sort_values(by="TotalScore↑", ascending=False)
|
218 |
+
return df
|
219 |
+
|
220 |
+
def get_baseline_df_humandomain():
|
221 |
+
df = pd.read_csv(CSV_DIR_HUMAN_DOMAIN_RESULTS)
|
222 |
+
df = df.sort_values(by="TotalScore↑", ascending=False)
|
223 |
+
present_columns = MODEL_INFO + checkbox_group_humandomain.value
|
224 |
+
df = df[present_columns]
|
225 |
+
return df
|
226 |
+
|
227 |
+
|
228 |
+
def get_all_df_singledomain():
|
229 |
+
df = pd.read_csv(CSV_DIR_SINGLE_DOMAIN_RESULTS)
|
230 |
+
df = df.sort_values(by="TotalScore↑", ascending=False)
|
231 |
+
return df
|
232 |
+
|
233 |
+
def get_baseline_df_singledomain():
|
234 |
+
df = pd.read_csv(CSV_DIR_SINGLE_DOMAIN_RESULTS)
|
235 |
+
df = df.sort_values(by="TotalScore↑", ascending=False)
|
236 |
+
present_columns = MODEL_INFO + checkbox_group_singledomain.value
|
237 |
+
df = df[present_columns]
|
238 |
+
return df
|
239 |
+
|
240 |
+
block = gr.Blocks()
|
241 |
+
|
242 |
+
|
243 |
+
with block:
|
244 |
+
gr.Markdown(
|
245 |
+
LEADERBORAD_INTRODUCTION
|
246 |
+
)
|
247 |
+
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
248 |
+
# table Opendomain
|
249 |
+
with gr.TabItem("🏅 Open-Domain", elem_id="OpenS2V-Nexus-tab-table", id=0):
|
250 |
+
with gr.Row():
|
251 |
+
with gr.Accordion("Citation", open=False):
|
252 |
+
citation_button = gr.Textbox(
|
253 |
+
value=CITATION_BUTTON_TEXT,
|
254 |
+
label=CITATION_BUTTON_LABEL,
|
255 |
+
elem_id="citation-button",
|
256 |
+
show_copy_button=True
|
257 |
+
)
|
258 |
+
|
259 |
+
gr.Markdown(
|
260 |
+
TABLE_INTRODUCTION
|
261 |
+
)
|
262 |
+
|
263 |
+
checkbox_group_opendomain = gr.CheckboxGroup(
|
264 |
+
choices=ALL_RESULTS,
|
265 |
+
value=OPEN_DOMAIN_RESULTS,
|
266 |
+
label="Select options",
|
267 |
+
interactive=True,
|
268 |
+
)
|
269 |
+
|
270 |
+
data_component_opendomain = gr.components.Dataframe(
|
271 |
+
value=get_baseline_df_opendomain,
|
272 |
+
headers=COLUMN_NAMES,
|
273 |
+
type="pandas",
|
274 |
+
datatype=NEW_DATA_TITLE_TYPE,
|
275 |
+
interactive=False,
|
276 |
+
visible=True,
|
277 |
+
)
|
278 |
+
|
279 |
+
def on_checkbox_group_change_opendomain(selected_columns):
|
280 |
+
selected_columns = [item for item in ALL_RESULTS if item in selected_columns]
|
281 |
+
present_columns = MODEL_INFO + selected_columns
|
282 |
+
updated_data = get_baseline_df_opendomain()[present_columns]
|
283 |
+
updated_data = updated_data.sort_values(by=present_columns[1], ascending=False)
|
284 |
+
updated_headers = present_columns
|
285 |
+
update_datatype = [NEW_DATA_TITLE_TYPE[COLUMN_NAMES.index(x)] for x in updated_headers]
|
286 |
+
|
287 |
+
filter_component = gr.components.Dataframe(
|
288 |
+
value=updated_data,
|
289 |
+
headers=updated_headers,
|
290 |
+
type="pandas",
|
291 |
+
datatype=update_datatype,
|
292 |
+
interactive=False,
|
293 |
+
visible=True,
|
294 |
+
)
|
295 |
+
|
296 |
+
return filter_component
|
297 |
+
|
298 |
+
checkbox_group_opendomain.change(fn=on_checkbox_group_change_opendomain, inputs=checkbox_group_opendomain, outputs=data_component_opendomain)
|
299 |
+
|
300 |
+
|
301 |
+
# table HumanDomain
|
302 |
+
with gr.TabItem("🏅 Human-Domain", elem_id="OpenS2V-Nexus-tab-table", id=1):
|
303 |
+
with gr.Row():
|
304 |
+
with gr.Accordion("Citation", open=False):
|
305 |
+
citation_button = gr.Textbox(
|
306 |
+
value=CITATION_BUTTON_TEXT,
|
307 |
+
label=CITATION_BUTTON_LABEL,
|
308 |
+
elem_id="citation-button",
|
309 |
+
show_copy_button=True
|
310 |
+
)
|
311 |
+
|
312 |
+
gr.Markdown(
|
313 |
+
TABLE_INTRODUCTION_HUMAN
|
314 |
+
)
|
315 |
+
|
316 |
+
checkbox_group_humandomain = gr.CheckboxGroup(
|
317 |
+
choices=HUMAN_DOMAIN_RESULTS,
|
318 |
+
value=HUMAN_DOMAIN_RESULTS,
|
319 |
+
label="Select options",
|
320 |
+
interactive=True,
|
321 |
+
)
|
322 |
+
|
323 |
+
data_component_humandomain = gr.components.Dataframe(
|
324 |
+
value=get_baseline_df_humandomain,
|
325 |
+
headers=COLUMN_NAMES_HUMAN,
|
326 |
+
type="pandas",
|
327 |
+
datatype=NEW_DATA_TITLE_TYPE,
|
328 |
+
interactive=False,
|
329 |
+
visible=True,
|
330 |
+
)
|
331 |
+
|
332 |
+
def on_checkbox_group_change_humandomain(selected_columns):
|
333 |
+
selected_columns = [item for item in ALL_RESULTS if item in selected_columns]
|
334 |
+
present_columns = MODEL_INFO + selected_columns
|
335 |
+
updated_data = get_baseline_df_humandomain()[present_columns]
|
336 |
+
updated_data = updated_data.sort_values(by=present_columns[1], ascending=False)
|
337 |
+
updated_headers = present_columns
|
338 |
+
update_datatype = [NEW_DATA_TITLE_TYPE[COLUMN_NAMES_HUMAN.index(x)] for x in updated_headers]
|
339 |
+
|
340 |
+
filter_component = gr.components.Dataframe(
|
341 |
+
value=updated_data,
|
342 |
+
headers=updated_headers,
|
343 |
+
type="pandas",
|
344 |
+
datatype=update_datatype,
|
345 |
+
interactive=False,
|
346 |
+
visible=True,
|
347 |
+
)
|
348 |
+
|
349 |
+
return filter_component
|
350 |
+
|
351 |
+
checkbox_group_humandomain.change(fn=on_checkbox_group_change_humandomain, inputs=checkbox_group_humandomain, outputs=data_component_humandomain)
|
352 |
+
|
353 |
+
# table SingleDomain
|
354 |
+
with gr.TabItem("🏅 Single-Domain", elem_id="OpenS2V-Nexus-tab-table", id=2):
|
355 |
+
with gr.Row():
|
356 |
+
with gr.Accordion("Citation", open=False):
|
357 |
+
citation_button = gr.Textbox(
|
358 |
+
value=CITATION_BUTTON_TEXT,
|
359 |
+
label=CITATION_BUTTON_LABEL,
|
360 |
+
elem_id="citation-button",
|
361 |
+
show_copy_button=True
|
362 |
+
)
|
363 |
+
|
364 |
+
gr.Markdown(
|
365 |
+
TABLE_INTRODUCTION
|
366 |
+
)
|
367 |
+
|
368 |
+
checkbox_group_singledomain = gr.CheckboxGroup(
|
369 |
+
choices=ALL_RESULTS,
|
370 |
+
value=SINGLE_DOMAIN_RESULTS,
|
371 |
+
label="Select options",
|
372 |
+
interactive=True,
|
373 |
+
)
|
374 |
+
|
375 |
+
data_component_singledomain = gr.components.Dataframe(
|
376 |
+
value=get_baseline_df_singledomain,
|
377 |
+
headers=COLUMN_NAMES,
|
378 |
+
type="pandas",
|
379 |
+
datatype=NEW_DATA_TITLE_TYPE,
|
380 |
+
interactive=False,
|
381 |
+
visible=True,
|
382 |
+
)
|
383 |
+
|
384 |
+
def on_checkbox_group_change_singledomain(selected_columns):
|
385 |
+
selected_columns = [item for item in ALL_RESULTS if item in selected_columns]
|
386 |
+
present_columns = MODEL_INFO + selected_columns
|
387 |
+
updated_data = get_baseline_df_singledomain()[present_columns]
|
388 |
+
updated_data = updated_data.sort_values(by=present_columns[1], ascending=False)
|
389 |
+
updated_headers = present_columns
|
390 |
+
update_datatype = [NEW_DATA_TITLE_TYPE[COLUMN_NAMES.index(x)] for x in updated_headers]
|
391 |
+
|
392 |
+
filter_component = gr.components.Dataframe(
|
393 |
+
value=updated_data,
|
394 |
+
headers=updated_headers,
|
395 |
+
type="pandas",
|
396 |
+
datatype=update_datatype,
|
397 |
+
interactive=False,
|
398 |
+
visible=True,
|
399 |
+
)
|
400 |
+
|
401 |
+
return filter_component
|
402 |
+
|
403 |
+
checkbox_group_singledomain.change(fn=on_checkbox_group_change_singledomain, inputs=checkbox_group_singledomain, outputs=data_component_singledomain)
|
404 |
+
|
405 |
+
|
406 |
+
# table Submission
|
407 |
+
with gr.TabItem("🚀 Submit here! ", elem_id="seed-benchmark-tab-table", id=4):
|
408 |
+
with gr.Row():
|
409 |
+
gr.Markdown(SUBMIT_INTRODUCTION, elem_classes="markdown-text")
|
410 |
+
|
411 |
+
with gr.Row():
|
412 |
+
gr.Markdown("# ✉️✨ Submit your result here!", elem_classes="markdown-text")
|
413 |
+
|
414 |
+
with gr.Row():
|
415 |
+
with gr.Column():
|
416 |
+
model_name_textbox = gr.Textbox(
|
417 |
+
label="Model name", placeholder="ConsisID"
|
418 |
+
)
|
419 |
+
revision_name_textbox = gr.Textbox(
|
420 |
+
label="Revision Model Name", placeholder="ConsisID"
|
421 |
+
)
|
422 |
+
venue_type_dropdown = gr.Dropdown(
|
423 |
+
label="Venue Type",
|
424 |
+
choices=["Open-Source", "Close-Source"],
|
425 |
+
value="Open-Source"
|
426 |
+
)
|
427 |
+
model_link = gr.Textbox(
|
428 |
+
label="Model Link", placeholder="https://github.com/PKU-YuanGroup/ConsisID"
|
429 |
+
)
|
430 |
+
|
431 |
+
with gr.Column():
|
432 |
+
input_file = gr.File(label="Click to Upload a json File", type='binary')
|
433 |
+
|
434 |
+
submit_button_opendomain = gr.Button("Submit Result (Open-Domain)")
|
435 |
+
submit_button_humandomain = gr.Button("Submit Result (Human-Domain)")
|
436 |
+
submit_button_singledomain = gr.Button("Submit Result (Single-Domain)")
|
437 |
+
|
438 |
+
submission_result = gr.Markdown()
|
439 |
+
|
440 |
+
submit_button_opendomain.click(
|
441 |
+
add_opendomain_eval,
|
442 |
+
inputs=[
|
443 |
+
input_file,
|
444 |
+
model_name_textbox,
|
445 |
+
revision_name_textbox,
|
446 |
+
venue_type_dropdown,
|
447 |
+
model_link,
|
448 |
+
],
|
449 |
+
outputs = submission_result,
|
450 |
+
)
|
451 |
+
|
452 |
+
submit_button_humandomain.click(
|
453 |
+
add_humandomain_eval,
|
454 |
+
inputs=[
|
455 |
+
input_file,
|
456 |
+
model_name_textbox,
|
457 |
+
revision_name_textbox,
|
458 |
+
venue_type_dropdown,
|
459 |
+
model_link,
|
460 |
+
],
|
461 |
+
outputs = submission_result,
|
462 |
+
)
|
463 |
+
|
464 |
+
submit_button_singledomain.click(
|
465 |
+
add_singledomain_eval,
|
466 |
+
inputs=[
|
467 |
+
input_file,
|
468 |
+
model_name_textbox,
|
469 |
+
revision_name_textbox,
|
470 |
+
venue_type_dropdown,
|
471 |
+
model_link,
|
472 |
+
],
|
473 |
+
outputs = submission_result,
|
474 |
+
)
|
475 |
+
|
476 |
+
with gr.Row():
|
477 |
+
data_run = gr.Button("Refresh")
|
478 |
+
data_run.click(
|
479 |
+
get_baseline_df_opendomain, outputs=data_component_opendomain
|
480 |
+
)
|
481 |
+
data_run.click(
|
482 |
+
get_baseline_df_humandomain, outputs=data_component_humandomain
|
483 |
+
)
|
484 |
+
data_run.click(
|
485 |
+
get_baseline_df_singledomain, outputs=data_component_singledomain
|
486 |
+
)
|
487 |
+
|
488 |
+
block.launch()
|
constants.py
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MODEL_INFO = ["Model", "Venue"]
|
2 |
+
|
3 |
+
ALL_RESULTS = ["TotalScore↑","Aesthetics↑", "Motion↑", "FaceSim↑", "GmeScore↑", "NexusScore↑", "NaturalScore↑"]
|
4 |
+
|
5 |
+
OPEN_DOMAIN_RESULTS = ["TotalScore↑","Aesthetics↑", "Motion↑", "FaceSim↑", "GmeScore↑", "NexusScore↑", "NaturalScore↑"]
|
6 |
+
HUMAN_DOMAIN_RESULTS = ["TotalScore↑","Aesthetics↑", "Motion↑", "FaceSim↑", "GmeScore↑", "NaturalScore↑"]
|
7 |
+
SINGLE_DOMAIN_RESULTS = ["TotalScore↑","Aesthetics↑", "Motion↑", "FaceSim↑", "GmeScore↑", "NexusScore↑", "NaturalScore↑"]
|
8 |
+
|
9 |
+
NEW_DATA_TITLE_TYPE = ["markdown", 'markdown', "number", "number", "number", "number", "number", "number", "number"]
|
10 |
+
|
11 |
+
CSV_DIR_OPEN_DOMAIN_RESULTS = "./file/results_Open-Domain.csv"
|
12 |
+
CSV_DIR_HUMAN_DOMAIN_RESULTS = "./file/results_Human-Domain.csv"
|
13 |
+
CSV_DIR_SINGLE_DOMAIN_RESULTS = "./file/results_Single-Domain.csv"
|
14 |
+
|
15 |
+
COLUMN_NAMES = MODEL_INFO + ALL_RESULTS
|
16 |
+
COLUMN_NAMES_HUMAN = MODEL_INFO + HUMAN_DOMAIN_RESULTS
|
17 |
+
|
18 |
+
LEADERBORAD_INTRODUCTION = """
|
19 |
+
<div style='display: flex; align-items: center; justify-content: center; text-align: center;'>
|
20 |
+
<img src='https://github.com/PKU-YuanGroup/OpenS2V-Nexus/blob/main/__assets__/OpenS2V-Nexus_logo.png?raw=true' style='width: 400px; height: auto; margin-right: 10px;' />
|
21 |
+
</div>
|
22 |
+
|
23 |
+
# OpenS2V-Eval Leaderboard
|
24 |
+
|
25 |
+
Welcome to the leaderboard of the OpenS2V-Eval!
|
26 |
+
|
27 |
+
🏆 OpenS2V-Eval is a core component of **OpenS2V-Nexus**, designed to establish a foundational infrastructure for *Subject-to-Video* (S2V) generation. It presents 180 prompts spanning seven major categories of S2V, incorporating both real and synthetic test data. To better align evaluation with human preferences, it introduce three new automatic metrics—NexusScore, NaturalScore, and GmeScore—that independently assess subject consistency, naturalness, and textual relevance in generated videos.
|
28 |
+
|
29 |
+
If you like our project, please give us a star ⭐ on GitHub for the latest update.
|
30 |
+
|
31 |
+
[GitHub](https://github.com/PKU-YuanGroup/OpenS2V-Nexus) | [Arxiv](https://arxiv.org/) | [Home Page](https://pku-yuangroup.github.io/OpenS2V-Nexus/) | [OpenS2V-Eval](https://huggingface.co/datasets/BestWishYsh/OpenS2V-Eval) | [OpenS2V-5M](https://huggingface.co/datasets/BestWishYsh/OpenS2V-5M)
|
32 |
+
"""
|
33 |
+
|
34 |
+
SUBMIT_INTRODUCTION = """# Submission Guidelines
|
35 |
+
1. Fill in *'Model Name'* if it is your first time to submit your result **or** Fill in *'Revision Model Name'* if you want to update your result.
|
36 |
+
2. Fill in your home page to *'Model Link'*.
|
37 |
+
3. After evaluation, follow the guidance in the [github repository](https://github.com/PKU-YuanGroup/OpenS2V-Nexus) to obtain `model_name.json` and upload it here.
|
38 |
+
4. Click the *'Submit Eval'* button.
|
39 |
+
5. Click *'Refresh'* to obtain the updated leaderboard.
|
40 |
+
"""
|
41 |
+
|
42 |
+
TABLE_INTRODUCTION = """In the table below, we summarize each task performance of all the models.
|
43 |
+
We use Aesthetic, Motion, FaceSim, GmeScore, NexusScore, and NaturalScore as the primary evaluation metric for each tasks.
|
44 |
+
"""
|
45 |
+
|
46 |
+
TABLE_INTRODUCTION_HUMAN = """In the table below, we summarize each task performance of all the models.
|
47 |
+
We use Aesthetic, Motion, FaceSim, GmeScore, and NaturalScore as the primary evaluation metric for each tasks.
|
48 |
+
"""
|
49 |
+
|
50 |
+
CITATION_BUTTON_LABEL = "Copy the following snippet to cite these results"
|
51 |
+
CITATION_BUTTON_TEXT = r"""@article{
|
52 |
+
}"""
|
file/model_name_Open-Domain.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"total_score": 0.5450864321738482,
|
3 |
+
"aes_score": 0.3343864281972249,
|
4 |
+
"motion_score": 0.1945268139243126,
|
5 |
+
"facesim_cur": 0.9420197624713182,
|
6 |
+
"gme_score": 0.6767578125,
|
7 |
+
"nexus_score": 0.260009765625,
|
8 |
+
"natural_score": 0.6666666666666667
|
9 |
+
}
|
file/results_Human-Domain.csv
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Model,Venue,TotalScore↑,Aesthetics↑,Motion↑,FaceSim↑,GmeScore↑,NaturalScore↑
|
2 |
+
[Vidu2.0(20250503)](https://www.vidu.cn/),Closed-Source,51.11%,47.33%,14.80%,38.50%,70.42%,71.99%
|
3 |
+
[Pika2.1(20250503)](https://pika.art/),Closed-Source,52.56%,52.39%,28.94%,29.41%,75.03%,72.53%
|
4 |
+
[Kling1.6(20250503)](https://app.klingai.com/cn/),Closed-Source,59.13%,50.94%,50.55%,41.02%,67.79%,78.28%
|
5 |
+
[VACE-P1.3B](https://github.com/ali-vilab/VACE),Open-Source,46.28%,51.45%,8.78%,19.98%,73.27%,70.89%
|
6 |
+
[VACE-1.3B](https://github.com/ali-vilab/VACE),Open-Source,49.02%,53.18%,16.87%,22.29%,73.61%,73.00%
|
7 |
+
[VACE-14B](https://github.com/ali-vilab/VACE),Open-Source,58.57%,52.78%,11.76%,64.65%,69.53%,74.33%
|
8 |
+
[Phantom-1.3B](https://github.com/Phantom-video/Phantom),Open-Source,53.64%,50.80%,14.14%,46.30%,72.17%,71.67%
|
9 |
+
[SkyReels-A2-P14B](https://github.com/SkyworkAI/SkyReels-V2),Open-Source,54.27%,39.88%,31.98%,55.02%,63.63%,67.33%
|
10 |
+
[HunyuanCustom](https://github.com/Tencent-Hunyuan/HunyuanCustom),Open-Source,55.85%,49.67%,15.13%,62.25%,69.78%,67.00%
|
11 |
+
[Hailuo](https://hailuoai.video/),Closed-Source,60.20%,52.75%,31.83%,57.79%,71.42%,74.52%
|
12 |
+
[ConsisID](https://github.com/PKU-YuanGroup/ConsisID),Open-Source,52.97%,41.76%,38.12%,43.14%,72.03%,64.67%
|
13 |
+
[Concat-ID](https://github.com/ML-GSAI/Concat-ID),Open-Source,53.32%,44.13%,31.76%,43.83%,73.67%,66.44%
|
14 |
+
[FantasyID](https://github.com/Fantasy-AMAP/fantasy-id),Open-Source,49.80%,45.60%,23.48%,32.42%,72.68%,68.11%
|
15 |
+
[EchoVideo](https://github.com/bytedance/EchoVideo),Open-Source,54.52%,39.93%,35.16%,48.57%,68.40%,69.22%
|
file/results_Open-Domain.csv
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Model,Venue,TotalScore↑,Aesthetics↑,Motion↑,FaceSim↑,GmeScore↑,NexusScore↑,NaturalScore↑
|
2 |
+
[Vidu2.0(20250503)](https://www.vidu.cn/),Closed-Source,47.59%,41.47%,13.52%,35.11%,67.57%,43.55%,71.44%
|
3 |
+
[Pika2.1(20250503)](https://pika.art/),Closed-Source,48.88%,46.87%,24.70%,30.80%,69.21%,45.41%,69.79%
|
4 |
+
[Kling1.6(20250503)](https://app.klingai.com/cn/),Closed-Source,54.46%,44.60%,41.60%,40.10%,66.20%,45.92%,79.06%
|
5 |
+
[VACE-P1.3B](https://github.com/ali-vilab/VACE),Open-Source,43.95%,47.27%,12.03%,16.58%,71.38%,40.04%,70.56%
|
6 |
+
[VACE-1.3B](https://github.com/ali-vilab/VACE),Open-Source,45.53%,48.24%,18.83%,20.58%,71.26%,37.95%,71.78%
|
7 |
+
[VACE-14B](https://github.com/ali-vilab/VACE),Open-Source,52.87%,47.21%,15.02%,55.09%,67.27%,44.20%,72.78%
|
8 |
+
[Phantom-1.3B](https://github.com/Phantom-video/Phantom),Open-Source,50.71%,46.67%,14.29%,48.55%,69.43%,42.44%,70.26%
|
9 |
+
[SkyReels-A2-P14B](https://github.com/SkyworkAI/SkyReels-V2),Open-Source,49.61%,39.40%,25.60%,45.95%,64.54%,43.77%,67.22%
|
file/results_Single-Domain.csv
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Model,Venue,TotalScore↑,Aesthetics↑,Motion↑,FaceSim↑,GmeScore↑,NexusScore↑,NaturalScore↑
|
2 |
+
[Vidu2.0(20250503)](https://www.vidu.cn/),Closed-Source,48.67%,34.78%,24.40%,36.20%,65.56%,45.20%,72.60%
|
3 |
+
[Pika2.1(20250503)](https://pika.art/),Closed-Source,48.93%,38.64%,31.90%,32.94%,62.19%,47.34%,70.60%
|
4 |
+
[Kling1.6(20250503)](https://app.klingai.com/cn/),Closed-Source,53.12%,35.63%,36.40%,39.26%,61.99%,48.24%,81.40%
|
5 |
+
[VACE-P1.3B](https://github.com/ali-vilab/VACE),Open-Source,44.28%,42.58%,18.00%,18.02%,65.93%,36.26%,76.00%
|
6 |
+
[VACE-1.3B](https://github.com/ali-vilab/VACE),Open-Source,47.33%,41.81%,33.78%,22.38%,65.35%,38.52%,76.00%
|
7 |
+
[VACE-14B](https://github.com/ali-vilab/VACE),Open-Source,58.00%,41.30%,35.54%,64.65%,58.55%,51.33%,77.33%
|
8 |
+
[Phantom-1.3B](https://github.com/Phantom-video/Phantom),Open-Source,49.95%,42.98%,19.30%,44.03%,65.61%,37.78%,76.00%
|
9 |
+
[SkyReels-A2-P14B](https://github.com/SkyworkAI/SkyReels-V2),Open-Source,51.64%,33.83%,21.60%,54.42%,61.93%,48.63%,70.60%
|
10 |
+
[HunyuanCustom](https://github.com/Tencent-Hunyuan/HunyuanCustom),Open-Source,51.64%,34.08%,26.83%,55.93%,54.31%,50.75%,68.66%
|