仿真数据准备#

概述#

本仓库支持LeRobotDataset v2.1 格式 和 rlds格式

环境准备#

  1. 安装 Lerobot环境 本仓库依赖LeRobotDataset v2.1。 版本说明可以参考如下链接,并遵循官方安装方式即可:

https://github.com/huggingface/lerobot/commit/3354d919fc71130fe5b6b1d9997fdfc68fd6b42f

为了保持灵活性,我们并没有采用LeRobotDataset V3版本. 为了和本仓库对齐,对于数据部分,推荐使用特定的commit id使用。,通过lerobort 你可以任意组织自己的数据集

git clone https://github.com/huggingface/lerobot.git
cd lerobot
git checkout 55198de096f46a8e0447a8795129dd9ee84c088c
pip install -e .

开箱即用Libero数据案例#

只要是V2.1的lerobot均可以支持训练,以下给出开箱即用,在hugging face上已经有上传好的数据直接下载使用,请指定自己out对应的储存路径

python download_libero.py  --repo-id Aiming1998/libero_10_no_noops_lerobotv2.1 --out ./LIBERO_lerobot/libero_10_no_noops_lerobotv2.1
python download_libero.py  --repo-id Aiming1998/libero_spatial_no_noops_lerobotv2.1 --out ./LIBERO_lerobot/libero_spatial_no_noops_lerobotv2.1
python download_libero.py  --repo-id Aiming1998/libero_object_no_noops_lerobotv2.1 --out ./LIBERO_lerobot/libero_object_no_noops_lerobotv2.1
python download_libero.py  --repo-id Aiming1998/libero_goal_no_noops_lerobotv2.1 --out ./LIBERO_lerobot/libero_goal_no_noops_lerobotv2.1

Libero LeRobotDataset v2.1数据格式#

转换后的Libero数据集采用 LeRobotDataset v2.1 格式,存储在 HuggingFace Datasets 兼容的目录结构中:

<output_dir>/<repo_id>/
|-- data/
│   ├── chunk-000/
│   │   ├── episode_000000.parquet
│   │   └── ...
│-- videos/
│   ├── chunk-000/
│   │   |-- observation.images.image
|   |   |   |-- episode_000000.mp4
|   |   |   └── ...
|-- meta
|   |-- episodes.jsonl
|   |-- episodes_stats.jsonl
|   |-- info.json
|   `-- tasks.jsonl

parquet结构展示:

observation.state : fixed_size_list<element: float>[14]
action : fixed_size_list<element: float>[14]
observation.eepose : fixed_size_list<element: float>[14]
timestamp : float
frame_index : int64
episode_index : int64
index : int64
task_index : int64

tfrecords格式(仅提供libero样例)#

直接从以下地址下载即可适配rlds dataset

https://huggingface.co/datasets/openvla/modified_libero_rlds