worldbench commited on
Commit
b6cc9f3
·
verified ·
1 Parent(s): 778f32a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -15
app.py CHANGED
@@ -72,6 +72,10 @@ def update_va_table(category, venue, action, search):
72
  display_df['action'] = display_df['action'].map(ACTION_LABELS)
73
  return display_df, f"**📊 Statistics:** Total {len(df)} models | Categories: {df['category'].nunique()}"
74
 
 
 
 
 
75
  def create_va_plot(category):
76
  df = df_va.copy()
77
  if category != "All":
@@ -133,6 +137,10 @@ def update_vla_table(category, venue, language, search):
133
  display_df['action'] = display_df['action'].map(ACTION_LABELS)
134
  return display_df, f"**📊 Statistics:** Total {len(df)} models | Categories: {df['category'].nunique()}"
135
 
 
 
 
 
136
  def create_vla_plot(category):
137
  df = df_vla.copy()
138
  if category != "All":
@@ -191,6 +199,10 @@ def update_datasets_table(category, year, search):
191
  df = df[mask]
192
  return df, f"**📊 Statistics:** Total {len(df)} datasets | Years: {df['year'].nunique()}"
193
 
 
 
 
 
194
  # Benchmark tables update functions
195
  def update_nuscenes_table(category, search):
196
  df = df_nuscenes.copy()
@@ -201,6 +213,10 @@ def update_nuscenes_table(category, search):
201
  df = df[mask]
202
  return df, f"**📊 Statistics:** Total {len(df)} models"
203
 
 
 
 
 
204
  def create_nuscenes_plot(category):
205
  """创建nuScenes统计图表"""
206
  df = df_nuscenes.copy()
@@ -259,6 +275,10 @@ def update_wod_table(category, search):
259
  df = df[mask]
260
  return df, f"**📊 Statistics:** Total {len(df)} models"
261
 
 
 
 
 
262
  def create_wod_plot(category):
263
  """创建WOD统计图表"""
264
  df = df_wod.copy()
@@ -323,6 +343,10 @@ def update_navsim_table(category, search):
323
  df = df[mask]
324
  return df, f"**📊 Statistics:** Total {len(df)} models"
325
 
 
 
 
 
326
  def create_navsim_plot(category):
327
  """创建NAVSIM统计图表"""
328
  df = df_navsim.copy()
@@ -381,6 +405,10 @@ def update_bench2drive_table(category, search):
381
  df = df[mask]
382
  return df, f"**📊 Statistics:** Total {len(df)} models"
383
 
 
 
 
 
384
  def create_bench2drive_plot(category):
385
  """创建Bench2Drive统计图表"""
386
  df = df_bench2drive.copy()
@@ -430,7 +458,15 @@ def create_bench2drive_plot(category):
430
  plt.close('all')
431
  return result
432
 
433
- # 预生成初始图表
 
 
 
 
 
 
 
 
434
  initial_va_plot = create_va_plot("All")
435
  initial_vla_plot = create_vla_plot("All")
436
  initial_nuscenes_plot = create_nuscenes_plot("All")
@@ -447,14 +483,14 @@ with gr.Blocks(css="#title {text-align: center;} .gradio-container {max-width: 1
447
  # Tab 1: VA Models
448
  with gr.Tab("Vision-Action Models (VA)"):
449
  gr.Markdown("### Table 1: Vision-Action Models in Autonomous Driving")
450
- va_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_va)} models")
451
  with gr.Row():
452
  va_category = gr.Dropdown(label="Category", choices=["All"] + sorted(df_va['category'].unique().tolist()), value="All")
453
  va_venue = gr.Textbox(label="Filter by Venue", placeholder="e.g., CVPR, ICCV...")
454
  va_action = gr.Dropdown(label="Action Type", choices=["All"] + sorted(df_va['action'].unique().tolist()), value="All")
455
  va_search = gr.Textbox(label="Search", placeholder="e.g., TransFuser...")
