e9b0a9af040029e6cf5807d3a68d33dd91b5ba43ca6e8f91f85cd9a740f883a9
Browse files- Annotation_with_action_lerobotv21/README.md +346 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-000.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-001.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-002.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-003.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-004.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-005.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-006.tar +3 -0
- Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-007.tar +3 -0
Annotation_with_action_lerobotv21/README.md
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RoboInter-Data: LeRobot v2.1 Format (Actions + Annotations + Videos)
|
| 2 |
+
|
| 3 |
+
The primary data format of [RoboInter-Data](https://huggingface.co/datasets/InternRobotics/RoboInter-Data). Contains robot **actions**, camera **observations**, and rich **intermediate representation annotations** in [LeRobot v2.1](https://github.com/huggingface/lerobot) format (parquet + MP4 videos), ready for policy training. Especially, we calculate the delta EEF (gripper) action of Droid (instead of the joint velocity or the origin cartesian action of the base).
|
| 4 |
+
|
| 5 |
+
| Sub-dataset | Source | Robot | Episodes | Frames | Tasks | Image Size | Raw Image Size |
|
| 6 |
+
|-------------|--------|-------|----------|--------|-------|------------|-------|
|
| 7 |
+
| `lerobot_droid_anno` | [DROID](https://droid-dataset.github.io/) | Franka + Robotiq | 152,986 | 46,259,014 | 43,026 | 320 x 180 | 640 x 360 |
|
| 8 |
+
| `lerobot_rh20t_anno` | [RH20T](https://rh20t.github.io/) | Multiple | 82,894 | 40,755,632 | 146 | 320 x 180 | 640 x 360 |
|
| 9 |
+
|
| 10 |
+
Both datasets share `fps=10`, `chunks_size=1000`, and the same annotation schema.
|
| 11 |
+
|
| 12 |
+
## Directory Layout
|
| 13 |
+
|
| 14 |
+
```
|
| 15 |
+
lerobot_droid_anno/ (or lerobot_rh20t_anno/)
|
| 16 |
+
├── meta/
|
| 17 |
+
│ ├── info.json # Dataset metadata (fps, features, shapes, etc.)
|
| 18 |
+
│ ├── episodes.jsonl # Per-episode info (one JSON per line)
|
| 19 |
+
│ ├── episodes_stats.jsonl # Per-episode statistics
|
| 20 |
+
│ └── tasks.jsonl # Task/instruction mapping
|
| 21 |
+
├── data/
|
| 22 |
+
│ └── chunk-{NNN}/ # Parquet data chunks (1,000 episodes per chunk)
|
| 23 |
+
│ ├── episode_000000.parquet
|
| 24 |
+
│ ├── episode_000001.parquet
|
| 25 |
+
│ └── ...
|
| 26 |
+
└── videos/
|
| 27 |
+
└── chunk-{NNN}/
|
| 28 |
+
├── observation.images.primary/
|
| 29 |
+
│ └── episode_{NNNNNN}.mp4
|
| 30 |
+
└── observation.images.wrist/
|
| 31 |
+
└── episode_{NNNNNN}.mp4
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## Data Fields
|
| 37 |
+
|
| 38 |
+
### Core Fields (Shared by DROID & RH20T)
|
| 39 |
+
|
| 40 |
+
| Field | Shape | Type | Description |
|
| 41 |
+
|-------|-------|------|-------------|
|
| 42 |
+
| `action` | (7,) | float64 | Delta EEF action: [delta_x, delta_y, delta_z, delta_rx, delta_ry, delta_rz, gripper_command] |
|
| 43 |
+
| `state` | (7,) | float64 | EEF state: [x, y, z, rx, ry, rz, gripper_state] |
|
| 44 |
+
| `observation.images.primary` | (180, 320, 3) | video (H.264) | Primary camera RGB video |
|
| 45 |
+
| `observation.images.wrist` | (180, 320, 3) | video (H.264) | Wrist camera RGB video |
|
| 46 |
+
|
| 47 |
+
### Metadata Fields (Shared)
|
| 48 |
+
|
| 49 |
+
| Field | Type | Description |
|
| 50 |
+
|-------|------|-------------|
|
| 51 |
+
| `episode_name` | string | Episode unique identifier, e.g. `"3072_exterior_image_1_left"` |
|
| 52 |
+
| `camera_view` | string | Camera perspective, e.g. `"exterior_image_1_left"` |
|
| 53 |
+
| `task` | string | Task language description (via `task_index` -> `tasks.jsonl`) |
|
| 54 |
+
| `episode_index` | int64 | Episode index in dataset |
|
| 55 |
+
| `frame_index` | int64 | Frame index within episode |
|
| 56 |
+
| `timestamp` | float32 | Timestamp in seconds (`frame_index / fps`) |
|
| 57 |
+
| `index` | int64 | Global frame index across all episodes |
|
| 58 |
+
| `task_index` | int64 | Index into `tasks.jsonl` |
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
### Other Information Fields — DROID Only
|
| 63 |
+
|
| 64 |
+
`lerobot_droid_anno` contains the following additional fields from the original DROID dataset:
|
| 65 |
+
|
| 66 |
+
| Field | Shape | Type | Description |
|
| 67 |
+
|-------|-------|------|-------------|
|
| 68 |
+
| `other_information.language_instruction_2` | (1,) | string | Alternative language instruction (source 2) |
|
| 69 |
+
| `other_information.language_instruction_3` | (1,) | string | Alternative language instruction (source 3) |
|
| 70 |
+
| `other_information.action_delta_tcp_pose` | (7,) | float64 | Delta TCP pose action: [dx, dy, dz, drx, dry, drz, gripper] |
|
| 71 |
+
| `other_information.action_delta_wrist_pose` | (7,) | float64 | Delta wrist pose action: [dx, dy, dz, drx, dry, drz, gripper] |
|
| 72 |
+
| `other_information.action_tcp_pose` | (7,) | float64 | Absolute TCP pose: [x, y, z, rx, ry, rz, gripper] |
|
| 73 |
+
| `other_information.action_wrist_pose` | (7,) | float64 | Absolute wrist pose: [x, y, z, rx, ry, rz, gripper] |
|
| 74 |
+
| `other_information.action_gripper_velocity` | (1,) | float64 | Gripper velocity |
|
| 75 |
+
| `other_information.action_joint_position` | (7,) | float64 | Joint position action: [j1..j7] |
|
| 76 |
+
| `other_information.action_joint_velocity` | (7,) | float64 | Joint velocity action: [j1..j7] |
|
| 77 |
+
| `other_information.action_cartesian_velocity` | (6,) | float64 | Cartesian velocity: [vx, vy, vz, wx, wy, wz] |
|
| 78 |
+
| `other_information.observation_joint_position` | (7,) | float64 | Observed joint positions: [j1..j7] |
|
| 79 |
+
| `other_information.observation_gripper_position` | (1,) | float64 | Observed gripper position |
|
| 80 |
+
| `other_information.observation_gripper_open_state` | (1,) | float64 | Gripper open state |
|
| 81 |
+
| `other_information.observation_gripper_pose6d` | (6,) | float64 | Gripper 6D pose: [x, y, z, rx, ry, rz] |
|
| 82 |
+
| `other_information.observation_tcp_pose6d` | (6,) | float64 | TCP 6D pose: [x, y, z, rx, ry, rz] |
|
| 83 |
+
| `other_information.is_first` | (1,) | bool | First frame flag |
|
| 84 |
+
| `other_information.is_last` | (1,) | bool | Last frame flag |
|
| 85 |
+
| `other_information.is_terminal` | (1,) | bool | Terminal state flag |
|
| 86 |
+
|
| 87 |
+
### Other Information Fields — RH20T Only
|
| 88 |
+
|
| 89 |
+
`lerobot_rh20t_anno` contains the following additional fields from the original RH20T dataset:
|
| 90 |
+
|
| 91 |
+
| Field | Shape | Type | Description |
|
| 92 |
+
|-------|-------|------|-------------|
|
| 93 |
+
| `other_information.action_delta_tcp_pose` | (7,) | float64 | Delta TCP pose action: [dx, dy, dz, drx, dry, drz, gripper] |
|
| 94 |
+
| `other_information.action_tcp_pose` | (7,) | float64 | Absolute TCP pose: [x, y, z, rx, ry, rz, gripper] |
|
| 95 |
+
| `other_information.gripper_command` | (1,) | float64 | Gripper command |
|
| 96 |
+
| `other_information.observation_joint_position` | (14,) | float64 | Observed joint positions: [j1..j14] |
|
| 97 |
+
| `other_information.observation_gripper_open_state` | (1,) | float64 | Gripper open state |
|
| 98 |
+
| `other_information.observation_gripper_pose6d` | (6,) | float64 | Gripper 6D pose: [x, y, z, rx, ry, rz] |
|
| 99 |
+
| `other_information.tcp_camera` | (7,) | float64 | TCP in camera frame: [x, y, z, qx, qy, qz, qw] |
|
| 100 |
+
| `other_information.tcp_base` | (7,) | float64 | TCP in base frame: [x, y, z, qx, qy, qz, qw] |
|
| 101 |
+
| `other_information.gripper` | (1,) | string | Gripper metadata (JSON) |
|
| 102 |
+
| `other_information.is_first` | (1,) | bool | First frame flag |
|
| 103 |
+
| `other_information.is_last` | (1,) | bool | Last frame flag |
|
| 104 |
+
| `other_information.is_terminal` | (1,) | bool | Terminal state flag |
|
| 105 |
+
|
| 106 |
+
> **Key difference:** DROID has 7-DoF joint positions and richer action representations (wrist pose, joint/cartesian velocities). RH20T has 14-DoF joint positions, TCP transforms in camera/base frames, and gripper metadata JSON.
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
### Annotation Fields (Shared by DROID & RH20T)
|
| 111 |
+
|
| 112 |
+
All annotation fields are prefixed with `annotation.` and stored as JSON strings. Empty string `""` means no annotation is available for that frame.
|
| 113 |
+
|
| 114 |
+
| Field | Format | Description |
|
| 115 |
+
|-------|--------|-------------|
|
| 116 |
+
| `annotation.time_clip` | `[[start, end], ...]` | Subtask temporal segments (frame ranges) |
|
| 117 |
+
| `annotation.instruction_add` | string | Structured task language instruction |
|
| 118 |
+
| `annotation.substask` | string | Current subtask description |
|
| 119 |
+
| `annotation.primitive_skill` | string | Primitive skill label (pick, place, push, twist, etc.) |
|
| 120 |
+
| `annotation.segmentation` | string | Segmentation reference (path) |
|
| 121 |
+
| `annotation.object_box` | `[[x1, y1], [x2, y2]]` | Manipulated object bounding box |
|
| 122 |
+
| `annotation.placement_proposal` | `[[x1, y1], [x2, y2]]` | Target placement bounding box |
|
| 123 |
+
| `annotation.trace` | `[[x, y], ...]` | Future 10-frame gripper trajectory waypoints |
|
| 124 |
+
| `annotation.gripper_box` | `[[x1, y1], [x2, y2]]` | Gripper bounding box |
|
| 125 |
+
| `annotation.contact_frame` | int / -1 | Frame index when gripper contacts object (-1 = past contact) |
|
| 126 |
+
| `annotation.state_affordance` | `[x, y, z, rx, ry, rz]` | 6D EEF state at contact frame |
|
| 127 |
+
| `annotation.affordance_box` | `[[x1, y1], [x2, y2]]` | Gripper bounding box at contact frame |
|
| 128 |
+
| `annotation.contact_points` | `[x, y]` | Contact point in pixel coordinates |
|
| 129 |
+
| `annotation.origin_shape` | `[h, w]` | Original image resolution for coordinate reference |
|
| 130 |
+
|
| 131 |
+
#### Bounding Box Format
|
| 132 |
+
|
| 133 |
+
All bounding boxes use pixel coordinates with origin at top-left:
|
| 134 |
+
```json
|
| 135 |
+
[[x1, y1], [x2, y2]] // [top-left, bottom-right]
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
#### Trace Format
|
| 139 |
+
|
| 140 |
+
10 future waypoints for gripper trajectory prediction:
|
| 141 |
+
```json
|
| 142 |
+
[[110, 66], [112, 68], [115, 70], [118, 72], [120, 75], [122, 78], [125, 80], [128, 82], [130, 85], [132, 88]]
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
---
|
| 146 |
+
|
| 147 |
+
### Q_Annotation Fields (Quality Indicators, Shared)
|
| 148 |
+
|
| 149 |
+
Each annotation has a corresponding quality indicator prefixed with `Q_annotation.`:
|
| 150 |
+
|
| 151 |
+
| Field | Values | Description |
|
| 152 |
+
|-------|--------|-------------|
|
| 153 |
+
| `Q_annotation.instruction_add` | `"Primary"` / `"Secondary"` / `""` | Instruction quality |
|
| 154 |
+
| `Q_annotation.substask` | `"Primary"` / `"Secondary"` / `""` | Subtask quality |
|
| 155 |
+
| `Q_annotation.primitive_skill` | `"Primary"` / `"Secondary"` / `""` | Primitive skill quality |
|
| 156 |
+
| `Q_annotation.segmentation` | `"Primary"` / `"Secondary"` / `""` | Segmentation quality |
|
| 157 |
+
| `Q_annotation.object_box` | `"Primary"` / `"Secondary"` / `""` | Object box quality |
|
| 158 |
+
| `Q_annotation.placement_proposal` | `"Primary"` / `"Secondary"` / `""` | Placement proposal quality |
|
| 159 |
+
| `Q_annotation.trace` | `"Primary"` / `"Secondary"` / `""` | Trace quality |
|
| 160 |
+
| `Q_annotation.gripper_box` | `"Primary"` / `"Secondary"` / `""` | Gripper box quality |
|
| 161 |
+
| `Q_annotation.contact_frame` | `"Primary"` / `"Secondary"` / `""` | Contact frame quality |
|
| 162 |
+
| `Q_annotation.state_affordance` | `"Primary"` / `"Secondary"` / `""` | State affordance quality |
|
| 163 |
+
| `Q_annotation.affordance_box` | `"Primary"` / `"Secondary"` / `""` | Affordance box quality |
|
| 164 |
+
| `Q_annotation.contact_points` | `"Primary"` / `"Secondary"` / `""` | Contact points quality |
|
| 165 |
+
|
| 166 |
+
- **Primary**: High-confidence annotation
|
| 167 |
+
- **Secondary**: Acceptable quality, may have minor errors
|
| 168 |
+
- **""** (empty): No annotation available
|
| 169 |
+
|
| 170 |
+
---
|
| 171 |
+
|
| 172 |
+
## Quick Start
|
| 173 |
+
|
| 174 |
+
The dataloader code is at [RoboInterData/lerobot_dataloader](https://github.com/InternRobotics/RoboInter/tree/main/RoboInterData/lerobot_dataloader).
|
| 175 |
+
|
| 176 |
+
### Installation
|
| 177 |
+
|
| 178 |
+
```bash
|
| 179 |
+
pip install numpy torch pyarrow av opencv-python
|
| 180 |
+
```
|
| 181 |
+
|
| 182 |
+
### Basic Usage
|
| 183 |
+
|
| 184 |
+
```python
|
| 185 |
+
from lerobot_dataloader import create_dataloader
|
| 186 |
+
|
| 187 |
+
dataloader = create_dataloader(
|
| 188 |
+
"path/to/lerobot_droid_anno",
|
| 189 |
+
batch_size=32,
|
| 190 |
+
action_horizon=16,
|
| 191 |
+
)
|
| 192 |
+
|
| 193 |
+
for batch in dataloader:
|
| 194 |
+
images = batch["observation.images.primary"] # (B, H, W, 3)
|
| 195 |
+
actions = batch["action"] # (B, 16, 7)
|
| 196 |
+
trace = batch["annotation.trace"] # Parsed JSON lists
|
| 197 |
+
skill = batch["annotation.primitive_skill"] # List of strings
|
| 198 |
+
break
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
### Multiple Datasets (DROID + RH20T)
|
| 202 |
+
|
| 203 |
+
```python
|
| 204 |
+
dataloader = create_dataloader(
|
| 205 |
+
[
|
| 206 |
+
"path/to/lerobot_droid_anno",
|
| 207 |
+
"path/to/lerobot_rh20t_anno",
|
| 208 |
+
],
|
| 209 |
+
batch_size=32,
|
| 210 |
+
action_horizon=16,
|
| 211 |
+
)
|
| 212 |
+
|
| 213 |
+
for batch in dataloader:
|
| 214 |
+
print(batch["dataset_name"]) # Source dataset identifier
|
| 215 |
+
break
|
| 216 |
+
```
|
| 217 |
+
|
| 218 |
+
### Data Filtering
|
| 219 |
+
|
| 220 |
+
#### Frame Range Filtering
|
| 221 |
+
|
| 222 |
+
Remove idle frames at episode start/end using `range_nop.json`:
|
| 223 |
+
|
| 224 |
+
```python
|
| 225 |
+
dataloader = create_dataloader(
|
| 226 |
+
"path/to/lerobot_droid_anno",
|
| 227 |
+
range_nop_path="path/to/range_nop.json",
|
| 228 |
+
)
|
| 229 |
+
```
|
| 230 |
+
|
| 231 |
+
Format of `range_nop.json`:
|
| 232 |
+
```json
|
| 233 |
+
{
|
| 234 |
+
"3072_exterior_image_1_left": [12, 217, 206]
|
| 235 |
+
}
|
| 236 |
+
```
|
| 237 |
+
`[start_frame, end_frame, valid_length]` — frames outside this range are idle/stationary.
|
| 238 |
+
|
| 239 |
+
#### Q_Annotation Filtering
|
| 240 |
+
|
| 241 |
+
Select episodes by annotation quality:
|
| 242 |
+
|
| 243 |
+
```python
|
| 244 |
+
from lerobot_dataloader import create_dataloader, QAnnotationFilter
|
| 245 |
+
|
| 246 |
+
# Only Primary quality
|
| 247 |
+
dataloader = create_dataloader(
|
| 248 |
+
"path/to/lerobot_droid_anno",
|
| 249 |
+
q_filters=[
|
| 250 |
+
QAnnotationFilter("Q_annotation.instruction_add", ["Primary"]),
|
| 251 |
+
QAnnotationFilter("Q_annotation.gripper_box", ["Primary"]),
|
| 252 |
+
]
|
| 253 |
+
)
|
| 254 |
+
|
| 255 |
+
# Any non-empty annotation
|
| 256 |
+
dataloader = create_dataloader(
|
| 257 |
+
"path/to/lerobot_droid_anno",
|
| 258 |
+
q_filters=[
|
| 259 |
+
QAnnotationFilter("Q_annotation.trace", ["not_empty"])
|
| 260 |
+
]
|
| 261 |
+
)
|
| 262 |
+
```
|
| 263 |
+
|
| 264 |
+
#### Combined Filtering
|
| 265 |
+
|
| 266 |
+
```python
|
| 267 |
+
from lerobot_dataloader import FilterConfig, QAnnotationFilter
|
| 268 |
+
|
| 269 |
+
config = FilterConfig(
|
| 270 |
+
range_nop_path="path/to/range_nop.json",
|
| 271 |
+
q_filters=[
|
| 272 |
+
QAnnotationFilter("Q_annotation.trace", ["Primary", "Secondary"]),
|
| 273 |
+
],
|
| 274 |
+
q_filter_mode="all", # "all" = AND, "any" = OR
|
| 275 |
+
)
|
| 276 |
+
|
| 277 |
+
dataloader = create_dataloader("path/to/lerobot_droid_anno", filter_config=config)
|
| 278 |
+
```
|
| 279 |
+
|
| 280 |
+
### Transforms
|
| 281 |
+
|
| 282 |
+
```python
|
| 283 |
+
from lerobot_dataloader import Compose, Normalize, ResizeImages, ToTensorImages, LeRobotDataset
|
| 284 |
+
from lerobot_dataloader.transforms import compute_stats
|
| 285 |
+
|
| 286 |
+
# Compute normalization stats
|
| 287 |
+
dataset = LeRobotDataset("path/to/lerobot_droid_anno", load_videos=False)
|
| 288 |
+
stats = compute_stats(dataset)
|
| 289 |
+
|
| 290 |
+
# Create transform pipeline
|
| 291 |
+
transform = Compose([
|
| 292 |
+
ResizeImages(height=224, width=224),
|
| 293 |
+
ToTensorImages(), # (H,W,C) uint8 -> (C,H,W) float32
|
| 294 |
+
Normalize(stats),
|
| 295 |
+
])
|
| 296 |
+
|
| 297 |
+
dataloader = create_dataloader("path/to/lerobot_droid_anno", transform=transform)
|
| 298 |
+
```
|
| 299 |
+
|
| 300 |
+
### Direct Dataset Access
|
| 301 |
+
|
| 302 |
+
```python
|
| 303 |
+
from lerobot_dataloader import LeRobotDataset
|
| 304 |
+
from lerobot_dataloader.transforms import ParseAnnotations
|
| 305 |
+
|
| 306 |
+
dataset = LeRobotDataset(
|
| 307 |
+
"path/to/lerobot_droid_anno",
|
| 308 |
+
transform=ParseAnnotations(),
|
| 309 |
+
)
|
| 310 |
+
|
| 311 |
+
print(f"Total frames: {len(dataset)}")
|
| 312 |
+
print(f"Total episodes: {dataset.num_episodes}")
|
| 313 |
+
print(f"FPS: {dataset.fps}")
|
| 314 |
+
|
| 315 |
+
sample = dataset[0]
|
| 316 |
+
print(f"Action: {sample['action']}")
|
| 317 |
+
print(f"Object box: {sample['annotation.object_box']}")
|
| 318 |
+
print(f"Skill: {sample['annotation.primitive_skill']}")
|
| 319 |
+
```
|
| 320 |
+
|
| 321 |
+
---
|
| 322 |
+
|
| 323 |
+
## Format Conversion
|
| 324 |
+
|
| 325 |
+
The LeRobot v2.1 format was converted from original data + LMDB annotations using:
|
| 326 |
+
|
| 327 |
+
- **DROID**: [convert_droid_to_lerobot_anno_fast.py](https://github.com/InternRobotics/RoboInter/blob/main/RoboInterData/convert_to_lerobot/convert_droid_to_lerobot_anno_fast.py)
|
| 328 |
+
- **RH20T**: [convert_rh20t_to_lerobot_anno_fast.py](https://github.com/InternRobotics/RoboInter/blob/main/RoboInterData/convert_to_lerobot/convert_rh20t_to_lerobot_anno_fast.py)
|
| 329 |
+
|
| 330 |
+
---
|
| 331 |
+
|
| 332 |
+
## Related Resources
|
| 333 |
+
|
| 334 |
+
| Resource | Link |
|
| 335 |
+
|----------|------|
|
| 336 |
+
| RoboInter-Data (parent dataset) | [HuggingFace](https://huggingface.co/datasets/InternRobotics/RoboInter-Data) |
|
| 337 |
+
| RoboInter Project | [GitHub](https://github.com/InternRobotics/RoboInter) |
|
| 338 |
+
| DataLoader Code | [lerobot_dataloader](https://github.com/InternRobotics/RoboInter/tree/main/RoboInterData/lerobot_dataloader) |
|
| 339 |
+
| Conversion Scripts | [convert_to_lerobot](https://github.com/InternRobotics/RoboInter/tree/main/RoboInterData/convert_to_lerobot) |
|
| 340 |
+
| Demo Visualizer | [RoboInterData-Demo](https://github.com/InternRobotics/RoboInter/tree/main/RoboInterData-Demo) |
|
| 341 |
+
| DROID Dataset | [droid-dataset.github.io](https://droid-dataset.github.io/) |
|
| 342 |
+
| RH20T Dataset | [rh20t.github.io](https://rh20t.github.io/) |
|
| 343 |
+
|
| 344 |
+
## License
|
| 345 |
+
|
| 346 |
+
Please refer to the original dataset licenses for [RoboInter](https://github.com/InternRobotics/RoboInter), [DROID](https://droid-dataset.github.io/), and [RH20T](https://rh20t.github.io/).
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-000.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:927fd735d9b98ab289a609119a9f4d54af8aabf5d92d00851ac9c459370e9fe0
|
| 3 |
+
size 240680960
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-001.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b00271f26eebd2a5e91e115aca46f1aa0737aed92290e5f600ce6da8131c70ee
|
| 3 |
+
size 250644480
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-002.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:10e257f4d12ce32cf4d156142a852889024ac7c05cf364456e984167dd64e9d3
|
| 3 |
+
size 247480320
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-003.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eec111636f3e554699e76a104e5dab1eecfe0f8201ef63ff16cda31b8ee161fc
|
| 3 |
+
size 236144640
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-004.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0411f5c3ee6d1dea4a035d64ef89499f312d63cd6b43aef78a6ee5490ea9913
|
| 3 |
+
size 257699840
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-005.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed4e1c3b6c5e7bd53e6f7f5ea8ad1d0578892aba08bfa1a6f98a04ca6808feb6
|
| 3 |
+
size 254156800
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-006.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4a957dc441e4c1bcc61727e1f8f5a9fa059707e0c6348718921cd35e45d58ff
|
| 3 |
+
size 253409280
|
Annotation_with_action_lerobotv21/lerobot_droid_anno/data/chunk-007.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:993fecfa3031abceebd3a2b8592b242b516bf4b89c61f0a46cf0348a00b1e057
|
| 3 |
+
size 250470400
|