Spaces:
Running
Running
AlanLiangC
commited on
Commit
·
9b69df9
1
Parent(s):
7fdfd5f
first commit
Browse files- app.py +329 -196
- src/UNKNOWN.egg-info/PKG-INFO +3 -0
- src/UNKNOWN.egg-info/SOURCES.txt +15 -0
- src/UNKNOWN.egg-info/dependency_links.txt +1 -0
- src/UNKNOWN.egg-info/top_level.txt +6 -0
- worldlens-results/dreamforge.json +34 -0
- worldlens-results/magicdrive.json +34 -0
app.py
CHANGED
|
@@ -1,204 +1,337 @@
|
|
| 1 |
-
import
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
| 3 |
import pandas as pd
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
)
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30, token=TOKEN
|
| 47 |
)
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
cant_deselect=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
|
| 69 |
-
label="Select Columns to Display:",
|
| 70 |
-
),
|
| 71 |
-
search_columns=[AutoEvalColumn.model.name, AutoEvalColumn.license.name],
|
| 72 |
-
hide_columns=[c.name for c in fields(AutoEvalColumn) if c.hidden],
|
| 73 |
-
filter_columns=[
|
| 74 |
-
ColumnFilter(AutoEvalColumn.model_type.name, type="checkboxgroup", label="Model types"),
|
| 75 |
-
ColumnFilter(AutoEvalColumn.precision.name, type="checkboxgroup", label="Precision"),
|
| 76 |
-
ColumnFilter(
|
| 77 |
-
AutoEvalColumn.params.name,
|
| 78 |
-
type="slider",
|
| 79 |
-
min=0.01,
|
| 80 |
-
max=150,
|
| 81 |
-
label="Select the number of parameters (B)",
|
| 82 |
-
),
|
| 83 |
-
ColumnFilter(
|
| 84 |
-
AutoEvalColumn.still_on_hub.name, type="boolean", label="Deleted/incomplete", default=True
|
| 85 |
-
),
|
| 86 |
-
],
|
| 87 |
-
bool_checkboxgroup_label="Hide models",
|
| 88 |
-
interactive=False,
|
| 89 |
)
|
| 90 |
|
|
|
|
| 91 |
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
with gr.Row():
|
| 126 |
-
running_eval_table = gr.components.Dataframe(
|
| 127 |
-
value=running_eval_queue_df,
|
| 128 |
-
headers=EVAL_COLS,
|
| 129 |
-
datatype=EVAL_TYPES,
|
| 130 |
-
row_count=5,
|
| 131 |
-
)
|
| 132 |
-
|
| 133 |
-
with gr.Accordion(
|
| 134 |
-
f"⏳ Pending Evaluation Queue ({len(pending_eval_queue_df)})",
|
| 135 |
-
open=False,
|
| 136 |
-
):
|
| 137 |
-
with gr.Row():
|
| 138 |
-
pending_eval_table = gr.components.Dataframe(
|
| 139 |
-
value=pending_eval_queue_df,
|
| 140 |
-
headers=EVAL_COLS,
|
| 141 |
-
datatype=EVAL_TYPES,
|
| 142 |
-
row_count=5,
|
| 143 |
-
)
|
| 144 |
-
with gr.Row():
|
| 145 |
-
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
| 146 |
-
|
| 147 |
-
with gr.Row():
|
| 148 |
-
with gr.Column():
|
| 149 |
-
model_name_textbox = gr.Textbox(label="Model name")
|
| 150 |
-
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
| 151 |
-
model_type = gr.Dropdown(
|
| 152 |
-
choices=[t.to_str(" : ") for t in ModelType if t != ModelType.Unknown],
|
| 153 |
-
label="Model type",
|
| 154 |
-
multiselect=False,
|
| 155 |
-
value=None,
|
| 156 |
-
interactive=True,
|
| 157 |
-
)
|
| 158 |
-
|
| 159 |
-
with gr.Column():
|
| 160 |
-
precision = gr.Dropdown(
|
| 161 |
-
choices=[i.value.name for i in Precision if i != Precision.Unknown],
|
| 162 |
-
label="Precision",
|
| 163 |
-
multiselect=False,
|
| 164 |
-
value="float16",
|
| 165 |
-
interactive=True,
|
| 166 |
-
)
|
| 167 |
-
weight_type = gr.Dropdown(
|
| 168 |
-
choices=[i.value.name for i in WeightType],
|
| 169 |
-
label="Weights type",
|
| 170 |
-
multiselect=False,
|
| 171 |
-
value="Original",
|
| 172 |
-
interactive=True,
|
| 173 |
-
)
|
| 174 |
-
base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
|
| 175 |
-
|
| 176 |
-
submit_button = gr.Button("Submit Eval")
|
| 177 |
-
submission_result = gr.Markdown()
|
| 178 |
-
submit_button.click(
|
| 179 |
-
add_new_eval,
|
| 180 |
-
[
|
| 181 |
-
model_name_textbox,
|
| 182 |
-
base_model_name_textbox,
|
| 183 |
-
revision_name_textbox,
|
| 184 |
-
precision,
|
| 185 |
-
weight_type,
|
| 186 |
-
model_type,
|
| 187 |
-
],
|
| 188 |
-
submission_result,
|
| 189 |
-
)
|
| 190 |
|
| 191 |
with gr.Row():
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import glob
|
| 3 |
+
import json
|
| 4 |
+
from typing import Dict, Literal, Tuple, List, Optional
|
| 5 |
+
|
| 6 |
import pandas as pd
|
| 7 |
+
import matplotlib.pyplot as plt
|
| 8 |
+
import gradio as gr
|
| 9 |
+
|
| 10 |
+
RESULTS_DIR = "./worldlens-results"
|
| 11 |
+
|
| 12 |
+
# 指标好坏方向
|
| 13 |
+
METRICS_MIN_BETTER = [
|
| 14 |
+
"Depth Discrepancy", "Perceptual Discrepancy",
|
| 15 |
+
"Photometric Error", "Geometric Discrepancy",
|
| 16 |
+
"Novel-View Discrepancy",
|
| 17 |
+
"Displacement Error",
|
| 18 |
+
]
|
| 19 |
+
|
| 20 |
+
METRICS_MAX_BETTER = [
|
| 21 |
+
"Subject Fidelity", "Subject Coherence", "Subject Consistency",
|
| 22 |
+
"Temporal Consistency", "Semantic Consistency",
|
| 23 |
+
"View Consistency", # 你的 JSON 里有这个,默认认为越大越好
|
| 24 |
+
"Novel-View Quality",
|
| 25 |
+
"Open-Loop Adherence", "Route Completion", "Closed-Loop Adherence",
|
| 26 |
+
"Map Segmentation", "3D Object Detection", "3D Object Tracking",
|
| 27 |
+
"Occupancy Prediction",
|
| 28 |
+
]
|
| 29 |
+
|
| 30 |
+
METRIC_BETTER: Dict[str, Literal["min", "max"]] = {
|
| 31 |
+
m: "min" for m in METRICS_MIN_BETTER
|
| 32 |
+
}
|
| 33 |
+
METRIC_BETTER.update({m: "max" for m in METRICS_MAX_BETTER})
|
| 34 |
+
|
| 35 |
+
# 下拉框展示的所有指标(去重+排序)
|
| 36 |
+
METRIC_CHOICES: List[str] = sorted(set(METRICS_MIN_BETTER + METRICS_MAX_BETTER))
|
| 37 |
+
DEFAULT_METRIC = "Subject Fidelity" if "Subject Fidelity" in METRIC_CHOICES else METRIC_CHOICES[0]
|
| 38 |
+
|
| 39 |
+
# 全局 DataFrame(所有模型)
|
| 40 |
+
df_all: Optional[pd.DataFrame] = None
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
def load_results() -> pd.DataFrame:
|
| 44 |
+
"""
|
| 45 |
+
从 ./worldlens-results 读取所有 json,整理成一个宽表:
|
| 46 |
+
每一行是一个模型,每一列是一个指标。
|
| 47 |
+
"""
|
| 48 |
+
rows = []
|
| 49 |
+
|
| 50 |
+
json_files = sorted(glob.glob(os.path.join(RESULTS_DIR, "*.json")))
|
| 51 |
+
if not json_files:
|
| 52 |
+
return pd.DataFrame()
|
| 53 |
+
|
| 54 |
+
for path in json_files:
|
| 55 |
+
with open(path, "r") as f:
|
| 56 |
+
data = json.load(f)
|
| 57 |
+
|
| 58 |
+
model_name = os.path.splitext(os.path.basename(path))[0]
|
| 59 |
+
venue = data.get("venue", "")
|
| 60 |
+
date = data.get("data", "") # 你这边字段叫 data,我就直接用
|
| 61 |
+
|
| 62 |
+
row = {
|
| 63 |
+
"Model": model_name,
|
| 64 |
+
"venue": venue,
|
| 65 |
+
"date": date,
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
metrics = data.get("Metrics", {})
|
| 69 |
+
# 展开所有子字典,列名直接用 metric 名称(假设唯一)
|
| 70 |
+
for category, metric_dict in metrics.items():
|
| 71 |
+
if not isinstance(metric_dict, dict):
|
| 72 |
+
continue
|
| 73 |
+
for metric_name, value in metric_dict.items():
|
| 74 |
+
row[metric_name] = value
|
| 75 |
+
|
| 76 |
+
rows.append(row)
|
| 77 |
+
|
| 78 |
+
df = pd.DataFrame(rows)
|
| 79 |
+
|
| 80 |
+
# 统一列顺序:meta + 指标
|
| 81 |
+
meta_cols = ["Model", "venue", "date"]
|
| 82 |
+
metric_cols = [c for c in df.columns if c not in meta_cols]
|
| 83 |
+
df = df[meta_cols + metric_cols]
|
| 84 |
+
|
| 85 |
+
return df
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def get_venue_choices(df: pd.DataFrame) -> List[str]:
|
| 89 |
+
if "venue" not in df.columns:
|
| 90 |
+
return ["All"]
|
| 91 |
+
venues = sorted([v for v in df["venue"].dropna().unique() if v != ""])
|
| 92 |
+
return ["All"] + venues
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def update_leaderboard(
|
| 96 |
+
metric: str,
|
| 97 |
+
top_k: int,
|
| 98 |
+
model_filter: str,
|
| 99 |
+
venue_filter: str,
|
| 100 |
+
sort_mode: str,
|
| 101 |
+
selected_metrics: Optional[List[str]],
|
| 102 |
+
) -> Tuple[pd.DataFrame, plt.Figure]:
|
| 103 |
+
"""
|
| 104 |
+
根据用户选择更新排行榜表格与条形图。
|
| 105 |
+
metric: 用于排序 & 画图的主指标
|
| 106 |
+
selected_metrics: 勾选的“想在表格中展示”的其它指标(可以多个)
|
| 107 |
+
"""
|
| 108 |
+
global df_all
|
| 109 |
+
|
| 110 |
+
if df_all is None or df_all.empty:
|
| 111 |
+
# 空表兜底
|
| 112 |
+
fig, ax = plt.subplots(figsize=(6, 3))
|
| 113 |
+
ax.text(0.5, 0.5, "No results found in ./worldlens-results",
|
| 114 |
+
ha="center", va="center")
|
| 115 |
+
ax.axis("off")
|
| 116 |
+
return pd.DataFrame(), fig
|
| 117 |
+
|
| 118 |
+
df = df_all.copy()
|
| 119 |
+
|
| 120 |
+
# 模型名过滤
|
| 121 |
+
if model_filter:
|
| 122 |
+
df = df[df["Model"].str.contains(model_filter, case=False, regex=False)]
|
| 123 |
+
|
| 124 |
+
# venue 过滤
|
| 125 |
+
if venue_filter and venue_filter != "All":
|
| 126 |
+
df = df[df["venue"] == venue_filter]
|
| 127 |
+
|
| 128 |
+
if metric not in df.columns:
|
| 129 |
+
fig, ax = plt.subplots(figsize=(6, 3))
|
| 130 |
+
ax.text(0.5, 0.5, f"Metric '{metric}' not found in current data.", ha="center", va="center")
|
| 131 |
+
ax.axis("off")
|
| 132 |
+
return pd.DataFrame(), fig
|
| 133 |
+
|
| 134 |
+
# 排序方向
|
| 135 |
+
better = METRIC_BETTER.get(metric, "max")
|
| 136 |
+
if sort_mode == "Auto":
|
| 137 |
+
ascending = (better == "min")
|
| 138 |
+
elif sort_mode == "Ascending (small → large)":
|
| 139 |
+
ascending = True
|
| 140 |
+
else: # "Descending (large → small)"
|
| 141 |
+
ascending = False
|
| 142 |
+
|
| 143 |
+
df_sorted = df.sort_values(metric, ascending=ascending)
|
| 144 |
+
|
| 145 |
+
# Top-K
|
| 146 |
+
df_top = df_sorted.head(top_k).copy()
|
| 147 |
+
|
| 148 |
+
# 构造表格列:
|
| 149 |
+
# 固定: Model, venue, date
|
| 150 |
+
# + 勾选的指标
|
| 151 |
+
# + 排序指标(如果没选)
|
| 152 |
+
cols = ["Model", "venue", "date"]
|
| 153 |
+
|
| 154 |
+
if selected_metrics is None:
|
| 155 |
+
selected_metrics = []
|
| 156 |
+
|
| 157 |
+
# 去掉不在 df_top 里的指标(有些 metric 可能某些 json 里没计算)
|
| 158 |
+
for m in selected_metrics:
|
| 159 |
+
if m in df_top.columns and m not in cols:
|
| 160 |
+
cols.append(m)
|
| 161 |
+
|
| 162 |
+
if metric in df_top.columns and metric not in cols:
|
| 163 |
+
cols.append(metric)
|
| 164 |
+
|
| 165 |
+
table_df = df_top[cols].round(3)
|
| 166 |
+
|
| 167 |
+
# 画条形图(只画排序指标)
|
| 168 |
+
fig, ax = plt.subplots(figsize=(9, 4))
|
| 169 |
+
ax.barh(table_df["Model"], df_top[metric].iloc[:len(table_df)])
|
| 170 |
+
ax.set_xlabel(metric)
|
| 171 |
+
ax.set_ylabel("Model")
|
| 172 |
+
ax.set_title(f"Leaderboard by {metric}")
|
| 173 |
+
|
| 174 |
+
# 为了让「最好的」在上面:如果按升序(小→大),我们反转 y 轴,让更小的在上。
|
| 175 |
+
if ascending:
|
| 176 |
+
ax.invert_yaxis()
|
| 177 |
+
|
| 178 |
+
plt.tight_layout()
|
| 179 |
+
|
| 180 |
+
return table_df, fig
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
def reload_data():
|
| 184 |
+
"""
|
| 185 |
+
点击“Reload JSONs” / 页面加载时调用:
|
| 186 |
+
重新加载所有 json,并返回:
|
| 187 |
+
- 状态文字
|
| 188 |
+
- venue_dropdown 的更新
|
| 189 |
+
- 默认的表格和图
|
| 190 |
+
"""
|
| 191 |
+
global df_all
|
| 192 |
+
df_all = load_results()
|
| 193 |
+
|
| 194 |
+
if df_all is None or df_all.empty:
|
| 195 |
+
msg = "No JSON files found in ./worldlens-results. Please upload some results."
|
| 196 |
+
dummy_fig, ax = plt.subplots(figsize=(6, 3))
|
| 197 |
+
ax.text(0.5, 0.5, msg, ha="center", va="center")
|
| 198 |
+
ax.axis("off")
|
| 199 |
+
|
| 200 |
+
venue_update = gr.update(choices=["All"], value="All")
|
| 201 |
+
|
| 202 |
+
return msg, venue_update, pd.DataFrame(), dummy_fig
|
| 203 |
+
|
| 204 |
+
venue_choices = get_venue_choices(df_all)
|
| 205 |
+
msg = f"Loaded {len(df_all)} models from {RESULTS_DIR}"
|
| 206 |
+
|
| 207 |
+
# 用默认 metric 画一次(selected_metrics 先用一个简单默认)
|
| 208 |
+
default_selected = ["Subject Fidelity", "Temporal Consistency", "Map Segmentation"]
|
| 209 |
+
default_selected = [m for m in default_selected if m in METRIC_CHOICES]
|
| 210 |
+
|
| 211 |
+
table_df, fig = update_leaderboard(
|
| 212 |
+
metric=DEFAULT_METRIC,
|
| 213 |
+
top_k=10,
|
| 214 |
+
model_filter="",
|
| 215 |
+
venue_filter="All",
|
| 216 |
+
sort_mode="Auto",
|
| 217 |
+
selected_metrics=default_selected,
|
| 218 |
)
|
| 219 |
+
|
| 220 |
+
venue_update = gr.update(
|
| 221 |
+
choices=venue_choices,
|
| 222 |
+
value="All",
|
| 223 |
+
interactive=True,
|
|
|
|
| 224 |
)
|
| 225 |
+
|
| 226 |
+
return msg, venue_update, table_df, fig
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
with gr.Blocks(css="""
|
| 230 |
+
#title {
|
| 231 |
+
text-align: center;
|
| 232 |
+
}
|
| 233 |
+
""") as demo:
|
| 234 |
+
gr.Markdown(
|
| 235 |
+
"""
|
| 236 |
+
# 🌍 WorldLens Leaderboard
|
| 237 |
+
|
| 238 |
+
基于 `./worldlens-results/*.json` 的自动排行榜:
|
| 239 |
+
- 选择一个**排序指标**用来排名
|
| 240 |
+
- 勾选多个指标一起在表格中展示
|
| 241 |
+
- 支持模型名搜索 & venue 筛选
|
| 242 |
+
- 自动区分“越大越好 / 越小越好”的指标
|
| 243 |
+
""",
|
| 244 |
+
elem_id="title"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
)
|
| 246 |
|
| 247 |
+
status_box = gr.Markdown("Loading results...", elem_id="status")
|
| 248 |
|
| 249 |
+
with gr.Row():
|
| 250 |
+
metric_dropdown = gr.Dropdown(
|
| 251 |
+
label="排序指标 / Metric (for ranking)",
|
| 252 |
+
choices=METRIC_CHOICES, # 固定 choices,避免动态更新不兼容
|
| 253 |
+
value=DEFAULT_METRIC,
|
| 254 |
+
interactive=True,
|
| 255 |
+
)
|
| 256 |
+
sort_mode_radio = gr.Radio(
|
| 257 |
+
label="排序方式 / Sort mode",
|
| 258 |
+
choices=[
|
| 259 |
+
"Auto",
|
| 260 |
+
"Ascending (small → large)",
|
| 261 |
+
"Descending (large → small)",
|
| 262 |
+
],
|
| 263 |
+
value="Auto",
|
| 264 |
+
interactive=True,
|
| 265 |
+
)
|
| 266 |
+
topk_slider = gr.Slider(
|
| 267 |
+
label="显示 Top-K 模型 / Top-K",
|
| 268 |
+
minimum=3,
|
| 269 |
+
maximum=50,
|
| 270 |
+
value=10,
|
| 271 |
+
step=1,
|
| 272 |
+
interactive=True,
|
| 273 |
+
)
|
| 274 |
+
|
| 275 |
+
# 新增:表格中展示的多个指标
|
| 276 |
+
metrics_select = gr.CheckboxGroup(
|
| 277 |
+
label="在表格中一起展示的指标 / Metrics to show in table",
|
| 278 |
+
choices=METRIC_CHOICES,
|
| 279 |
+
value=["Subject Fidelity", "Temporal Consistency", "Map Segmentation"],
|
| 280 |
+
interactive=True,
|
| 281 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
|
| 283 |
with gr.Row():
|
| 284 |
+
model_filter_box = gr.Textbox(
|
| 285 |
+
label="模型名过滤(包含关系)/ Filter by model name",
|
| 286 |
+
placeholder="例如: magic, dream, ...",
|
| 287 |
+
interactive=True,
|
| 288 |
+
)
|
| 289 |
+
venue_dropdown = gr.Dropdown(
|
| 290 |
+
label="按 Venue 筛选 / Filter by venue",
|
| 291 |
+
choices=["All"],
|
| 292 |
+
value="All",
|
| 293 |
+
interactive=True,
|
| 294 |
+
)
|
| 295 |
+
|
| 296 |
+
with gr.Row():
|
| 297 |
+
reload_button = gr.Button("🔄 Reload JSONs", variant="secondary")
|
| 298 |
+
update_button = gr.Button("✅ Update leaderboard", variant="primary")
|
| 299 |
+
|
| 300 |
+
leaderboard_table = gr.DataFrame(
|
| 301 |
+
label="Leaderboard",
|
| 302 |
+
interactive=False,
|
| 303 |
+
)
|
| 304 |
+
# 显式指定 format="png",避免 webp 不支持的问题
|
| 305 |
+
leaderboard_plot = gr.Plot(label="Metric comparison", format="png")
|
| 306 |
+
|
| 307 |
+
# 点击 Reload:重新加载 + 更新 venue + 表格与图
|
| 308 |
+
reload_button.click(
|
| 309 |
+
fn=reload_data,
|
| 310 |
+
inputs=[],
|
| 311 |
+
outputs=[status_box, venue_dropdown, leaderboard_table, leaderboard_plot],
|
| 312 |
+
)
|
| 313 |
+
|
| 314 |
+
# 更新排行榜(多传一个 selected_metrics)
|
| 315 |
+
update_button.click(
|
| 316 |
+
fn=update_leaderboard,
|
| 317 |
+
inputs=[
|
| 318 |
+
metric_dropdown,
|
| 319 |
+
topk_slider,
|
| 320 |
+
model_filter_box,
|
| 321 |
+
venue_dropdown,
|
| 322 |
+
sort_mode_radio,
|
| 323 |
+
metrics_select,
|
| 324 |
+
],
|
| 325 |
+
outputs=[leaderboard_table, leaderboard_plot],
|
| 326 |
+
)
|
| 327 |
+
|
| 328 |
+
# 页面加载时自动尝试加载一次
|
| 329 |
+
demo.load(
|
| 330 |
+
fn=reload_data,
|
| 331 |
+
inputs=[],
|
| 332 |
+
outputs=[status_box, venue_dropdown, leaderboard_table, leaderboard_plot],
|
| 333 |
+
)
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
if __name__ == "__main__":
|
| 337 |
+
demo.launch() # 本地想公网访问可以改成 demo.launch(share=True)
|
src/UNKNOWN.egg-info/PKG-INFO
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: UNKNOWN
|
| 3 |
+
Version: 0.0.0
|
src/UNKNOWN.egg-info/SOURCES.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
README.md
|
| 2 |
+
pyproject.toml
|
| 3 |
+
src/about.py
|
| 4 |
+
src/envs.py
|
| 5 |
+
src/populate.py
|
| 6 |
+
src/UNKNOWN.egg-info/PKG-INFO
|
| 7 |
+
src/UNKNOWN.egg-info/SOURCES.txt
|
| 8 |
+
src/UNKNOWN.egg-info/dependency_links.txt
|
| 9 |
+
src/UNKNOWN.egg-info/top_level.txt
|
| 10 |
+
src/display/css_html_js.py
|
| 11 |
+
src/display/formatting.py
|
| 12 |
+
src/display/utils.py
|
| 13 |
+
src/leaderboard/read_evals.py
|
| 14 |
+
src/submission/check_validity.py
|
| 15 |
+
src/submission/submit.py
|
src/UNKNOWN.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
src/UNKNOWN.egg-info/top_level.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
about
|
| 2 |
+
display
|
| 3 |
+
envs
|
| 4 |
+
leaderboard
|
| 5 |
+
populate
|
| 6 |
+
submission
|
worldlens-results/dreamforge.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"venue": "Arxiv'2024",
|
| 3 |
+
"date": "2024-10-04",
|
| 4 |
+
"Metrics": {
|
| 5 |
+
"Generation": {
|
| 6 |
+
"Subject Fidelity": 28.49,
|
| 7 |
+
"Subject Coherence": 75.95,
|
| 8 |
+
"Subject Consistency": 65.22,
|
| 9 |
+
"Depth Discrepancy": 24.19,
|
| 10 |
+
"Temporal Consistency": 74.44,
|
| 11 |
+
"Semantic Consistency": 80.63,
|
| 12 |
+
"Perceptual Discrepancy": 222.00,
|
| 13 |
+
"View Consistency": 185.77
|
| 14 |
+
},
|
| 15 |
+
"Reconstruction":{
|
| 16 |
+
"Photometric Error": 0.140,
|
| 17 |
+
"Geometric Discrepancy": 0.115,
|
| 18 |
+
"Novel-View Quality": 39.82,
|
| 19 |
+
"Novel-View Discrepancy": 427.30
|
| 20 |
+
},
|
| 21 |
+
"Action-Following":{
|
| 22 |
+
"Displacement Error": 0.57,
|
| 23 |
+
"Open-Loop Adherence": 71.23,
|
| 24 |
+
"Route Completion": 6.89,
|
| 25 |
+
"Closed-Loop Adherence": 4.82
|
| 26 |
+
},
|
| 27 |
+
"Downstream Task":{
|
| 28 |
+
"Map Segmentation": 18.34,
|
| 29 |
+
"3D Object Detection": 22.41,
|
| 30 |
+
"3D Object Tracking": 7.90,
|
| 31 |
+
"Occupancy Prediction": 23.14
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
}
|
worldlens-results/magicdrive.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"venue": "ICLR'2023",
|
| 3 |
+
"date": "2023-10-04",
|
| 4 |
+
"Metrics": {
|
| 5 |
+
"Generation": {
|
| 6 |
+
"Subject Fidelity": 28.49,
|
| 7 |
+
"Subject Coherence": 75.95,
|
| 8 |
+
"Subject Consistency": 65.22,
|
| 9 |
+
"Depth Discrepancy": 24.19,
|
| 10 |
+
"Temporal Consistency": 74.44,
|
| 11 |
+
"Semantic Consistency": 80.63,
|
| 12 |
+
"Perceptual Discrepancy": 222.00,
|
| 13 |
+
"View Consistency": 185.77
|
| 14 |
+
},
|
| 15 |
+
"Reconstruction":{
|
| 16 |
+
"Photometric Error": 0.140,
|
| 17 |
+
"Geometric Discrepancy": 0.115,
|
| 18 |
+
"Novel-View Quality": 39.82,
|
| 19 |
+
"Novel-View Discrepancy": 427.30
|
| 20 |
+
},
|
| 21 |
+
"Action-Following":{
|
| 22 |
+
"Displacement Error": 0.57,
|
| 23 |
+
"Open-Loop Adherence": 71.23,
|
| 24 |
+
"Route Completion": 6.89,
|
| 25 |
+
"Closed-Loop Adherence": 4.82
|
| 26 |
+
},
|
| 27 |
+
"Downstream Task":{
|
| 28 |
+
"Map Segmentation": 18.34,
|
| 29 |
+
"3D Object Detection": 22.41,
|
| 30 |
+
"3D Object Tracking": 7.90,
|
| 31 |
+
"Occupancy Prediction": 23.14
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
}
|