VLABench

VLABench 是一个用于带长时域 inference 的语言条件化机器人操作的大规模 benchmark。上游套件涵盖 2,000+ 个物体上的 100 个任务类别,并评估机器人智能的六个维度:网格与纹理理解、空间 inference、世界知识迁移、语义指令理解、物理定律理解和长时域规划。基于 MuJoCo / dm_control 构建,配备 Franka Panda 7 自由度手臂。LeRobot 通过 --env.task 公开了其中 43 个任务(21 个基础任务 + 22 个组合任务,参见下文可用任务)。

VLABench benchmark overview

可用任务

VLABench 提供两个任务套件,在 LeRobot 的 --env.task 接口中涵盖 43 个任务类别

套件CLI 名称任务数描述
基础任务primitive21单一/少量技能的组合(选择、插入、物理问答)
组合任务composite22多步 inference 和长时域规划(烹饪、重排)

基础任务: select_fruitselect_toyselect_chemistry_tubeadd_condimentselect_bookselect_paintingselect_drinkinsert_flowerselect_billiardsselect_ingredientselect_mahjongselect_poker,以及物理 inference 任务(density_qafriction_qamagnetism_qareflection_qasimple_cuestick_usagesimple_seesaw_usagesound_speed_qathermal_expansion_qaweight_qa)。

组合任务: cluster_billiardscluster_bookcluster_drinkcluster_toycook_dishescool_drinkfind_unseen_objectget_coffeehammer_nailheat_foodmake_juiceplay_mahjongplay_math_gameplay_pokerplay_snookerrearrange_bookrearrange_chemistry_tubeset_dining_tableset_study_tablestore_foodtake_chemistry_experimentuse_seesaw_complex

--env.task 接受三种形式:

  • 单个任务名称(select_fruit
  • 逗号分隔的任务列表(select_fruit,heat_food
  • 套件快捷方式(primitivecompositeprimitive,composite

安装

VLABench 不在 PyPI 上——它唯一的发行渠道是 OpenMOSS/VLABench GitHub 仓库——因此 LeRobot 不提供 vlabench 额外扩展。你需要以可编辑克隆的方式手动安装它,同时安装 VLABench 所需的 MuJoCo / dm_control 固定版本,然后获取网格资源:

# After following the standard LeRobot installation instructions.

git clone https://github.com/OpenMOSS/VLABench.git ~/VLABench
git clone https://github.com/motion-planning/rrt-algorithms.git ~/rrt-algorithms
pip install -e ~/VLABench -e ~/rrt-algorithms
pip install "mujoco==3.2.2" "dm-control==1.0.22" \
            open3d colorlog scikit-learn openai gdown

python ~/VLABench/scripts/download_assets.py
VLABench 需要 Linux(`sys_platform == 'linux'`)和 Python 3.10+。运行前请设置 MuJoCo 渲染后端:
export MUJOCO_GL=egl  # for headless servers (HPC, cloud)

评估

下面所有的评估代码片段都镜像了 CI 运行的命令(参见 .github/workflows/benchmark_tests.yml)。--rename_map 参数将 VLABench 的 image / second_image / wrist_image 相机键映射到发布的 smolvla_vlabench policy 训练所用的三相机(camera1 / camera2 / camera3)输入布局。

单任务评估(推荐用于快速迭代)

lerobot-eval \
  --policy.path=lerobot/smolvla_vlabench \
  --env.type=vlabench \
  --env.task=select_fruit \
  --eval.batch_size=1 \
  --eval.n_episodes=10 \
  --eval.use_async_envs=false \
  --policy.device=cuda \
  '--rename_map={"observation.images.image": "observation.images.camera1", "observation.images.second_image": "observation.images.camera2", "observation.images.wrist_image": "observation.images.camera3"}'

多任务评估

传递一个逗号分隔的任务列表:

lerobot-eval \
  --policy.path=lerobot/smolvla_vlabench \
  --env.type=vlabench \
  --env.task=select_fruit,select_toy,add_condiment,heat_food \
  --eval.batch_size=1 \
  --eval.n_episodes=10 \
  --eval.use_async_envs=false \
  --policy.device=cuda \
  '--rename_map={"observation.images.image": "observation.images.camera1", "observation.images.second_image": "observation.images.camera2", "observation.images.wrist_image": "observation.images.camera3"}'

全套件评估

运行整个套件(全部 21 个基础任务或全部 22 个组合任务):

lerobot-eval \
  --policy.path=lerobot/smolvla_vlabench \
  --env.type=vlabench \
  --env.task=primitive \
  --eval.batch_size=1 \
  --eval.n_episodes=10 \
  --eval.use_async_envs=false \
  --policy.device=cuda \
  --env.max_parallel_tasks=1 \
  '--rename_map={"observation.images.image": "observation.images.camera1", "observation.images.second_image": "observation.images.camera2", "observation.images.wrist_image": "observation.images.camera3"}'

或同时运行两个套件:

lerobot-eval \
  --policy.path=lerobot/smolvla_vlabench \
  --env.type=vlabench \
  --env.task=primitive,composite \
  --eval.batch_size=1 \
  --eval.n_episodes=10 \
  --eval.use_async_envs=false \
  --policy.device=cuda \
  --env.max_parallel_tasks=1 \
  '--rename_map={"observation.images.image": "observation.images.camera1", "observation.images.second_image": "observation.images.camera2", "observation.images.wrist_image": "observation.images.camera3"}'

推荐的评估 episode 数

为了可复现的 benchmark,请使用每个任务 10 个 episode(完整基础任务套件共 210 个,组合任务套件共 220 个)。这与 VLABench 论文中的协议一致。

policy 输入和输出

observation:

  • observation.state — 7 维 end-effector state(位置 xyz + 欧拉角 xyz + gripper)
  • observation.images.image — 前置相机,480×480 HWC uint8
  • observation.images.second_image — 第二相机,480×480 HWC uint8
  • observation.images.wrist_image — 腕部相机,480×480 HWC uint8

action:

  • Box(-1, 1, shape=(7,)) 中的连续控制 — 3D 位置 + 3D 欧拉朝向 + 1D gripper。

训练

dataset

Hub 上以 LeRobot 格式预先收集的 VLABench dataset:

示例训练命令

在基础任务套件上 fine-tune 一个 SmolVLA 基础模型:

lerobot-train \
  --policy.type=smolvla \
  --policy.repo_id=${HF_USER}/smolvla_vlabench_primitive \
  --policy.load_vlm_weights=true \
  --policy.push_to_hub=true \
  --dataset.repo_id=VLABench/vlabench_primitive_ft_lerobot_video \
  --env.type=vlabench \
  --env.task=select_fruit \
  --output_dir=./outputs/smolvla_vlabench_primitive \
  --steps=100000 \
  --batch_size=4 \
  --env_eval_freq=5000 \
  --eval.batch_size=1 \
  --eval.n_episodes=1 \
  --save_freq=10000

复现已发表的结果

已发布的 checkpoint lerobot/smolvla_vlabench 在上面的基础任务套件 dataset 上训练,并使用单任务 / 全套件命令进行评估。CI 会在每个涉及该 benchmark 的 PR 上运行一次 10 个基础任务的冒烟评估(每个任务一个 episode)。

在 GitHub 上更新