| --- |
| license: apache-2.0 |
| task_categories: |
| - robotics |
| tags: |
| - robotics |
| - manipulation |
| - bimanual |
| - dexterous-hand |
| - imitation-learning |
| - lerobot |
| size_categories: |
| - 100K<n<1M |
| --- |
| |
| # PetalDex — Bimanual Dexterous "Arrange Flowers" Dataset |
|
|
| **Project website:** [https://petaldex.github.io/](https://petaldex.github.io/) |
|
|
| PetalDex is a bimanual dexterous manipulation dataset for the **"arrange flowers"** task, |
| collected on a `wuji_bimanual` robot (two 7‑DoF arms + two 20‑DoF dexterous hands). |
| Each frame provides two RGB camera views (head + right wrist), a 54‑D proprioceptive |
| state, and a 54‑D action, recorded at **30 fps**. |
|
|
| The dataset is released in **two formats** (identical content), so you can use whichever |
| fits your pipeline: |
|
|
| | Format | Path | Images | Loader | |
| |--------|------|--------|--------| |
| | **LeRobot v3.0** | `lerobot/<subset>/` | AV1 video (`.mp4`) | `lerobot` / parquet | |
| | **HDF5** | `hdf5/<subset>/` | per‑frame JPEG in `.h5` | `h5py` + `cv2` | |
|
|
| ## Subsets |
|
|
| | Subset | Episodes | Frames | Description | |
| |--------|---------:|-------:|-------------| |
| | `robot_auto` | 525 | 956,892 | Robot‑collected "arrange flowers" episodes (merged). | |
| | `robot_human_co-creation` | 200 | 268,322 | Human–robot co‑creation episodes. | |
|
|
| ## Data schema |
|
|
| - `observation.state` — `float32[54]` = `left_arm(7) + right_arm(7) + left_hand(20) + right_hand(20)` |
| - `action` — `float32[54]` (same layout as state) |
| - `observation.images.head` — `224×224×3` RGB |
| - `observation.images.right_wrist` — `224×224×3` RGB |
| - `fps` — 30 · `robot_type` — `wuji_bimanual` · `task` — `"arrange flowers"` |
|
|
| ## Repository layout |
|
|
| ``` |
| PetalDex/ |
| ├── lerobot/ |
| │ ├── robot_auto/ # LeRobot v3.0 dataset (data/ + videos/ + meta/) |
| │ └── robot_human_co-creation/ |
| └── hdf5/ |
| ├── robot_auto/ # episode_000000.h5 ... + dataset_meta.json |
| └── robot_human_co-creation/ |
| ``` |
|
|
| > Note: this repo hosts **four** sub‑datasets, so `LeRobotDataset("jasonGUself/PetalDex")` |
| > at the root will not work — load a specific subset folder instead (see below). |
|
|
| ## Usage |
|
|
| ### LeRobot v3.0 |
|
|
| Download a subset and point `LeRobotDataset` at its local root: |
|
|
| ```python |
| from huggingface_hub import snapshot_download |
| from lerobot.datasets.lerobot_dataset import LeRobotDataset |
| |
| local = snapshot_download( |
| repo_id="jasonGUself/PetalDex", repo_type="dataset", |
| allow_patterns="lerobot/robot_auto/*", |
| ) |
| ds = LeRobotDataset("jasonGUself/PetalDex", root=f"{local}/lerobot/robot_auto") |
| print(ds[0].keys()) |
| ``` |
|
|
| ### HDF5 |
|
|
| Each episode is one `.h5` file. Images are stored as per‑frame JPEG bytes |
| (variable‑length `uint8`), decode with OpenCV (returns BGR by cv2 convention): |
|
|
| ```python |
| import h5py, cv2, numpy as np |
| |
| with h5py.File("hdf5/robot_auto/episode_000000.h5", "r") as f: |
| T = int(f.attrs["num_frames"]) # attrs: fps, task, robot_type, ... |
| state = f["observations/state"][:] # (T, 54) float32 |
| action = f["action"][:] # (T, 54) float32 |
| head = cv2.imdecode(f["observations/images/head"][0], cv2.IMREAD_COLOR) # (224,224,3) |
| wrist = cv2.imdecode(f["observations/images/right_wrist"][0], cv2.IMREAD_COLOR) |
| ``` |
|
|
| HDF5 layout per file: |
|
|
| ``` |
| attrs: robot_type, fps, task, episode_index, num_frames, |
| image_encoding="jpeg", image_shape=[224,224,3], |
| state_dim=54, action_dim=54, state_layout |
| /observations/images/head vlen uint8 (T,) # JPEG bytes per frame |
| /observations/images/right_wrist vlen uint8 (T,) |
| /observations/state float32 (T, 54) |
| /action float32 (T, 54) |
| /timestamp float32 (T,) |
| /frame_index int64 (T,) |
| ``` |
|
|
| ## Notes |
|
|
| - HDF5 images are re‑encoded to JPEG (quality 95) from the source AV1 video — visually |
| lossless but not bit‑identical to the LeRobot video frames. |
| - The two camera streams are packed into different numbers of video files in the LeRobot |
| format; frame↔episode alignment is handled by `meta/episodes/*.parquet`. |
|
|