blanchon commited on
Commit
5fdc717
·
1 Parent(s): a5a628c

PH2D: robot pick from 402 (same pad layout as human); 12 sampling steps by default; Showcase with matched references; drop unused examples

Browse files
app.py CHANGED
@@ -64,17 +64,17 @@ IDM_EXAMPLES = [
64
  ("gr1.mp4", "ego"),
65
  ("gta5.mp4", "mixed"),
66
  ]
 
67
  SHOWCASE = [
68
- ("ego_fry_bread.mp4", "out_egobread_self.mp4", "EgoDex fry bread — self-reconstruction (egodexmix)"),
69
- ("ego_wash_fruit.mp4", "out_egofruit_self.mp4", "EgoDex wash fruit — self-reconstruction (egodexmix)"),
70
- ("ego_fry_egg.mp4", "out_egoegg_self.mp4", "EgoDex fry egg — self-reconstruction (egodexmix)"),
71
- ("ego_wash_kitchen_dishes.mp4", "out_egodishes_self.mp4", "EgoDex wash dishes — self-reconstruction (egodexmix)"),
72
- ("gr1.mp4", "out_gr1_self.mp4", "GR-1 robot — self-reconstruction (egodexmix)"),
73
- ("ego_wash_fruit.mp4", "out_egofruit_to_robot.mp4", "Human wash fruit -> GR-1 robot (egodexmix)"),
74
- ("ego_knit_scarf.mp4", "out_egoknit_to_robot.mp4", "Human knit scarf -> GR-1 robot (egodexmix)"),
75
- ("ego_fry_bread.mp4", "out_egobread_to_robot.mp4", "Human fry bread -> GR-1 robot (egodexmix)"),
76
- ("ego_knit_scarf.mp4", "out_egoknit_to_west.mp4", "Human knit scarf -> wild west (mixed)"),
77
- ("gta5.mp4", "out_gta5_to_west.mp4", "GTA5 walk -> wild west (mixed)"),
78
  ]
79
 
80
  # ---------------------------------------------------------------- models
@@ -289,7 +289,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, title="O2LaF") as demo:
289
  model_radio = gr.Radio(MODEL_CHOICES, value="ego", label="Checkpoint")
290
  with gr.Accordion("Advanced", open=False):
291
  guidance = gr.Slider(1.0, 6.0, value=3.0, step=0.5, label="Action guidance")
292
- steps = gr.Slider(8, 30, value=20, step=1, label="Steps")
293
  seed = gr.Slider(0, 999, value=0, step=1, label="Seed")
294
  go = gr.Button("Generate", variant="primary")
295
  with gr.Column():
@@ -333,7 +333,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, title="O2LaF") as demo:
333
  action = gr.Dropdown(ATOMIC_ACTIONS, value="w", label="Atomic action")
334
  n_frames = gr.Slider(21, 121, value=81, step=4, label="Frames")
335
  with gr.Accordion("Advanced", open=False):
336
- a_steps = gr.Slider(8, 30, value=20, step=1, label="Steps")
337
  a_seed = gr.Slider(0, 999, value=0, step=1, label="Seed")
338
  go3 = gr.Button("Generate", variant="primary")
339
  with gr.Column():
@@ -346,19 +346,22 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, title="O2LaF") as demo:
346
  go3.click(run_atomic, [atomic_frame, action, n_frames, a_steps, a_seed], [a_video, a_plot])
347
 
348
  with gr.Tab("Showcase"):
349
- gr.Markdown("Precomputed egocentric results (no GPU needed to browse).")
350
- for i in range(0, len(SHOWCASE), 2):
 
 
 
 
351
  with gr.Row():
352
- for src_name, out_name, caption in SHOWCASE[i : i + 2]:
353
- with gr.Column():
354
- gr.Markdown(f"**{caption}**")
355
- with gr.Row():
356
- gr.Video(ex(src_name), label="Source")
357
- gr.Video(ex(out_name), label="O2LaF replay")
358
 
359
  gr.HTML(
360
  "<p style='font-size:0.85em;color:var(--body-text-color-subdued)'>O2LaF: One for All — a single latent action "
361
- "model for egocentric and third-person video, built on Wan2.2 TI2V-5B. Demo assets from EgoDex (Apple).</p>"
 
362
  )
363
 
364
 
 
64
  ("gr1.mp4", "ego"),
65
  ("gta5.mp4", "mixed"),
66
  ]
