File size: 2,789 Bytes
9bc2a0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
license: mit
tags:
  - robotics
  - pointcloud
  - droid
  - 3d-object-detection
---

# DROID 3D Bounding-Box Pipeline — Visualization Data

Per-frame fused 3-camera pointclouds backing the web viewer at
<https://silicon23.github.io/droid_pipeline_visualization/>.

Each episode comes from the DROID v1.0.1 dataset and completed the full
detection pipeline (FoundationStereo depth -> optimized extrinsics -> SAM3
masks -> SAM3D box -> FoundationPose video tracking). Point positions are in
the **Franka base (world) frame**, metres, Z up.

## Layout

```
clouds/{episode_id}/cloud_{preset}.bin     concatenated per-frame gzip blocks
clouds/{episode_id}/index_{preset}.json    byte offsets + per-frame metadata
```

Presets trade file size against density:

| preset | pixel stride | voxel | typical |
|---|---|---|---|
| `low` | 4 | 15 mm | ~230 KB/frame |
| `medium` | 4 | 10 mm | ~380 KB/frame |
| `high` | 2 | 6 mm | ~1.25 MB/frame |

## Block format

Blocks are listed in `index_{preset}.json` as `{t, o, c, n}` — source frame
index, byte offset, compressed length, point count. Fetch one with an HTTP
`Range` request and gunzip it. The inflated block is:

| offset | type | meaning |
|---|---|---|
| 0 | `float32[3]` | `lo` — quantization lower corner (world, m) |
| 12 | `float32[3]` | `hi` — quantization upper corner |
| 24 | `int16[n*3]` | XYZ, linearly mapped `lo..hi` -> `-32768..32767` |
| 24 + 6n | `uint8[n*3]` | RGB |

Dequantize with `xyz = lo + (q + 32768) / 65535 * (hi - lo)`.

`index_{preset}.json` also carries `frames[]` with the per-frame
FoundationPose `status`, `consensus_size`, and the 8-corner `bbox_world`.

## Reading a frame in Python

```python
import gzip, json, numpy as np, requests

BASE = "https://huggingface.co/datasets/Silicon23/droid_pipeline_visualization/resolve/main"
eid, preset, frame = "shard01010_ep008", "medium", 40

ix = requests.get(f"{BASE}/clouds/{eid}/index_{preset}.json").json()
b = ix["blocks"][frame]
raw = requests.get(f"{BASE}/clouds/{eid}/{ix['bin']}",
                   headers={"Range": f"bytes={b['o']}-{b['o']+b['c']-1}"}).content
buf = gzip.decompress(raw)

lo = np.frombuffer(buf, np.float32, 3, 0)
hi = np.frombuffer(buf, np.float32, 3, 12)
n = b["n"]
q = np.frombuffer(buf, np.int16, n * 3, 24).reshape(n, 3).astype(np.float32)
rgb = np.frombuffer(buf, np.uint8, n * 3, 24 + n * 6).reshape(n, 3)
xyz = lo + (q + 32768) / 65535 * (hi - lo)
```

## Notes

- Depth is cropped at 2.5 m to keep the robot workspace and drop far-wall clutter.
- Wrist-camera pose is per-frame from `trajectory.h5` (Euler XYZ, camera-to-world
  directly). Episodes flagged `wrist_sensor_flipped` use the right lens composed
  with a 180 deg rotation about Z.
- Only the **left** eye of each side-by-side stereo recording is used.