Spaces:
Sleeping
Sleeping
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 +24 -21
- examples/attn_gr1.json +0 -46
- examples/attn_gr1.mp4 +0 -3
- examples/attn_gta5.json +0 -46
- examples/attn_gta5.mp4 +0 -3
- examples/first_ph2d_human_pour.png +0 -3
- examples/first_ph2d_robot_pick.png +2 -2
- examples/out_egobread_to_robot.mp4 +0 -3
- examples/out_egofruit_to_robot.mp4 +0 -3
- examples/out_egoknit_to_robot.mp4 +0 -3
- examples/out_egoknit_to_west.mp4 +0 -3
- examples/ph2d_robot_pick.mp4 +2 -2
app.py
CHANGED
|
@@ -64,17 +64,17 @@ IDM_EXAMPLES = [
|
|
| 64 |
("gr1.mp4", "ego"),
|
| 65 |
("gta5.mp4", "mixed"),
|
| 66 |
]
|
|
|
|
| 67 |
SHOWCASE = [
|
| 68 |
-
("
|
| 69 |
-
("
|
| 70 |
-
("
|
| 71 |
-
("
|
| 72 |
-
("
|
| 73 |
-
("ego_wash_fruit.mp4", "
|
| 74 |
-
("
|
| 75 |
-
("
|
| 76 |
-
("
|
| 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=
|
| 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=
|
| 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(
|
| 350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
with gr.Row():
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 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)
|
|
|
|
| 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
|
examples/first_ph2d_robot_pick.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
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:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82ff2b13ff074a33d14a419761d88293539d35d27a3ea596b6ff26b1f89b6ef8
|
| 3 |
+
size 802921
|