456
  va_update_btn = gr.Button("🔍 Update", variant="primary")
457
- va_table = gr.Dataframe(value=df_va[['id', 'model', 'venue', 'input', 'dataset', 'vision', 'action', 'output', 'category']], label="VA Models", interactive=False, wrap=True)
458
  va_plot = gr.Plot(label="Statistics", value=initial_va_plot, format="png")
459
  va_update_btn.click(fn=lambda cat, ven, act, search: (*update_va_table(cat, ven, act, search), create_va_plot(cat)),
460
  inputs=[va_category, va_venue, va_action, va_search], outputs=[va_table, va_stats, va_plot])
@@ -462,14 +498,14 @@ with gr.Blocks(css="#title {text-align: center;} .gradio-container {max-width: 1
462
  # Tab 2: VLA Models
463
  with gr.Tab("Vision-Language-Action Models (VLA)"):
464
  gr.Markdown("### Table 3: Vision-Language-Action Models in Autonomous Driving")
465
- vla_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_vla)} models")
466
  with gr.Row():
467
  vla_category = gr.Dropdown(label="Category", choices=["All"] + sorted(df_vla['category'].unique().tolist()), value="All")
468
  vla_venue = gr.Textbox(label="Filter by Venue", placeholder="e.g., CVPR...")
469
  vla_language = gr.Textbox(label="Filter by Language Model", placeholder="e.g., Qwen...")
470
  vla_search = gr.Textbox(label="Search", placeholder="e.g., AutoVLA...")
471
  vla_update_btn = gr.Button("🔍 Update", variant="primary")
472
- vla_table = gr.Dataframe(value=df_vla[['id', 'model', 'venue', 'input', 'dataset', 'vision', 'language', 'action', 'output', 'category']], label="VLA Models", interactive=False, wrap=True)
473
  vla_plot = gr.Plot(label="Statistics", value=initial_vla_plot, format="png")
474
  vla_update_btn.click(fn=lambda cat, ven, lang, search: (*update_vla_table(cat, ven, lang, search), create_vla_plot(cat)),
475
  inputs=[vla_category, vla_venue, vla_language, vla_search], outputs=[vla_table, vla_stats, vla_plot])
@@ -477,25 +513,25 @@ with gr.Blocks(css="#title {text-align: center;} .gradio-container {max-width: 1
477
  # Tab 3: Datasets
478
  with gr.Tab("Datasets & Benchmarks"):
479
  gr.Markdown("### Table 4: Summary of Datasets & Benchmarks")
480
- datasets_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_datasets)} datasets")
481
  with gr.Row():
482
  datasets_category = gr.Dropdown(label="Category", choices=["All"] + sorted(df_datasets['category'].unique().tolist()), value="All")
483
  datasets_year = gr.Textbox(label="Filter by Year", placeholder="e.g., 2024...")
484
  datasets_search = gr.Textbox(label="Search", placeholder="e.g., nuScenes...")
485
  datasets_update_btn = gr.Button("🔍 Update", variant="primary")
486
- datasets_table = gr.Dataframe(value=df_datasets, label="Datasets", interactive=False, wrap=True)
487
  datasets_update_btn.click(fn=update_datasets_table, inputs=[datasets_category, datasets_year, datasets_search], outputs=[datasets_table, datasets_stats])
488
 
489
  # Tab 4: nuScenes
490
  with gr.Tab("nuScenes Open-Loop"):
491
  gr.Markdown("### Table 5: Open-Loop Planning Results on nuScenes")
492
  gr.Markdown("**Metrics:** L2 Error (m) ↓ | Collision Rate ↓")
493
- nuscenes_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_nuscenes)} models")
494
  with gr.Row():
495
  nuscenes_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
496
  nuscenes_search = gr.Textbox(label="Search Model", placeholder="e.g., UniAD, EMMA...")
497
  nuscenes_update_btn = gr.Button("🔍 Update", variant="primary")
