E1: Real-to-Sim, One Video to a 4D Human-Object Interaction¶
CoRL 2026 Video-to-Data (V2D) tutorial, exercise E1 (about 7 minutes).
Goal: from one third-person RGB video and the object's name, get what a simulator needs: the object's 3D shape at its true size, the object's pose (position and rotation) on every frame, the person's full-body pose on every frame, all in one world frame in meters, and hands that touch the object without floating or going through it.
Method: CARI4D, the baseline of V2D Challenge Track 1. All GPU steps ran beforehand. This notebook loads their saved results and does only light CPU work, so it runs on a laptop without a GPU or internet.
Coordinates: the camera frame (x right, y down, z forward, as in OpenCV), in meters. Run each cell with Shift+Enter.
from e1_demo import Clip, Viewer
clip = Clip("data").summary()
viewer = Viewer(clip) # 3D viewer in the browser, on this computer only
Clip: Traffic cone: walk to a cone on the floor, pick it up with both hands, put it on a round table 440 frames at 30 fps, 1536x1152 pixels, camera right_stereo_camera_left, object: traffic cone Input video: nvidia/video_to_data_challenge (revision 553afe1b), multi-view reference: same dataset, Track 2 tier 1
╭──────────────── viser ────────────────╮
│ ╷ │
│ HTTP │ http://127.0.0.1:8080 │
│ Websocket │ ws://127.0.0.1:8080 │
│ ╵ │
╰───────────────────────────────────────╯
3D viewer: http://127.0.0.1:8080 (open it in a browser tab if the panel below stays empty)
1. Three Raw Guesses That Disagree¶
CARI4D starts from three models that each look at one image:
- MoGe-2: depth (distance from the camera) for every pixel.
- SAM 3D Body: the person's 3D body (MHR body model).
- SAM 3D Objects: a 3D mesh of the cone, built from one frame (frame 382).
Each guess has its own sense of scale. Below is frame 270, where the person holds the cone in both hands. In the viewer, points are MoGe-2's depth colored by the video, blue is the SAM 3D Body person, and orange is the cone mesh at its raw size.
raw = clip.raw_guesses(frame=270)
viewer.show_raw(raw)
display(viewer.show())
raw.heights()
Blue: SAM 3D Body human. Orange: SAM 3D Objects cone at its raw size. Points: MoGe-2 raw depth, colored by the video.
On the person, the body model's surface is 1.194 times as far away as MoGe-2's raw depth (median over 2606 places).
| Height, m | ||
|---|---|---|
| What | Source | |
| Person | Raw MoGe-2 depth (points on the person) | 1.451 |
| SAM 3D Body (its body model, standing straight) | 1.718 | |
| Multi-view reference (SOMA-X body on this frame) | 1.702 | |
| Cone | SAM 3D Objects mesh, raw size | 0.338 |
| Same mesh scaled by frame 382's depth scale (1.160) | 0.391 | |
| Multi-view reference mesh (true size) | 0.384 |
What to notice: MoGe-2's depth makes the person about 25 cm too short, so its points sit in front of the blue body. The raw cone mesh is too small for the same reason: it was built from the same raw depth. A body model has a realistic human size built in, so CARI4D uses the body as its ruler. On every frame it scales MoGe-2's depth so that the depth on the person matches the body surface. Then it scales the cone mesh by the depth scale of the frame the mesh was built from (the table's second cone row).
2. Track: Pose Candidates When the Cone Is Partly Hidden¶
FoundationPose estimates the cone's pose on every frame. When tracking is lost, it proposes about 200 to 250 poses and ranks them with a learned score. CARI4D's tracker accepts a pose only if its outline matches the part of the cone the segmentation sees (pixels hidden by the person do not count): IoU (overlap area divided by the combined area) at least 0.4, precision at least 0.7, recall at least 0.5.
Frame 200: the person turns with the cone in one hand, and the hand hides part of it. Below, every candidate's outline is drawn with OpenCV and compared with the visible cone.
candidates = clip.candidates()
table = candidates.score()
candidates.explain(table)
candidates.show(table);
Measured 252 candidates in 1.3 s. Checks: IoU >= 0.4, precision >= 0.7, recall >= 0.5, centroid distance <= 0.1, visible share >= 0.15. 8 of 252 candidates pass all checks. The tracker first merges candidates less than 10 degrees apart: 252 become 201. 3 of them pass the checks here. September production run on frame 200: 189 candidates; the best one overlapped the visible cone with IoU 0.27 and recall 0.35 (needed 0.4 and 0.5), so none was accepted. So frames 137 to 210 were marked unreliable, and frame 200 got the pose copied from frame 211, the nearest frame with a confirmed pose. CoCoNet later moved the cone into the hands. This replay rebuilt the masks from smaller saved crops, and many candidates sit within 0.02 of the IoU threshold, so here a few pass: the decision is that close.
table.head(10)
| Hypothesis | Score | IoU | Precision | Recall | Visible share | Centroid distance | Passes checks | Fails on | |
|---|---|---|---|---|---|---|---|---|---|
| FoundationPose rank | |||||||||
| 1 | 234 | 134.281 | 0.411 | 1.000 | 0.509 | 0.993 | 0.009 | True | |
| 2 | 25 | 134.156 | 0.424 | 1.000 | 0.533 | 0.997 | 0.018 | True | |
| 3 | 181 | 134.156 | 0.427 | 1.000 | 0.530 | 0.993 | 0.021 | True | |
| 4 | 235 | 134.094 | 0.413 | 0.998 | 0.504 | 0.993 | 0.005 | True | |
| 5 | 24 | 134.062 | 0.414 | 0.999 | 0.516 | 0.993 | 0.008 | True | |
| 6 | 85 | 134.031 | 0.392 | 0.998 | 0.504 | 0.999 | 0.020 | False | IoU |
| 7 | 241 | 134.031 | 0.404 | 0.990 | 0.499 | 0.990 | 0.002 | False | recall |
| 8 | 103 | 133.969 | 0.411 | 1.000 | 0.521 | 0.997 | 0.016 | True | |
| 9 | 186 | 133.969 | 0.406 | 0.999 | 0.502 | 0.990 | 0.009 | True | |
| 10 | 187 | 133.938 | 0.397 | 0.988 | 0.489 | 0.988 | 0.004 | False | IoU, recall |
3. Three Stages, Compared with the Multi-View Reference¶
- Initial guess: the aligned body and the tracked cone, with poses copied from the nearest confirmed frame where tracking failed.
- CoCoNet: a network that looks at a window of frames (RGB, depth, person and cone masks) and corrects the body and the cone together.
- Contact refinement: an optimization that pulls the hands onto the cone, keeps the cone on its outline in the video and out of the body, and smooths the motion.
Reference: the same recording seen by a calibrated multi-camera rig, released as V2D Track 2 data (CC BY 4.0). It was not used to make the results.
The video shows the three stages drawn over the input video. The viewer lets you step through the clip: use the panel on the right (Frame slider, Play, one checkbox per stage, and the reference).
clip.preview_video()
viewer.show_stages()
viewer.show()
Use the panel on the right of the viewer: Frame slider, Play, and one checkbox per stage. Colors: 1. Initial guess = orange, 2. After CoCoNet = sky blue, 3. After contact refinement = green.
clip.scores()
Computed on 110 frames (every 4 frames) in 5.3 s. Lower is better, except frames with hand contact.
| Object Chamfer, cm | Object acceleration error, cm/frame² | Body jitter, cm/frame² | Frames with hand contact, % | Object inside body, cm | Body Chamfer, cm | |
|---|---|---|---|---|---|---|
| Stage | ||||||
| 1. Initial guess | 49.50 | 4.47 | 2.13 | 17.27 | 0.04 | 7.38 |
| 2. After CoCoNet | 6.91 | 3.08 | 2.56 | 51.82 | 0.02 | 6.57 |
| 3. After contact refinement | 6.80 | 0.68 | 1.39 | 54.55 | 0.02 | 6.55 |
| Multi-view reference | NaN | NaN | 0.23 | NaN | NaN | NaN |
| Official 2026-09-23 score (final stage) | 6.71 | 0.79 | NaN | NaN | 0.00 | 6.38 |
How to read the table:
- Chamfer: the average distance from each surface to the other one, both directions added, as in the official evaluation. Lower is better.
- Object acceleration error: how much more (or less) the cone's motion shakes than the reference's.
- Body jitter: the average acceleration of points on the body surface. The reference row shows how smooth real motion is.
- Frames with hand contact: frames where a hand is within 1.5 cm of the cone.
- Object inside body: the average depth of cone surface points inside the body, counting points outside as 0.
- The last row is the official 2026-09-23 score of the final stage. Its body reference is the internal multi-view MHR body, so body numbers differ slightly from this notebook's SOMA-X reference.
4. Export for Robots¶
V2D Track 2 (Robotic Grounding) takes the human motion as SOMA-X body parameters and the object pose on every frame. We converted CARI4D's final result with the V2D repository's exporter.
export = clip.track2_export()
export.head(3)
440 frames. Columns (values per frame): observation.human.pose (231), observation.human.translation (3), observation.human.identity_coeffs (45), observation.human.scale_params (68), observation.human.bone_length_flexibles (6), timestamp (1), frame_index (1), episode_index (1), observation.object.pose (7), observation.object.visible (1)
| observation.human.pose | observation.human.translation | observation.human.identity_coeffs | observation.human.scale_params | observation.human.bone_length_flexibles | timestamp | frame_index | episode_index | observation.object.pose | observation.object.visible | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | [0.060904883, 0.60822886, 0.06517859, -0.00796... | [0.058218688, -0.2570972, -3.3794732] | [-0.58778226, -0.40030837, -0.5677574, 0.12772... | [0.0, 0.0, 0.0, 0.2983014, 0.12075667, -0.1146... | [0.13494152, 0.03644142, -0.026364312, 0.00075... | 0.000000 | 0 | 17 | [0.14300592, 1.1027948, 2.0116823, 0.024365643... | True |
| 1 | [0.071827486, 0.6339985, 0.052402526, -0.01876... | [0.08096893, -0.25965258, -3.3657985] | [-0.5773904, -0.40727812, -0.56066555, 0.15238... | [0.0, 0.0, 0.0, 0.30516726, 0.122671574, -0.11... | [0.1355277, 0.0542343, -0.030657202, -0.003613... | 0.033333 | 1 | 17 | [0.1488282, 1.1061939, 2.0058284, -0.009453366... | True |
| 2 | [0.07532678, 0.6535443, 0.03908336, -0.0157402... | [0.10279496, -0.25803706, -3.3535018] | [-0.5363766, -0.41379973, -0.5687157, 0.152871... | [0.0, 0.0, 0.0, 0.31004846, 0.1260409, -0.1147... | [0.13542825, 0.065368444, -0.012223452, 0.0073... | 0.066667 | 2 | 17 | [0.15341651, 1.1081655, 2.004437, 0.024637965,... | True |