67
+ # (source, matched reference or None, O2LaF output, caption)
68
  SHOWCASE = [
69
+ ("ph2d_human_pick.mp4", "ph2d_robot_pick.mp4", "out_ph2d_pick_h2r.mp4", "PH2D pick box: human -> Unitree H1, same table"),
70
+ ("ph2d_human_pour.mp4", "ph2d_robot_pour.mp4", "out_ph2d_pour_h2r.mp4", "PH2D pour: human -> Unitree H1, same table"),
71
+ ("ph2d_robot_pick.mp4", "ph2d_human_pick.mp4", "out_ph2d_pick_r2h.mp4", "PH2D pick box: Unitree H1 -> human, same table"),
72
+ ("gta5.mp4", None, "out_gta5_to_west.mp4", "GTA5 walk -> wild west (mixed)"),
73
+ ("ego_fry_bread.mp4", None, "out_egobread_self.mp4", "EgoDex fry bread — self-reconstruction"),
74
+ ("ego_wash_fruit.mp4", None, "out_egofruit_self.mp4", "EgoDex wash fruit — self-reconstruction"),
75
+ ("ego_fry_egg.mp4", None, "out_egoegg_self.mp4", "EgoDex fry egg — self-reconstruction"),
76
+ ("ego_wash_kitchen_dishes.mp4", None, "out_egodishes_self.mp4", "EgoDex wash dishes — self-reconstruction"),
77
+ ("gr1.mp4", None, "out_gr1_self.mp4", "GR-1 robot — self-reconstruction"),
 
78
  ]
79
 
80
  # ---------------------------------------------------------------- models
 
289
  model_radio = gr.Radio(MODEL_CHOICES, value="ego", label="Checkpoint")
290
  with gr.Accordion("Advanced", open=False):
291
  guidance = gr.Slider(1.0, 6.0, value=3.0, step=0.5, label="Action guidance")
292
+ steps = gr.Slider(8, 30, value=12, step=1, label="Steps")
293
  seed = gr.Slider(0, 999, value=0, step=1, label="Seed")
294
  go = gr.Button("Generate", variant="primary")
295
  with gr.Column():
 
333
  action = gr.Dropdown(ATOMIC_ACTIONS, value="w", label="Atomic action")
334
  n_frames = gr.Slider(21, 121, value=81, step=4, label="Frames")
335
  with gr.Accordion("Advanced", open=False):
336
+ a_steps = gr.Slider(8, 30, value=12, step=1, label="Steps")
337
  a_seed = gr.Slider(0, 999, value=0, step=1, label="Seed")
338
  go3 = gr.Button("Generate", variant="primary")
339
  with gr.Column():
 
346
  go3.click(run_atomic, [atomic_frame, action, n_frames, a_steps, a_seed], [a_video, a_plot])
347
 
348
  with gr.Tab("Showcase"):
349
+ gr.Markdown(
350
+ "Precomputed results (no GPU needed). Cross-embodiment rows show the matched demonstration of "
351
+ "the other embodiment as a reference: O2LaF never sees it, only its first frame."
352
+ )
353
+ for src_name, ref_name, out_name, caption in SHOWCASE:
354
+ gr.Markdown(f"**{caption}**")
355
  with gr.Row():
356
+ gr.Video(ex(src_name), label="Source (actions read from here)")
357
+ if ref_name:
358
+ gr.Video(ex(ref_name), label="Real demo of the target embodiment (reference)")
359
+ gr.Video(ex(out_name), label="O2LaF replay")
 
 
360
 
361
  gr.HTML(
362
  "<p style='font-size:0.85em;color:var(--body-text-color-subdued)'>O2LaF: One for All — a single latent action "
363
+ "model for egocentric and third-person video, built on Wan2.2 TI2V-5B. Demo assets from EgoDex (Apple) and "
364
+ "<a href='https://human-as-robot.github.io/' target='_blank'>PH2D</a> (MIT).</p>"
365
  )
366
 
367
 