498
- nuscenes_table = gr.Dataframe(value=df_nuscenes, label="nuScenes Results", interactive=False, wrap=True)
499
  nuscenes_plot = gr.Plot(label="Statistics", value=initial_nuscenes_plot, format="png")
500
  nuscenes_update_btn.click(fn=lambda cat, search: (*update_nuscenes_table(cat, search), create_nuscenes_plot(cat)),
501
  inputs=[nuscenes_category, nuscenes_search],
@@ -505,12 +541,12 @@ with gr.Blocks(css="#title {text-align: center;} .gradio-container {max-width: 1
505
  with gr.Tab("WOD-E2E"):
506
  gr.Markdown("### Table 6: Results on WOD-E2E Test Split")
507
  gr.Markdown("**Metrics:** RFS (Overall/Spotlight) ↑ | ADE (5s/3s) ↓")
508
- wod_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_wod)} models")
509
  with gr.Row():
510
  wod_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
511
  wod_search = gr.Textbox(label="Search Model", placeholder="e.g., AutoVLA...")
512
  wod_update_btn = gr.Button("🔍 Update", variant="primary")
513
- wod_table = gr.Dataframe(value=df_wod, label="WOD-E2E Results", interactive=False, wrap=True)
514
  wod_plot = gr.Plot(label="Statistics", value=initial_wod_plot, format="png")
515
  wod_update_btn.click(fn=lambda cat, search: (*update_wod_table(cat, search), create_wod_plot(cat)),
516
  inputs=[wod_category, wod_search],
@@ -520,12 +556,12 @@ with gr.Blocks(css="#title {text-align: center;} .gradio-container {max-width: 1
520
  with gr.Tab("NAVSIM Closed-Loop"):
521
  gr.Markdown("### Table 7: Closed-Loop Results on NAVSIM")
522
  gr.Markdown("**Metrics:** NC/DAC/TTC/Comf/EP/PDMS ↑")
523
- navsim_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_navsim)} models")
524
  with gr.Row():
525
  navsim_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
526
  navsim_search = gr.Textbox(label="Search Model", placeholder="e.g., ReflectDrive...")
527
  navsim_update_btn = gr.Button("🔍 Update", variant="primary")
528
- navsim_table = gr.Dataframe(value=df_navsim, label="NAVSIM Results", interactive=False, wrap=True)
529
  navsim_plot = gr.Plot(label="Statistics", value=initial_navsim_plot, format="png")
