Datasets:
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
FailBench LIBERO v2 — contact-prediction dataset
Labeled robot-failure trials built on LIBERO teleop demos (Franka Panda). Each trial injects a hardware failure partway through a demo and records the contacts the failure causes during a 1-second settle. The supervised target is a 240×320 force-weighted contact heatmap in the agentview camera — the model predicts where a failure at a given pre-failure configuration drives the robot/objects into contact.
Sibling dataset: aaronngx/failbench-robocasa-v2
(identical schema, 240×320, RoboCasa kitchens). The two pool cleanly for cross-corpus training.
- 45,000 trials = 3 splits × 10 tasks × 1,500 trials.
- One HDF5 per task under
v2/<split>/; per-trial groups at/trials/<trial_id>/.
⚠️ The one gotcha: import hdf5plugin first
Arrays are Blosc(lz4)-compressed (third-party HDF5 filter id 32001). Any reader must
import hdf5plugin before h5py opens a file, or reads fail with "can't open plugin
directory". (dataset.compression reports None for this filter — misleading; it IS compressed.)
pip install hdf5plugin and import it first. The bundled load_failbench.py does this for you.
Quick start
pip install -r requirements.txt
python -c "from huggingface_hub import snapshot_download as s; \
s('aaronngx/failbench-libero-v2', repo_type='dataset', local_dir='failbench-libero-v2')"
python load_failbench.py --data_root failbench-libero-v2 \
--cache_root failbench-libero-v2/target_cache
Standalone load snippet
import load_failbench as fb # imports hdf5plugin for you
df = fb.load_manifest("failbench-libero-v2") # concatenates the 3 split manifests
row = df[df.n_contacts > 0].iloc[0]
trial = fb.read_trial(fb.resolve_h5("failbench-libero-v2", row.split, row.task), row.trial_id)
# (240,320) force-weighted contact heatmap = the prediction target:
target = fb.heatmap_from_projection("failbench-libero-v2/target_cache",
row.split, row.task, row.trial_id)
# or rebuild from raw contacts + camera, no cache: fb.heatmap_from_contacts(trial)
Repo layout
v2/libero_spatial/<task>.h5 # 10 tasks, 1,500 trials each
v2/libero_object/<task>.h5 # 10
v2/libero_goal/<task>.h5 # 10
v2/<split>/manifest.csv # per-split manifest (1,500 rows/task)
v2/quarantine.csv # excluded trial ids
target_cache/libero_spatial|object|goal/<task>.h5 # /<trial_id>/projection (N,3)[u,v,force] + failure_prob
load_failbench.py requirements.txt examples/quickstart.py
planner/ scripts/ # the exact FailBench load+train code subtree (see "Train")
Resolve files by (split, task) relative to your local root — the manifest's h5_path
column holds the original build machine's absolute path and is not portable. task here is the
LIBERO instruction string (e.g. open_the_middle_drawer_of_the_cabinet).
Per-trial schema
Each /trials/<trial_id>/ group. T=8 window @ 4 fps; settle S=50 steps (~1 s). Images are
(H,W)=(240,320); depth is float16 metric.
| Key | Shape | Dtype | Meaning |
|---|---|---|---|
window_agentview_rgb |
(8,240,320,3) | u8 | pre-failure agentview window |
window_agentview_depth |
(8,240,320) | f16 | depth, metres |
window_wrist_rgb / _depth |
(8,240,320[,3]) | u8/f16 | wrist (eye_in_hand) window |
window_qpos / window_qvel |
(8,7) | f32 | arm joint pos/vel over window |
window_ee_pos |
(8,3) | f32 | end-effector xyz |
pre_rgb / pre_depth |
(240,320[,3]) | u8/f16 | single pre-failure frame (v1-compat) |
pre_qpos/pre_qvel/pre_ee_pos |
(7,)/(7,)/(3,) | f64 | pre-failure state |
goal_qpos/goal_qvel |
(k,7) | f32 | goal-conditioning frames |
contact_positions |
(N,3) | f32 | world-frame contact points during settle |
contact_force_world |
(N,3) | f32 | linear force, world frame (magnitude → heatmap weight) |
contact_forces |
(N,6) | f32 | contact-frame wrench (legacy; first 3 = linear) |
contact_time |
(N,) | i32 | settle step the contact occurred |
contact_geom_pairs |
(N,2) | i32 | colliding geom ids |
baseline_contact_geom_pairs / _positions |
(M,·) | i32/f32 | healthy-hold replay contacts (filter input) |
geom_bodyid |
(ngeom,) | i32 | geom→body map (body-level filter) |
robot_geom_ids (attr) |
(·,) | i32 | robot geom ids |
post_agentview_rgb/_depth, post_wrist_* |
(240,320[,3]) | u8/f16 | post-settle observation |
cam_agentview_pos/_mat0/_fovy/_size |
(3,)/(9,)/()/(2,) | f64/i32 | agentview pinhole calibration |
settle_qpos/qvel/gripper_qpos |
(50,·) | f32 | post-failure state trajectory |
settle_obj_pos/settle_obj_quat |
(50,nobj,·) | f32 | object pose trajectory |
obj_names |
(nobj,) | str | object body names |
Scalar attrs: trial_id, split(=libero_spatial|object|goal), task, demo_key, seed, fail_idx, traj_progress, failure_mode, failure_prob, is_holding.
Failure modes
GRIPPER_OPEN, SINGLE_JOINT, MULTI_JOINT, ALL_JOINTS, SLIPPERY_GRIP. Each trial samples
one mode at a stratified traj_progress; failure_prob is the mode's prior, used as the per-trial
heatmap weight. Failure injection on LIBERO's torque-controlled Panda uses gravity-comp + per-joint
PD on healthy joints during settle so a single-joint failure stays distinguishable from all-joints.
Camera
| Role | Camera | W×H |
|---|---|---|
| agentview (target grid) | agentview |
320×240 |
| wrist | eye_in_hand |
320×240 |
The contact heatmap is projected into agentview, so the (240,320) target IS the prediction grid.
Same resolution/semantics as RoboCasa's robot0_agentview_center/robot0_eye_in_hand.
The target
target_cache/<split>/<task>.h5[<trial_id>]/projection is (N,3)=[u,v,force_mag] of the
failure-induced in-frame contacts, plus a failure_prob attr. Rebuild the dense heatmap as
scatter(force·failure_prob) → Gaussian blur(σ=4 px) (load_failbench.heatmap_from_projection,
or planner.risk.v2_targets.build_target_from_projection on GPU). Pass log1p=True to match the
GPU training path's mass compression.
Train (reproduce the in-repo benchmark model)
The bundled planner/ + scripts/benchmark/train_one.py is the exact load+train subtree (pure
torch+torchvision; no MuJoCo). Targets are built on the fly — there is no --target_cache_root
flag.
PYTHONPATH=. python -m scripts.benchmark.train_one \
--v2_root failbench-libero-v2/v2 \
--splits libero_spatial libero_object libero_goal \
--model unet --modalities state rgb --T 8 \
--split_by demo --epochs 10 --batch_size 64
# models: mlp | convdec | unet | transformer ; modalities: state goal rgb depth failure_mode ...
# pooled cross-corpus: add --robocasa_v2_root <robocasa v2 root>
License & attribution
Released under MIT. Built on LIBERO (Liu et al.) and robosuite — please cite those works. Contact labels and the failure-injection pipeline are from FailBench. Underlying demo content remains under its upstream LIBERO license.
- Downloads last month
- 176