examples/attn_gr1.json DELETED
@@ -1,46 +0,0 @@
1
- {
2
- "action_encoder_step": 10000,
3
- "action_space_id": "sha256:5dcc73e3420e74af797bbb8c5d610799c1b05bfff0bc0941e7b27ef2d551e013",
4
- "attention_semantics": {
5
- "normalization_scope": "all frames, source and target, for this (block, head) clip",
6
- "raw_joint_softmax": true,
7
- "single_block_single_head": true,
8
- "source_target_shared_denominator": true
9
- },
10
- "block": 22,
11
- "head": 2,
12
- "head_clip_scale": 0.020686039049178363,
13
- "model": "/root/.cache/huggingface/hub/models--YuxinJ--O2LaF/snapshots/2af7086138ef14309107e3048bafd6b5b8754966/o2laf_dit_mixed",
14
- "npz": null,
15
- "num_transitions": 15,
16
- "output": "/work/demo2/attn_gr1.mp4",
17
- "output_fps": 4.0,
18
- "schema_version": "o2laf_attention_viz_v1",
19
- "source_mass_mean": 0.17598010152578353,
20
- "target_fps": 16.0,
21
- "target_mass_mean": 0.8240198890368143,
22
- "video": "/work/demo2/gr1.mp4",
23
- "vis_config": {
24
- "alpha": 0.6,
25
- "alpha_power": 1.1,
26
- "cmap": "turbo",
27
- "gamma": 0.8,
28
- "gaussian_blur": false,
29
- "interpolation": "bicubic",
30
- "percentile": 99.0
31
- },
32
- "window_frames": 121,
33
- "windows": [
34
- {
35
- "latent_frames": 16,
36
- "resampled_start": 0,
37
- "rgb_frames": 61,
38
- "source_frame_span": [
39
- 0,
40
- 91
41
- ],
42
- "transitions": 15,
43
- "window": 0
44
- }
45
- ]
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
examples/attn_gr1.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a957084cd5aea29a7378f9010a6398e5d9da0720b332159f4ebead49b58fa757
3
- size 2688274
 
 
 
 
examples/attn_gta5.json DELETED
@@ -1,46 +0,0 @@
1
- {
2
- "action_encoder_step": 10000,
3
- "action_space_id": "sha256:5dcc73e3420e74af797bbb8c5d610799c1b05bfff0bc0941e7b27ef2d551e013",
4
- "attention_semantics": {
5
- "normalization_scope": "all frames, source and target, for this (block, head) clip",
6
- "raw_joint_softmax": true,
7
- "single_block_single_head": true,
8
- "source_target_shared_denominator": true
9
- },
10
- "block": 30,
11
- "head": 11,
12
- "head_clip_scale": 0.004412810993380848,
13
- "model": "/root/.cache/huggingface/hub/models--YuxinJ--O2LaF/snapshots/2af7086138ef14309107e3048bafd6b5b8754966/o2laf_dit_mixed",
14
- "npz": null,
15
- "num_transitions": 13,
16
- "output": "/work/demo2/attn_gta5.mp4",
17
- "output_fps": 4.0,
18
- "schema_version": "o2laf_attention_viz_v1",
19
- "source_mass_mean": 0.5163402671997364,
20
- "target_fps": 16.0,
21
- "target_mass_mean": 0.4836597373852363,
22
- "video": "/work/demo2/gta5.mp4",
23
- "vis_config": {
24
- "alpha": 0.6,
25
- "alpha_power": 1.1,
26
- "cmap": "turbo",
27
- "gamma": 0.8,
28
- "gaussian_blur": false,
29
- "interpolation": "bicubic",
30
- "percentile": 99.0
31
- },
32
- "window_frames": 121,
33
- "windows": [
34
- {
35
- "latent_frames": 14,
36
- "resampled_start": 0,
37
- "rgb_frames": 53,
38
- "source_frame_span": [
39
- 0,
40
- 52
41
- ],
42
- "transitions": 13,
43
- "window": 0
44
- }
45
- ]
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
examples/attn_gta5.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7f54c2f15833cf780856703fc2835394c50a01dfe89d8894316cfb22a272f01d
3
- size 3782461
 
 
 
 
examples/first_ph2d_human_pour.png DELETED

Git LFS Details

  • SHA256: 631ab3b9892fe4ddcf5e37571c9415acd706aec7acc649dedd3cb05149e72d2a
  • Pointer size: 131 Bytes
  • Size of remote file: 104 kB
examples/first_ph2d_robot_pick.png CHANGED

Git LFS Details

  • SHA256: 95711f8c7f7875469b19864736dd515cf6096e64ddc68acdfa29de510d1650e5
  • Pointer size: 131 Bytes
  • Size of remote file: 240 kB

Git LFS Details

  • SHA256: 087db47f1a83d319570e23ed9ed50f14bbdc41ff84a1d722d7f946a429eb0375
  • Pointer size: 131 Bytes
  • Size of remote file: 234 kB
examples/out_egobread_to_robot.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7fe394a5ace942a274ceb5eb12956cea64105e4c55d37b00c739f0c2a9284502
3
- size 904371
 
 
 
 
examples/out_egofruit_to_robot.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:27942c4b9e717f428e65e9ef6362cfa4698262676b0204ad33da2691081dac28
3
- size 546974
 
 
 
 
examples/out_egoknit_to_robot.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2210a0a46c5054873ba134612530d15cc016b2524911748272d60e96c5c10d3e
3
- size 578495
 
 
 
 
examples/out_egoknit_to_west.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5f1c042f26e3364b1aed25224939a255eb72ce6036b3435f96e79422d85469c9
3
- size 603193
 
 
 
 
examples/ph2d_robot_pick.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f1b240376688d1965e3c69170c1f328b7d28077b6a44e0495362d6aa170d9f2
3
- size 843433
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82ff2b13ff074a33d14a419761d88293539d35d27a3ea596b6ff26b1f89b6ef8
3
+ size 802921