File size: 22,322 Bytes
44aba19 aa62c5f 76d1d84 3c2ff4c 44aba19 aa62c5f 092c6f3 44aba19 3c2ff4c 44aba19 3c2ff4c 44aba19 3c2ff4c e37c13d 2be6743 3c2ff4c 76d1d84 b267863 76d1d84 6429adf 3c2ff4c 44aba19 3c2ff4c 092c6f3 3c2ff4c d6ecabe 3c2ff4c e37c13d 3c2ff4c 1712b10 d6ecabe b521f30 b267863 b521f30 b267863 b521f30 b267863 b521f30 b267863 b521f30 b267863 b521f30 b267863 b521f30 d6ecabe 84e6423 3c2ff4c 84e6423 3c2ff4c 84e6423 3c2ff4c 84e6423 3c2ff4c 84e6423 3c2ff4c 84e6423 c7df94c b267863 c7df94c b267863 c7df94c b267863 c7df94c 3c2ff4c 84e6423 3c2ff4c 03efc8e 3c2ff4c 03efc8e 3c2ff4c 03efc8e e63e43b bff376b e63e43b bff376b e63e43b bff376b e37c13d b267863 3c2ff4c 44aba19 b267863 e37c13d 3c2ff4c b267863 44aba19 180c67c 3c2ff4c | 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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | ---
license: cc-by-4.0
task_categories:
- robotics
tags:
- robotics
- tactile
- manipulation
- multimodal
- gelsight
- realsense
- motion-capture
- world-model
- human-collected
- lerobot
pretty_name: React (Tactile-Visual Manipulation)
size_categories:
- 100K<n<1M
configs:
- config_name: motherboard
data_files:
- split: train
path: data/motherboard/meta/**/*.parquet
- config_name: pushT
data_files:
- split: train
path: data/pushT/meta/**/*.parquet
- config_name: all
default: true
data_files:
- split: train
path: data/**/meta/**/*.parquet
---
# React — Multi-Task Tactile-Visual Manipulation
Dense, contact-rich, synchronized multimodal interaction data collected from **human hands holding handheld GelSight tactile sensors** (no robot arm). Intended for **tactile-visual dynamics / world-model learning**.
> **133 min · 240 k frames @ 30 Hz · 3× RGB + 2× GelSight + OptiTrack · 2 tasks**
>
> Rows are written at 30 Hz, but the **tactile stream updates more slowly** — see
> [Tactile sampling rate](#tactile-sampling-rate-read-this-before-training-on-touch).
## Format — LeRobot-style video release
Each episode ships as **5 MP4 video streams** (640×480, H.264) + a **per-frame parquet** of poses and contact metrics. This matches how LeRobot / DROID / Open X-Embodiment ship manipulation data: tiny on disk (whole dataset ≈ 4.8 GB without depth vs ~1 TB raw), random-access decodable, training-ready.
```
data/<task>/
├── calibration/ # OptiTrack→camera extrinsics for this task
│ ├── T_mocap_to_cam_{left,middle,right}.json
│ ├── T_gel_to_rigid_{left,right}.json
│ └── calibration.json # epoch, applies-to dates, RMSE, chain
├── videos/<date>/episode_NNN/
│ ├── view_left.mp4 view_middle.mp4 view_right.mp4 # 640×480 RGB
│ └── tactile_left.mp4 tactile_right.mp4 # 640×480 GelSight
├── meta/<date>/episode_NNN.parquet # one row per frame (see below)
├── episodes.jsonl # one row per episode
├── segments.json # clean-segment index (no bad frames)
├── bad_frames.json # quality intervals per episode
└── previews/<date>/episode_NNN.mp4 # 1280×480 viewer-layout preview
```
### parquet columns (per frame, aligned to video frame `i`)
| Column | Type | Meaning |
|---|---|---|
| `frame_idx` / `frame_index` | int | 0…T-1, matches MP4 frame index |
| `episode` / `episode_index` | str / int | source episode key and its 0-based index within the task |
| `task` / `task_index` | str / int | task name and index (0=motherboard, 1=pushT) |
| `timestamp` | float64 | camera clock (s) |
| `sensor_left_pose`, `sensor_right_pose` | list[7] | OptiTrack world pose of each GelSight (xyz + quat wxyz) |
| `object_pose` | list[7] | OptiTrack world pose of the manipulated object (NaN where the object body was not tracked — e.g. all pushT) |
| `tactile_{L,R}_{intensity,area,mixed}` | float32 | contact metrics (computed at full 640×480) |
| `tactile_{left,right}_is_new` | bool | **True when that row is a fresh tactile reading** (not a repeat of the previous row) |
| `source_h5_frame` | int | index into the original recording |
**Decoded frames are RGB** (standard decoder convention) for all five RGB streams.
### estimated contact force (`motherboard` + `pushT`, 36 episodes)
There is **no force/torque sensor on this rig** — the demonstrator's hand holds
the sensor, so demonstrated pose equals achieved pose and the usual
"position error × stiffness" force channel does not exist. These columns are
**estimated from the GelSight images alone** by photometric reconstruction
(difference image → per-sensor RGB lookup table → Poisson integration → depth),
then mapped to newtons by a calibration fitted on sphere presses of known load.
| Column | Type | Meaning |
|---|---|---|
| `force_{left,right}_normal_n` | float32 | estimated normal force [N], ≥ 0, exactly `0.0` on no-contact rows |
| `force_{left,right}_penetration_mm` | float32 | `F / k` — how far a stiffness-`k` environment would be pushed in |
| `force_{left,right}_target_pose` | list[7] | that sensor's pose displaced `F/k` along the contact normal (quaternion carried through unchanged) |
```python
import numpy as np, pyarrow.parquet as pq
t = pq.read_table("data/motherboard/meta/2026-05-10/episode_000.parquet")
f = t["force_left_normal_n"].to_numpy() # (T,) newtons
obs = np.array(t["sensor_left_pose"].to_pylist()) # (T, 7) xyz + quat
tgt = np.array(t["force_left_target_pose"].to_pylist()) # (T, 7) the action
```
#### What "force-informed action" means, and how to train on it
A policy trained to output `sensor_*_pose` learns **where to go**. It cannot
learn **how hard to press**, because in this data the two are the same signal:
a human hand reached a pose, and whatever force resulted was never recorded as
a separate command. Regressing that pose and replaying it on a compliant robot
reproduces the trajectory and not the interaction — the same motion against a
stiffer or differently-placed object produces a different force, and nothing
in the demonstration says which force was intended.
`force_*_target_pose` is that missing command, written in the units a robot
already accepts:
```
target = observed + (F / k) · n̂ n̂ = press direction of that sensor,
R(q_row) @ gel_axis_in_rigid
```
It is the pose a **stiffness-`k` impedance controller** would have to be
commanded in order to generate the estimated force `F` against a surface at the
observed pose. Train the policy to output `target_pose`, deploy it as the
setpoint of an impedance/admittance controller with the same `k`, and the
controller produces both the reach and the press. This is the standard trick
behind position-based force control; the only new part is that `F` came from
the tactile images rather than from a load cell.
```python
action = tgt # what the policy predicts
observation = obs # where the sensor actually was
# free space: byte-identical, so this is a strict addition to the old target
assert np.array_equal(action[f == 0], observation[f == 0])
```
That identity is not a claim — it is checked element-wise over all **301,727**
free-space rows of the release, maximum deviation `0.0`, quaternions included.
Nothing changes where nothing is touched, so a model trained on `target_pose`
degenerates to the pose-only model in free space and differs only in contact.
#### Choosing `k` — it is your controller's number, not ours
`k = 1.0 N/mm` is a **declared assumption**, recorded in the parquet field
metadata (`twm.stiffness_n_per_mm`) and in each `<episode>.force.json`, so a
target pose is never uninterpretable. It is deliberately soft, and at that
value the implied penetrations are larger than the gel is thick:
| | penetration at `k = 1` | inside the 4.25 mm gel? |
|---|---|---|
| p95 over all rows | 5.78 mm | no |
| p95 over **contact** rows | 6.86 mm | no |
| maximum | 7.285 N → 7.285 mm | no |
**8.84%** of all rows exceed the gel thickness at `k = 1`. To keep penetration
physically plausible you need a stiffer environment model:
* `k ≥ 1.37 N/mm` — p95 over all rows inside the gel. *This is the weakest of
the three and the least useful:* 62.8% of rows are free space, so a
percentile over all rows is mostly a percentile of zeros.
* `k ≥ 1.62 N/mm` — p95 over **contact** rows inside the gel. Use this one.
* `k ≥ 1.72 N/mm` — even the hardest press inside the gel.
Recompute rather than rescale the shipped column, since the direction matters:
```python
K = 1.62 # your controller's stiffness
n_hat = (tgt[:, :3] - obs[:, :3]) # F/k · n̂ at the shipped k=1
n_hat /= np.linalg.norm(n_hat, axis=1, keepdims=True) + 1e-12
my_target = obs.copy()
my_target[:, :3] = obs[:, :3] + (f / K)[:, None] * n_hat
```
#### Read this before using the numbers
- **Accuracy is rank-order within a group, not a certified absolute scale.**
Held out by press position the estimator scores ρ = 0.739 / MAE 1.23 N on its
own calibration objects. On five public force-labelled datasets the same
pipeline reaches ρ 0.775–0.986. It is reliable for *how hard, relative to
other frames*; it is not a load cell. Do not report absolute newtons from
this dataset as ground truth.
- **Forces saturate at 7.285 N.** The calibration's isotonic stage clips at the
hardest press it was fitted on, so 0.90% of samples sit exactly at that value.
Treat the maximum as a floor, not a measurement, and consider masking rows at
the ceiling out of a regression loss.
- **Duplicate tactile rows repeat the previous estimate.** The GelSight stream
is slower than 30 Hz; rows with `tactile_{side}_is_new == False` carry the
previous frame's force unchanged (forward fill, asserted exact). Filter on
`is_new` if you need independent samples — and note that a force *derivative*
computed without that filter is zero on ~72% of rows by construction.
- **Row alignment is verified, not assumed.** Every one of the **72/72**
sensor-sides was checked row-for-row against the release parquet it was
exported from.
- **The direction `n̂` comes from calibration, not from the image.** It is the
sensor's gel axis rotated by the row's own quaternion. Two sensor-sides of 72
lack a usable gel-to-rigid transform and carry force with no displacement;
they are identified in `data/force_export_manifest.json`.
### depth (optional, `data/<task>/depth/`)
Per-camera depth is shipped as **lossless FFV1 16-bit video** (`gray16le`):
```
data/<task>/depth/<date>/episode_NNN/depth_{left,middle,right}.mkv
```
- uint16, **millimeters**; `0` = no return / invalid.
- Frame `i` aligns to the RGB video frame `i` and parquet row `i`.
- Decode with PyAV (`frame.to_ndarray()` → `(480, 640)` uint16). cv2 cannot read 16-bit video.
- Load via `ReactVideoDataset(..., load_depth=True)`.
## Tasks
| Task | Episodes | Dates | Duration | Clean segments | Calibration |
|---|---|---|---|---|---|
| **motherboard** | 32 | 2026-05-10/11/19 | 108 min | 76 (107 min) | **May-12** (RMSE ~5 mm) |
| **pushT** | 4 | 2026-06-18 | 25 min | 17 (25 min) | **June-26** (RMSE ~0.6 px) |
See [`tasks.json`](tasks.json) for the machine-readable registry (per-task dates, sensors, calibration epoch, world-frame offsets).
### Calibration epochs
Cameras were **recalibrated between tasks**. Each task points to the calibration valid for its recordings:
- `motherboard` → **May-12** extrinsics (`data/motherboard/calibration/`)
- `pushT` → **June-26** extrinsics (`data/pushT/calibration/`)
Camera extrinsics are used only for the projection overlay; **stored poses are OptiTrack world-frame** and independent of calibration. The 2026-05-19 motherboard session had a redefined world origin; an offset `(0.23, 0, 0.175) m` is already baked into its poses so all dates share one frame (recorded in `episodes.jsonl`).
## Downloading — depth is optional
The dataset splits into a **lightweight core** (RGB + tactile + poses, ~4.8 GB) and an **optional depth tree** (`data/<task>/depth/`, ~33 GB lossless). Depth lives in its own subtree so you can skip it entirely.
```python
from huggingface_hub import snapshot_download
# Core only — RGB + tactile + parquet, NO depth (~4.8 GB)
snapshot_download("yxma/React", repo_type="dataset",
ignore_patterns=["*/depth/*"])
# Everything including depth (~39 GB)
snapshot_download("yxma/React", repo_type="dataset")
# One task only
snapshot_download("yxma/React", repo_type="dataset",
allow_patterns=["data/motherboard/*"], ignore_patterns=["*/depth/*"])
```
Or use the helper: `python examples/download.py --no-depth` (see [`examples/download.py`](examples/download.py)).
The `ReactVideoDataset` loader **never touches depth unless you pass `load_depth=True`**, so depth-free training requires no depth download.
## Loading
```python
from examples.react_video_dataset import ReactVideoDataset
ds = ReactVideoDataset("data/motherboard", window_length=16, mode="segment")
sample = ds[0]
# sample["view_middle"]: (16, 480, 640, 3) uint8 RGB
# sample["tactile_left"]: (16, 480, 640, 3) uint8 RGB
# sample["sensor_left_pose"]: (16, 7) float32
```
`mode="segment"` iterates clean spans (no bad frames by construction); `mode="window"` slides over whole episodes and skips `bad_frames.json` intervals. Backend: PyAV (install `decord` for faster random access).
## ✅ Tactile latency corrected (was ~15 frames)
Recordings **up to and including 2026-06-18** HAD a GelSight-vs-camera capture
lag of **≈15 frames (~0.5 s)**: the tactile stream at index `i` was physically
captured ~15 frames *before* the camera/pose at the same index. Cause: a
recording-side `cv2.VideoCapture` V4L2 buffer that was never flushed
(throttled reads + no `BUFFERSIZE=1` + default pixel format). Fixed in the rig
on 2026-06-27; **future recordings will not have this lag**.
The streams are stored frame-aligned by tick index, so this lag is baked in but
**now corrected in the published data** (tactile shifted +15f, rebuilt from raw H5). No loader flag needed. The loader still accepts `tactile_latency=` for raw data:
```python
ds = ReactVideoDataset("data/motherboard", tactile_latency=15) # pairs view[i] with tactile[i+15]
```
`tactile_latency` shifts both the tactile videos and the tactile contact-scalar
columns; poses/views/depth are unchanged. Set `tactile_latency=0` for the raw
(uncompensated) data. The exact per-session value should be re-measured with
`camera_stream/measure_gelsight_latency.py`.
## Tactile sampling rate (read this before training on touch)
Parquet rows and all five videos are written at 30 Hz, but the GelSight stream
does **not** carry 30 Hz of information. Measured across the whole release:
| | value |
|---|---|
| tactile rows | 480 080 (2 sensors × 240 k frames) |
| genuinely distinct tactile frames | **135 297** |
| duplicated rows | **71.8 %** |
| effective tactile rate | **~8.5 fps** |
| longest frozen stretch | 30 frames (1.0 s) |
Two causes, one fixed:
1. **Sensor ceiling** — the GelSight Mini streams 3280×2464 MJPG at 18.75 fps.
Some duplication against a 30 Hz row clock is unavoidable (~40 %).
2. **Recording-side decode backlog** *(all currently published data)* — the rig
decoded each full 8 MP frame on the capture thread (~71 ms), so tactile
effectively ran at ~8 fps and every frame was reused ~3.6×. Fixed on the rig
on 2026-06-27 (reduced-scale decode + per-sensor capture timestamps);
recordings from that date on reach the 18.75 fps ceiling.
**Use the flags.** Every row carries `tactile_left_is_new` /
`tactile_right_is_new`:
```python
df = pq.read_table("episode_000.parquet").to_pandas()
fresh = df[df.tactile_left_is_new] # 8.5 fps of real readings
```
Training tactile dynamics on all rows teaches the model that touch mostly does
not change; it does, we just sampled it slowly. Visual and pose streams are
unaffected — those are genuinely 30 Hz.
The flags were recovered from the shipped contact metrics (a repeated frame
gives a bit-identical metric triple) and checked frame-by-frame against the
source recordings: **0 mismatches over 899 frames on each of 7 audited
episodes**, spanning both tasks. The same check independently recovers the
+15-frame latency correction baked into the release.
## How to use this dataset
Three recipes, in the order most people need them. Every one is executed
against the published files by `scripts/test_readme_recipes.py`, so the code
below is code that runs, not code that reads well.
### 1. Sample training clips — start from `segments.json`, not from episodes
An episode is a raw recording and contains flagged frames. A **segment** is a
contiguous span that is already clean. Sampling clips from episodes means
re-deriving the quality filter yourself and getting it slightly different.
```python
import json, numpy as np, pyarrow.parquet as pq
segs = json.load(open("data/pushT/segments.json"))["segments"]
s = segs[0] # {'source_episode', 'frame_range', ...}
date, ep = s["source_episode"].split("/")
a, b = s["frame_range"] # inclusive, in VIDEO frame coords
t = pq.read_table(f"data/pushT/meta/{date}/{ep}.parquet").slice(a, b - a + 1)
```
`frame_range` indexes the published MP4s and the parquet with the same origin,
so frame `i` of `view_middle.mp4` is row `i` of the parquet. No offset, no
lookup table.
### 2. Train on touch — respect the tactile rate
Rows are written at 30 Hz; the GelSight stream is slower. A row with
`tactile_{side}_is_new == False` repeats the previous tactile frame, its
contact scalars, and its force estimate, unchanged.
```python
new = t["tactile_left_is_new"].to_numpy()
# independent tactile samples only
idx = np.flatnonzero(new)
# a finite difference over ALL rows is 0 wherever is_new is False, by construction
```
Roughly 72% of rows are repeats. Ignoring this does not corrupt a model that
consumes frames independently, but it silently zeroes any temporal derivative
of a tactile channel and inflates any "how often does touch change" statistic.
### 3. Train an action that includes *how hard*
This is the part that distinguishes React from a pose-only demonstration set,
so it gets its own section: **[estimated contact
force](#estimated-contact-force-motherboard--pusht-36-episodes)**. In short:
```python
observation = np.array(t["sensor_left_pose"].to_pylist()) # where it was
action = np.array(t["force_left_target_pose"].to_pylist()) # where to push to
```
`action` equals `observation` exactly in free space and leads it by `F/k` along
the press direction during contact. Train on `action`, deploy through an
impedance controller of stiffness `k`, and the policy commands both the reach
and the press. Read that section before choosing `k` — the shipped `k = 1 N/mm`
is a declared assumption and a soft one.
### What this dataset is not
- **No robot.** A human hand holds each sensor. There are no joint angles, no
gripper state, and no action in the robot-command sense other than the
force-informed target pose described above.
- **No force sensor.** Every newton in these files is estimated from tactile
images. It is calibrated and validated, and it is still an estimate — see the
limits in the force section before reporting absolute values.
- **Not a benchmark.** There is no train/val/test split and no success label.
It is interaction data for dynamics and representation learning.
## Data quality
Per-task `bad_frames.json` marks intervals that should not be trained on, and
`segments.json` is their complement — contiguous clean spans, already excluding
every flag below. **Use `segments.json` and you never have to think about
this table.**
| flag | motherboard | pushT |
|---|---|---|
| `cam_corruption` | 0 | 0 |
| `intensity_spikes` | 56 | 10 |
| `ot_loss_L` | 1,443 | 106 |
| `ot_loss_R` | 236 | 191 |
| `pose_teleports_L` | 24 | 0 |
| `pose_teleports_R` | 16 | 0 |
| `tactile_corruption` | 102 | 10 |
| **flagged (union)** | **1,797 / 194,445 (0.92%)** | **307 / 45,595 (0.67%)** |
| **clean segments** | 81 spans, 192,626 frames (107.0 min) | 17 spans, 45,288 frames (25.2 min) |
| **dropped, clean but < 16 frames** | 22 | 0 |
The three rows above reconcile exactly: flagged + clean + dropped = total, for
both tasks. Per-flag counts do **not** sum to the flagged total, because one
frame can trip two detectors; the union is what `summary` reports and what the
segments complement.
`ot_loss_*` is OptiTrack track loss (a run of bit-identical poses, i.e. frozen
action), `pose_teleports_*` an implausible jump in translation *and* rotation
in one frame, `intensity_spikes` a GelSight reading above anything contact
produces. `tactile_corruption` and `cam_corruption` are **video** defects —
torn frames the sidecar scalars cannot see. They are found by looking for
off-illumination magenta laid out in scanlines: a GelSight is lit by three
coloured LEDs, magenta is outside that gamut, and a corrupt row is written
edge to edge while an object pressed into the gel is not. Every flagged
interval in this release was also inspected by eye.
**Runt episodes.** Two motherboard recordings are far too short to be complete
demonstrations and are best filtered out: `2026-05-19/episode_003` (4.0 s) and
`2026-05-19/episode_004` (7.0 s). Median episode length is 213 s; these two are
together 0.8 % of the release. They are shipped rather than deleted so episode
numbering stays stable.
**A missing pushT episode.** `pushT/2026-06-18/episode_004` was recorded but is
not published. Its recorder died without closing the file, which loses HDF5's
metadata cache: 79 GB of intact pixels behind a root object header that was
never written. All eight image streams were recovered (15,447 frames,
byte-verified), but only 2 of 16 timestamp chunks survived and no usable
OptiTrack poses. Without timestamps there is no cross-modal alignment, and
reconstructing them by interpolation misplaces frames by 15–1431 — so it is
video, not an episode, and is deliberately absent rather than published
half-aligned. Episode numbering is unaffected: pushT publishes 000–003.
## Notes
- **Depth is published**, under `data/<task>/depth/<date>/<episode>/depth_*.mkv`
(16-bit millimetres, FFV1-in-Matroska, lossless). It is 34.3 GB
of the 39.0 GB repo, so the download recipes above let you skip
it — everything else is 4.8 GB.
- The previous single-task `.pt` release (`episodes/`, `segments/`) is
superseded by this video format.
- Preview clips under `data/<task>/previews/` are 30 s renders at 2x with the
three camera views, the OptiTrack skeleton, both GelSight streams and the
projected sensor position. They are for looking, not for training, and frames
excluded by `bad_frames.json` are outlined and named in red.
## License
[CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
|