|
|
|
|
|
|
|
|
This guide covers the dataset tools utilities available in LeRobot for modifying and editing existing datasets.
|
|
|
|
|
|
|
|
|
|
|
|
LeRobot provides several utilities for manipulating datasets:
|
|
|
|
|
|
1. **Delete Episodes** - Remove specific episodes from a dataset
|
|
|
2. **Split Dataset** - Divide a dataset into multiple smaller datasets
|
|
|
3. **Merge Datasets** - Combine multiple datasets into one. The datasets must have identical features, and episodes are concatenated in the order specified in `repo_ids`
|
|
|
4. **Add Features** - Add new features to a dataset
|
|
|
5. **Remove Features** - Remove features from a dataset
|
|
|
|
|
|
The core implementation is in `lerobot.datasets.dataset_tools`.
|
|
|
An example script detailing how to use the tools API is available in `examples/dataset/use_dataset_tools.py`.
|
|
|
|
|
|
|
|
|
|
|
|
`lerobot-edit-dataset` is a command-line script for editing datasets. It can be used to delete episodes, split datasets, merge datasets, add features, and remove features.
|
|
|
|
|
|
Run `lerobot-edit-dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove specific episodes from a dataset. This is useful for filtering out undesired data.
|
|
|
|
|
|
```bash
|
|
|
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Divide a dataset into multiple subsets.
|
|
|
|
|
|
```bash
|
|
|
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
There are no constraints on the split names, they can be determined by the user. Resulting datasets are saved under the repo id with the split name appended, e.g. `lerobot/pusht_train`, `lerobot/pusht_task1`, `lerobot/pusht_task2`.
|
|
|
|
|
|
|
|
|
|
|
|
Combine multiple datasets into a single dataset.
|
|
|
|
|
|
```bash
|
|
|
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Remove features from a dataset.
|
|
|
|
|
|
```bash
|
|
|
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Add the `
|
|
|
|
|
|
```bash
|
|
|
lerobot-edit-dataset \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
There is also a tool for adding features to a dataset that is not yet covered in `lerobot-edit-dataset`.
|
|
|
|