Document dataset layout
Browse files
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: RealDatasets
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# RealDatasets
|
| 6 |
+
|
| 7 |
+
This repository contains the original robot demonstrations and three converted
|
| 8 |
+
LeRobot v3 datasets.
|
| 9 |
+
|
| 10 |
+
## Layout
|
| 11 |
+
|
| 12 |
+
```text
|
| 13 |
+
raw/
|
| 14 |
+
├── 抓娃娃/
|
| 15 |
+
├── 对折毛巾/
|
| 16 |
+
└── 放置绳子/
|
| 17 |
+
|
| 18 |
+
lerobot/
|
| 19 |
+
├── pack_sloth/
|
| 20 |
+
├── fold_cloth/
|
| 21 |
+
└── insert_rope/
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
Each `lerobot/<task>/` directory is an independent LeRobot v3 dataset root.
|
| 25 |
+
Because the datasets are stored below repository subdirectories, download the
|
| 26 |
+
selected subdirectory and pass its local path as `root`.
|
| 27 |
+
|
| 28 |
+
```python
|
| 29 |
+
from pathlib import Path
|
| 30 |
+
|
| 31 |
+
from huggingface_hub import snapshot_download
|
| 32 |
+
from lerobot.datasets import LeRobotDataset
|
| 33 |
+
|
| 34 |
+
repo_root = Path(
|
| 35 |
+
snapshot_download(
|
| 36 |
+
repo_id="Zili2002/RealDatasets",
|
| 37 |
+
repo_type="dataset",
|
| 38 |
+
allow_patterns=["lerobot/pack_sloth/**"],
|
| 39 |
+
)
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
+
dataset = LeRobotDataset(
|
| 43 |
+
repo_id="Zili2002/RealDatasets",
|
| 44 |
+
root=repo_root / "lerobot" / "pack_sloth",
|
| 45 |
+
video_backend="pyav",
|
| 46 |
+
)
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## Converted data
|
| 50 |
+
|
| 51 |
+
- Nominal timeline: 30 Hz
|
| 52 |
+
- Video resolution: 848x480
|
| 53 |
+
- `camera_2`: `observation.images.wrist`
|
| 54 |
+
- `camera_4`: `observation.images.front`
|
| 55 |
+
- Original 1920x1080 frames are center-cropped to 1908x1080 and resized
|
| 56 |
+
without changing the aspect ratio.
|
| 57 |
+
|
| 58 |
+
The source recordings contain timing gaps. Converted datasets preserve every
|
| 59 |
+
recorded image and expand each episode onto a strict 30 Hz timeline:
|
| 60 |
+
|
| 61 |
+
- real source frame: original image and `*_valid=true`
|
| 62 |
+
- missing slot: black image and `*_valid=false`
|
| 63 |
+
- missing slot state/action: NaN with their validity masks set to false
|
| 64 |
+
- `source.frame_index=-1` identifies an inserted slot
|
| 65 |
+
|
| 66 |
+
Consumers must filter invalid state/action rows before normalization, model
|
| 67 |
+
input, and loss computation. Multiplying NaN values by a zero mask is not
|
| 68 |
+
sufficient.
|
| 69 |
+
|
| 70 |
+
Each converted dataset also contains:
|
| 71 |
+
|
| 72 |
+
```text
|
| 73 |
+
raw_video/record_NNN/
|
| 74 |
+
├── camera_2_*.mp4
|
| 75 |
+
├── camera_4_*.mp4
|
| 76 |
+
├── frame_timestamps.json
|
| 77 |
+
└── timeline_30hz.json
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
`timeline_30hz.json` records the source-to-target frame mapping and the complete
|
| 81 |
+
image-validity mask. LeRobot normalization statistics are computed from valid
|
| 82 |
+
source rows only.
|
| 83 |
+
|
| 84 |
+
## Features
|
| 85 |
+
|
| 86 |
+
- `observation.images.wrist`: video `[480, 848, 3]`
|
| 87 |
+
- `observation.images.front`: video `[480, 848, 3]`
|
| 88 |
+
- `observation.state`: float32 `[8]`
|
| 89 |
+
- `action`: float32 `[7]`
|
| 90 |
+
- `source.timestamp`: nominal 30 Hz Unix timestamp
|
| 91 |
+
- `source.timestamp_relative`: nominal 30 Hz episode-relative timestamp
|
| 92 |
+
- `source.original_timestamp`: real source timestamp, NaN for inserted rows
|
| 93 |
+
- `source.original_timestamp_relative`: real relative timestamp, NaN for inserted rows
|
| 94 |
+
- `source.frame_index`: source frame index, `-1` for inserted rows
|
| 95 |
+
- `observation.images.wrist_valid`
|
| 96 |
+
- `observation.images.front_valid`
|
| 97 |
+
- `observation.state_valid`
|
| 98 |
+
- `action_valid`
|