530
  navsim_update_btn.click(fn=lambda cat, search: (*update_navsim_table(cat, search), create_navsim_plot(cat)),
531
  inputs=[navsim_category, navsim_search],
@@ -535,12 +571,12 @@ with gr.Blocks(css="#title {text-align: center;} .gradio-container {max-width: 1
535
  with gr.Tab("Bench2Drive"):
536
  gr.Markdown("### Table 8: Closed-Loop & Open-Loop Results on Bench2Drive")
537
  gr.Markdown("**Metrics:** DS/SR ↑ | L2 Avg ↓")
538
- bench2drive_stats = gr.Markdown(f"**📊 Statistics:** Total {len(df_bench2drive)} models")
539
  with gr.Row():
540
  bench2drive_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
541
  bench2drive_search = gr.Textbox(label="Search Model", placeholder="e.g., SimLingo...")
542
  bench2drive_update_btn = gr.Button("🔍 Update", variant="primary")
543
- bench2drive_table = gr.Dataframe(value=df_bench2drive, label="Bench2Drive Results", interactive=False, wrap=True)
544
  bench2drive_plot = gr.Plot(label="Statistics", value=initial_bench2drive_plot, format="png")
545
  bench2drive_update_btn.click(fn=lambda cat, search: (*update_bench2drive_table(cat, search), create_bench2drive_plot(cat)),
546
  inputs=[bench2drive_category, bench2drive_search],
 
72
  display_df['action'] = display_df['action'].map(ACTION_LABELS)
73
  return display_df, f"**📊 Statistics:** Total {len(df)} models | Categories: {df['category'].nunique()}"
74
 
75
+ # 初始化VA表格数据
76
+ def init_va_table():
77
+ return update_va_table("All", "", "All", "")
78
+
79
  def create_va_plot(category):
80
  df = df_va.copy()
81
  if category != "All":
 
137
  display_df['action'] = display_df['action'].map(ACTION_LABELS)
138
  return display_df, f"**📊 Statistics:** Total {len(df)} models | Categories: {df['category'].nunique()}"
139
 
140
+ # 初始化VLA表格数据
141
+ def init_vla_table():
142
+ return update_vla_table("All", "", "", "")
143
+
144
  def create_vla_plot(category):
145
  df = df_vla.copy()
146
  if category != "All":
 
199
  df = df[mask]
200
  return df, f"**📊 Statistics:** Total {len(df)} datasets | Years: {df['year'].nunique()}"
201
 
202
+ # 初始化Datasets表格数据
203
+ def init_datasets_table():
204
+ return update_datasets_table("All", "", "")
205
+
206
  # Benchmark tables update functions
207
  def update_nuscenes_table(category, search):
208
  df = df_nuscenes.copy()
 
213
  df = df[mask]
214
  return df, f"**📊 Statistics:** Total {len(df)} models"
215
 
216
+ # 初始化nuScenes表格数据
217
+ def init_nuscenes_table():
218
+ return update_nuscenes_table("All", "")
219
+
220
  def create_nuscenes_plot(category):
221
  """创建nuScenes统计图表"""
222
  df = df_nuscenes.copy()
 
275
  df = df[mask]
276
  return df, f"**📊 Statistics:** Total {len(df)} models"
277
 
278
+ # 初始化WOD表格数据
279
+ def init_wod_table():
280
+ return update_wod_table("All", "")
281
+
282
  def create_wod_plot(category):
283
  """创建WOD统计图表"""
284
  df = df_wod.copy()
 
343
  df = df[mask]
344
  return df, f"**📊 Statistics:** Total {len(df)} models"
345
 
346
+ # 初始化NAVSIM表格数据
347
+ def init_navsim_table():
348
+ return update_navsim_table("All", "")
349
+
350
  def create_navsim_plot(category):
351
  """创建NAVSIM统计图表"""
352
  df = df_navsim.copy()
 
405
  df = df[mask]
406
  return df, f"**📊 Statistics:** Total {len(df)} models"
407
 
408
+ # 初始化Bench2Drive表格数据
409
+ def init_bench2drive_table():
410
+ return update_bench2drive_table("All", "")
411
+
412
  def create_bench2drive_plot(category):
413
  """创建Bench2Drive统计图表"""
414
  df = df_bench2drive.copy()
 
458
  plt.close('all')
459
  return result
460
 
461
+ # 预生成初始数据和图表
462
+ initial_va_df, initial_va_stats = init_va_table()
463
+ initial_vla_df, initial_vla_stats = init_vla_table()
464
+ initial_datasets_df, initial_datasets_stats = init_datasets_table()
465
+ initial_nuscenes_df, initial_nuscenes_stats = init_nuscenes_table()
466
+ initial_wod_df, initial_wod_stats = init_wod_table()
467
+ initial_navsim_df, initial_navsim_stats = init_navsim_table()
468
+ initial_bench2drive_df, initial_bench2drive_stats = init_bench2drive_table()
469
+
470
  initial_va_plot = create_va_plot("All")
471
  initial_vla_plot = create_vla_plot("All")
472
  initial_nuscenes_plot = create_nuscenes_plot("All")
 
483
  # Tab 1: VA Models
484
  with gr.Tab("Vision-Action Models (VA)"):
485
  gr.Markdown("### Table 1: Vision-Action Models in Autonomous Driving")
486
+ va_stats = gr.Markdown(initial_va_stats)
487
  with gr.Row():
488
  va_category = gr.Dropdown(label="Category", choices=["All"] + sorted(df_va['category'].unique().tolist()), value="All")
489
  va_venue = gr.Textbox(label="Filter by Venue", placeholder="e.g., CVPR, ICCV...")
490
  va_action = gr.Dropdown(label="Action Type", choices=["All"] + sorted(df_va['action'].unique().tolist()), value="All")
491
  va_search = gr.Textbox(label="Search", placeholder="e.g., TransFuser...")
492
  va_update_btn = gr.Button("🔍 Update", variant="primary")
493
+ va_table = gr.Dataframe(value=initial_va_df, label="VA Models", interactive=False, wrap=True)
494
  va_plot = gr.Plot(label="Statistics", value=initial_va_plot, format="png")
495
  va_update_btn.click(fn=lambda cat, ven, act, search: (*update_va_table(cat, ven, act, search), create_va_plot(cat)),
496
  inputs=[va_category, va_venue, va_action, va_search], outputs=[va_table, va_stats, va_plot])
 
498
  # Tab 2: VLA Models
499
  with gr.Tab("Vision-Language-Action Models (VLA)"):
500
  gr.Markdown("### Table 3: Vision-Language-Action Models in Autonomous Driving")
501
+ vla_stats = gr.Markdown(initial_vla_stats)
502
  with gr.Row():
503
  vla_category = gr.Dropdown(label="Category", choices=["All"] + sorted(df_vla['category'].unique().tolist()), value="All")
504
  vla_venue = gr.Textbox(label="Filter by Venue", placeholder="e.g., CVPR...")
505
  vla_language = gr.Textbox(label="Filter by Language Model", placeholder="e.g., Qwen...")
506
  vla_search = gr.Textbox(label="Search", placeholder="e.g., AutoVLA...")
507
  vla_update_btn = gr.Button("🔍 Update", variant="primary")
508
+ vla_table = gr.Dataframe(value=initial_vla_df, label="VLA Models", interactive=False, wrap=True)
509
  vla_plot = gr.Plot(label="Statistics", value=initial_vla_plot, format="png")
510
  vla_update_btn.click(fn=lambda cat, ven, lang, search: (*update_vla_table(cat, ven, lang, search), create_vla_plot(cat)),
511
  inputs=[vla_category, vla_venue, vla_language, vla_search], outputs=[vla_table, vla_stats, vla_plot])
 
513
  # Tab 3: Datasets
514
  with gr.Tab("Datasets & Benchmarks"):
515
  gr.Markdown("### Table 4: Summary of Datasets & Benchmarks")
516
+ datasets_stats = gr.Markdown(initial_datasets_stats)
517
  with gr.Row():
518
  datasets_category = gr.Dropdown(label="Category", choices=["All"] + sorted(df_datasets['category'].unique().tolist()), value="All")
519
  datasets_year = gr.Textbox(label="Filter by Year", placeholder="e.g., 2024...")
520
  datasets_search = gr.Textbox(label="Search", placeholder="e.g., nuScenes...")
521
  datasets_update_btn = gr.Button("🔍 Update", variant="primary")
522
+ datasets_table = gr.Dataframe(value=initial_datasets_df, label="Datasets", interactive=False, wrap=True)
523
  datasets_update_btn.click(fn=update_datasets_table, inputs=[datasets_category, datasets_year, datasets_search], outputs=[datasets_table, datasets_stats])
524
 
525
  # Tab 4: nuScenes
526
  with gr.Tab("nuScenes Open-Loop"):
527
  gr.Markdown("### Table 5: Open-Loop Planning Results on nuScenes")
528
  gr.Markdown("**Metrics:** L2 Error (m) ↓ | Collision Rate ↓")
529
+ nuscenes_stats = gr.Markdown(initial_nuscenes_stats)
530
  with gr.Row():
531
  nuscenes_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
532
  nuscenes_search = gr.Textbox(label="Search Model", placeholder="e.g., UniAD, EMMA...")
533
  nuscenes_update_btn = gr.Button("🔍 Update", variant="primary")
534
+ nuscenes_table = gr.Dataframe(value=initial_nuscenes_df, label="nuScenes Results", interactive=False, wrap=True)
535
  nuscenes_plot = gr.Plot(label="Statistics", value=initial_nuscenes_plot, format="png")
536
  nuscenes_update_btn.click(fn=lambda cat, search: (*update_nuscenes_table(cat, search), create_nuscenes_plot(cat)),
537
  inputs=[nuscenes_category, nuscenes_search],
 
541
  with gr.Tab("WOD-E2E"):
542
  gr.Markdown("### Table 6: Results on WOD-E2E Test Split")
543
  gr.Markdown("**Metrics:** RFS (Overall/Spotlight) ↑ | ADE (5s/3s) ↓")
544
+ wod_stats = gr.Markdown(initial_wod_stats)
545
  with gr.Row():
546
  wod_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
547
  wod_search = gr.Textbox(label="Search Model", placeholder="e.g., AutoVLA...")
548
  wod_update_btn = gr.Button("🔍 Update", variant="primary")
549
+ wod_table = gr.Dataframe(value=initial_wod_df, label="WOD-E2E Results", interactive=False, wrap=True)
550
  wod_plot = gr.Plot(label="Statistics", value=initial_wod_plot, format="png")
551
  wod_update_btn.click(fn=lambda cat, search: (*update_wod_table(cat, search), create_wod_plot(cat)),
552
  inputs=[wod_category, wod_search],
 
556
  with gr.Tab("NAVSIM Closed-Loop"):
557
  gr.Markdown("### Table 7: Closed-Loop Results on NAVSIM")
558
  gr.Markdown("**Metrics:** NC/DAC/TTC/Comf/EP/PDMS ↑")
559
+ navsim_stats = gr.Markdown(initial_navsim_stats)
560
  with gr.Row():
561
  navsim_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
562
  navsim_search = gr.Textbox(label="Search Model", placeholder="e.g., ReflectDrive...")
563
  navsim_update_btn = gr.Button("🔍 Update", variant="primary")
564
+ navsim_table = gr.Dataframe(value=initial_navsim_df, label="NAVSIM Results", interactive=False, wrap=True)
565
  navsim_plot = gr.Plot(label="Statistics", value=initial_navsim_plot, format="png")
566
  navsim_update_btn.click(fn=lambda cat, search: (*update_navsim_table(cat, search), create_navsim_plot(cat)),
567
  inputs=[navsim_category, navsim_search],
 
571
  with gr.Tab("Bench2Drive"):
572
  gr.Markdown("### Table 8: Closed-Loop & Open-Loop Results on Bench2Drive")
573
  gr.Markdown("**Metrics:** DS/SR ↑ | L2 Avg ↓")
574
+ bench2drive_stats = gr.Markdown(initial_bench2drive_stats)
575
  with gr.Row():
576
  bench2drive_category = gr.Dropdown(label="Category", choices=["All", "Vision-Action", "Vision-Language-Action"], value="All")
577
  bench2drive_search = gr.Textbox(label="Search Model", placeholder="e.g., SimLingo...")
578
  bench2drive_update_btn = gr.Button("🔍 Update", variant="primary")
579
+ bench2drive_table = gr.Dataframe(value=initial_bench2drive_df, label="Bench2Drive Results", interactive=False, wrap=True)
580
  bench2drive_plot = gr.Plot(label="Statistics", value=initial_bench2drive_plot, format="png")
581
  bench2drive_update_btn.click(fn=lambda cat, search: (*update_bench2drive_table(cat, search), create_bench2drive_plot(cat)),
582
  inputs=[bench2drive_category, bench2drive_search],