yxma commited on
Commit
44aba19
·
verified ·
1 Parent(s): d3eda10

Add dataset card with schema, quick start, caveats, and roadmap

Browse files
Files changed (1) hide show
  1. README.md +133 -0
README.md ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - robotics
5
+ tags:
6
+ - robotics
7
+ - tactile
8
+ - manipulation
9
+ - multimodal
10
+ - gelsight
11
+ - realsense
12
+ - motion-capture
13
+ pretty_name: React (Tactile-Visual Manipulation)
14
+ size_categories:
15
+ - 10K<n<100K
16
+ configs:
17
+ - config_name: mode1_v1
18
+ data_files:
19
+ - split: train
20
+ path: processed/mode1_v1/**/episode_*.pt
21
+ ---
22
+
23
+ # React
24
+
25
+ Multimodal manipulation recordings from a bimanual setup with vision-based tactile sensors and motion capture.
26
+
27
+ ## Recording setup
28
+
29
+ | Stream | Hardware | Native shape | Rate |
30
+ |---|---|---|---|
31
+ | 3× RealSense color | Intel D415 (serials `143322063538`, `104122062574`, `217222066989`) | 480×640×3 uint8 (BGR) | 30 FPS |
32
+ | 3× RealSense depth | same | 480×640 uint16 (mm) | 30 FPS |
33
+ | 2× GelSight tactile | GelSight Mini (left / right) | 480×640×3 uint8 | ~25 FPS, resampled to camera ticks |
34
+ | 3× OptiTrack rigid bodies | `motherboard`, `sensor_left`, `sensor_right` | 7-vector (x, y, z, qx, qy, qz, qw) | ~120 Hz |
35
+
36
+ All streams share a common monotonic timestamp axis recorded under `timestamps`. Per-tracker OptiTrack streams carry their own higher-rate timestamps under `optitrack/<body>/timestamps`.
37
+
38
+ ## Tasks recorded
39
+
40
+ - **`motherboard`** — bimanual insertion / placement on a computer motherboard.
41
+
42
+ ## Repository layout
43
+
44
+ ```
45
+ processed/
46
+ └─ mode1_v1/
47
+ ├─ 2026-03-23/ # 3 episodes (2,141 / 1,948 / 2,109 frames)
48
+ ├─ 2026-05-10/ # 12 episodes ( 763 – 10,476 frames each)
49
+ └─ 2026-05-11/ # 17 episodes ( 263 – 33,739 frames each)
50
+ ├─ episode_000.pt
51
+ ├─ episode_000.contact.json
52
+ ├─ episode_002.pt # episode_001 missing (corrupt at recording time)
53
+ └─ ...
54
+ ```
55
+
56
+ The `processed/mode1_v1/` view is a **task-specific slice** of the underlying raw recordings, not the full sensor suite. It was produced by `twm/preprocess.py` + `twm/contact_index.py` from a private raw HDF5 mirror.
57
+
58
+ ## `processed/mode1_v1/` schema
59
+
60
+ Each `episode_*.pt` is a Python dict loadable with `torch.load(..., weights_only=False)`.
61
+
62
+ | Key | Shape | dtype | Description |
63
+ |---|---|---|---|
64
+ | `view` | `(T, 3, 128, 128)` | uint8 | Overhead camera (`realsense/cam0/color`), center-cropped to square then bilinear-resized to 128×128 |
65
+ | `tactile_left` | `(T, 3, 128, 128)` | uint8 | Left GelSight, same crop/resize |
66
+ | `tactile_right` | `(T, 3, 128, 128)` | uint8 | Right GelSight, same crop/resize |
67
+ | `timestamps` | `(T,)` | float64 | Camera timestamps (seconds, monotonic clock) |
68
+ | `sensor_left_pose` | `(T, 7)` | float32 | Left GelSight rigid body OptiTrack pose, nearest-neighbor aligned to camera timestamps |
69
+ | `sensor_right_pose` | `(T, 7)` | float32 | Right GelSight rigid body OptiTrack pose, same alignment |
70
+ | `tactile_{left,right}_intensity` | `(T,)` | float32 | Per-frame mean per-pixel L2 distance from a contact-free reference frame |
71
+ | `tactile_{left,right}_area` | `(T,)` | float32 | Per-frame fraction of pixels with L2 diff > `tau` |
72
+ | `tactile_{left,right}_mixed` | `(T,)` | float32 | Mean of (diff × mask), captures intensity restricted to contact pixels |
73
+ | `_contact_meta` | dict | — | Per-episode contact metadata: `tau`, drift between first/p01 reference frames, p01 reference indices, the chosen reference RGB frames, etc. |
74
+
75
+ Each `.contact.json` is a small summary of the metric distributions plus drift diagnostics, intended for filtering / sanity checking without loading the full tensors.
76
+
77
+ ### Contact metric definition
78
+
79
+ For each tactile sensor independently:
80
+
81
+ 1. Pick a contact-free **reference frame**: the ~0.1th-percentile-quietest frame by mean L2 distance to the temporal median (`reference_strategy = "p01"`).
82
+ 2. For each frame `t`, compute per-pixel `diff[t, x, y] = || frame[t, :, x, y] − ref[:, x, y] ||_2` (RGB L2 over channels).
83
+ 3. Then:
84
+ - `intensity[t] = mean(diff[t])`
85
+ - `area[t] = mean(diff[t] > tau)` (default `tau = 8.0` on the uint8 scale)
86
+ - `mixed[t] = mean(diff[t] * (diff[t] > tau))`
87
+
88
+ `_contact_meta["drift_warning"]` is `True` if either sensor's drift (L2 distance between the first frame and the p01-reference frame) exceeds `2·tau`; in this release no episode triggers it.
89
+
90
+ ## Quick start
91
+
92
+ ```python
93
+ import torch
94
+ from huggingface_hub import hf_hub_download
95
+
96
+ path = hf_hub_download(
97
+ repo_id="yxma/React",
98
+ repo_type="dataset",
99
+ filename="processed/mode1_v1/2026-05-11/episode_000.pt",
100
+ )
101
+ ep = torch.load(path, weights_only=False)
102
+ print(ep["view"].shape, ep["tactile_left_intensity"].shape)
103
+ # torch.Size([263, 3, 128, 128]) torch.Size([263])
104
+ ```
105
+
106
+ To load contact metadata only (much smaller — useful for filtering):
107
+
108
+ ```python
109
+ import json
110
+ path = hf_hub_download(
111
+ repo_id="yxma/React",
112
+ repo_type="dataset",
113
+ filename="processed/mode1_v1/2026-05-11/episode_000.contact.json",
114
+ )
115
+ meta = json.load(open(path))
116
+ print(meta["drift_left"], meta["drift_right"], meta["drift_warning"])
117
+ ```
118
+
119
+ ## Known caveats
120
+
121
+ - **Missing episode**: `2026-05-11/episode_001` was lost at recording time (HDF5 superblock never finalized when the writer was killed mid-write). It is intentionally absent.
122
+ - **Lossy resize**: the 128×128 `view` and tactile fields are downsampled from native 480×640. Native resolution is **not** preserved in this release.
123
+ - **Single camera**: only `realsense/cam0/color` is included. The other two RealSense views and all depth streams are not in `processed/mode1_v1/`.
124
+ - **OptiTrack alignment**: the per-step poses are nearest-neighbor matched to camera ticks. The full ~120 Hz pose streams are not preserved here.
125
+ - **Mode is opinionated**: contact metrics depend on the chosen `tau` and the p01 reference strategy. If you want a different `tau`, re-deriving from raw is necessary.
126
+
127
+ ## Roadmap
128
+
129
+ A **LeRobot-format full-fidelity** variant (`lerobot/v1.0/`) is planned. It will include all three RealSense color and depth streams, GelSight at native resolution (FFV1 lossless), full-rate OptiTrack pose tracks for all three rigid bodies, and HF-native browser previews. The current `processed/mode1_v1/` slice will remain as a stable training-task view.
130
+
131
+ ## Citation
132
+
133
+ If you use this dataset, please cite (TODO: add bibtex).