Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,8 +1,107 @@
|
|
| 1 |
-
# convert_to_lerobot
|
| 2 |
-
This script generates a ready-to-use [LeRobot](https://github.com/huggingface/lerobot) dataset repository from RoboChallenge dataset.
|
| 3 |
|
| 4 |
-
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- Python 3.9+ with the following packages:
|
| 7 |
- `lerobot`
|
| 8 |
- `opencv-python`
|
|
@@ -14,7 +113,7 @@ pip install lerobot opencv-python numpy
|
|
| 14 |
export LEROBOT_HOME="/path/to/lerobot_home"
|
| 15 |
```
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
Run the converter from the repository root (or provide an absolute path):
|
| 20 |
|
|
@@ -25,6 +124,6 @@ python convert_to_lerobot.py \
|
|
| 25 |
--frame-interval 1
|
| 26 |
```
|
| 27 |
|
| 28 |
-
|
| 29 |
- Frames and metadata are saved to $LEROBOT_HOME/<repo-name>.
|
| 30 |
- At the end, the script calls dataset.consolidate(run_compute_stats=False). If you require aggregated statistics, run it with run_compute_stats=True or execute a separate stats job.
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
# RoboChallenge Dataset
|
| 3 |
|
| 4 |
+
## Dataset Structure
|
| 5 |
+
### Available Tasks
|
| 6 |
+
|
| 7 |
+
The dataset includes 30 diverse manipulation tasks (Table30):
|
| 8 |
+
|
| 9 |
+
- `arrange_flowers`
|
| 10 |
+
- `arrange_fruits_in_basket`
|
| 11 |
+
- `arrange_paper_cups`
|
| 12 |
+
- `clean_dining_table`
|
| 13 |
+
- `fold_dishcloth`
|
| 14 |
+
- `hang_toothbrush_cup`
|
| 15 |
+
- `make_vegetarian_sandwich`
|
| 16 |
+
- `move_objects_into_box`
|
| 17 |
+
- `open_the_drawer`
|
| 18 |
+
- `place_shoes_on_rack`
|
| 19 |
+
- `plug_in_network_cable`
|
| 20 |
+
- `pour_fries_into_plate`
|
| 21 |
+
- `press_three_buttons`
|
| 22 |
+
- `put_cup_on_coaster`
|
| 23 |
+
- `put_opener_in_drawer`
|
| 24 |
+
- `put_pen_into_pencil_case`
|
| 25 |
+
- `scan_QR_code`
|
| 26 |
+
- `search_green_boxes`
|
| 27 |
+
- `set_the_plates`
|
| 28 |
+
- `shred_scrap_paper`
|
| 29 |
+
- `sort_books`
|
| 30 |
+
- `sort_electronic_products`
|
| 31 |
+
- `stack_bowls`
|
| 32 |
+
- `stack_color_blocks`
|
| 33 |
+
- `stick_tape_to_box`
|
| 34 |
+
- `sweep_the_rubbish`
|
| 35 |
+
- `turn_on_faucet`
|
| 36 |
+
- `turn_on_light_switch`
|
| 37 |
+
- `water_potted_plant`
|
| 38 |
+
- `wipe_the_table`
|
| 39 |
+
|
| 40 |
+
### Hierarchy
|
| 41 |
+
The dataset is organized by tasks, with each task containing multiple demonstration episodes:
|
| 42 |
+
```
|
| 43 |
+
.
|
| 44 |
+
βββ <task_name>/ # e.g., arrange_flowers, fold_dishcloth
|
| 45 |
+
β βββ task_desc.json # Task description
|
| 46 |
+
β βββ meta/ # Task-level metadata
|
| 47 |
+
β β βββ task_info.json
|
| 48 |
+
β βββ data/ # Episode data
|
| 49 |
+
β βββ episode_000000/ # Individual episode
|
| 50 |
+
β β βββ meta/
|
| 51 |
+
β β β βββ episode_meta.json # Episode metadata
|
| 52 |
+
β β βββ states/
|
| 53 |
+
β β β βββ states.jsonl # Robot states
|
| 54 |
+
β β βββ videos/
|
| 55 |
+
β β βββ arm_realsense_rgb.mp4 # Arm-mounted camera
|
| 56 |
+
β β βββ global_realsense_rgb.mp4 # Global view camera
|
| 57 |
+
β β βββ right_realsense_rgb.mp4 # Right-side camera (BEV)
|
| 58 |
+
β βββ episode_000001/
|
| 59 |
+
β βββ ...
|
| 60 |
+
βββ convert_to_lerobot.py # Conversion script
|
| 61 |
+
βββ README.md
|
| 62 |
+
```
|
| 63 |
+
### JSON File Format
|
| 64 |
+
`task_info.json`
|
| 65 |
+
```json
|
| 66 |
+
{
|
| 67 |
+
"robot_id": "arx5_1", // Robot model identifier
|
| 68 |
+
"task_desc": {
|
| 69 |
+
"task_name": "arrange_flowers", // Task identifier
|
| 70 |
+
"prompt": "insert the three flowers on the table into the vase one by one",
|
| 71 |
+
"scoring": "...", // Scoring criteria
|
| 72 |
+
"task_tag": [ // Task characteristics
|
| 73 |
+
"repeated",
|
| 74 |
+
"single-arm",
|
| 75 |
+
"ARX5",
|
| 76 |
+
"precise3d"
|
| 77 |
+
]
|
| 78 |
+
},
|
| 79 |
+
"video_info": {
|
| 80 |
+
"fps": 30, // Video frame rate
|
| 81 |
+
"ext": "mp4", // Video format
|
| 82 |
+
"encoding": {
|
| 83 |
+
"vcodec": "libx264", // Video codec
|
| 84 |
+
"pix_fmt": "yuv420p" // Pixel format
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
```
|
| 89 |
+
`episode_meta.json`
|
| 90 |
+
```json
|
| 91 |
+
{
|
| 92 |
+
"episode_index": 0, // Episode number
|
| 93 |
+
"start_time": 1750405586.3430033, // Unix timestamp (start)
|
| 94 |
+
"end_time": 1750405642.5247612, // Unix timestamp (end)
|
| 95 |
+
"frames": 1672 // Total video frames
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
## Convert to Lerobot
|
| 101 |
+
While you can implement a custom Dataset class to read RoboChallenge data directly, **we strongly recommend converting to LeRobot format** to take advantage of [LeRobot](https://github.com/huggingface/lerobot)'s comprehensive data processing and loading utilities.
|
| 102 |
+
The `convert_to_lerobot.py` script we provided generates a ready-to-use [LeRobot](https://github.com/huggingface/lerobot) dataset repository from RoboChallenge dataset.
|
| 103 |
+
|
| 104 |
+
### Prerequisites
|
| 105 |
- Python 3.9+ with the following packages:
|
| 106 |
- `lerobot`
|
| 107 |
- `opencv-python`
|
|
|
|
| 113 |
export LEROBOT_HOME="/path/to/lerobot_home"
|
| 114 |
```
|
| 115 |
|
| 116 |
+
### Usage
|
| 117 |
|
| 118 |
Run the converter from the repository root (or provide an absolute path):
|
| 119 |
|
|
|
|
| 124 |
--frame-interval 1
|
| 125 |
```
|
| 126 |
|
| 127 |
+
### Output
|
| 128 |
- Frames and metadata are saved to $LEROBOT_HOME/<repo-name>.
|
| 129 |
- At the end, the script calls dataset.consolidate(run_compute_stats=False). If you require aggregated statistics, run it with run_compute_stats=True or execute a separate stats job.
|