跳转至

VLABench

VLABench 是一个大规模基准测试,用于具有长时域推理的语言条件机器人操作。上游套件涵盖 2,000+ 个物体的 100 个任务类别,并评估机器人智能的六个维度:网格和纹理理解、空间推理、世界知识迁移、语义指令理解、物理定律理解和长时域规划。基于 MuJoCo / dm_control 构建,使用 Franka Panda 7-DOF 机械臂。LeRobot 通过 --env.task 公开其中 43 个任务(21 个原始任务 + 22 个复合任务,见下面的可用任务)。

VLABench 基准测试概览

可用任务

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

套件 CLI 名称 任务数 描述
Primitive primitive 21 单/少技能组合(选择、插入、物理问答)
Composite composite 22 多步推理和长时域规划(烹饪、重新排列)

原始任务: select_fruitselect_toyselect_chemistry_tubeadd_condimentselect_bookselect_paintingselect_drinkinsert_flowerselect_billiardsselect_ingredientselect_mahjongselect_poker,以及物理推理任务(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 extra。将其作为可编辑克隆手动安装,以及 VLABench 需要的 MuJoCo / dm_control 固定,然后获取网格资源:

# 按照标准 LeRobot 安装说明后。

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

Tip

VLABench 需要 Linux(sys_platform == 'linux')和 Python 3.10+。在运行之前设置 MuJoCo 渲染后端:

export MUJOCO_GL=egl  # 用于无头服务器(HPC、云)

评估

以下所有评估片段都镜像 CI 运行的命令(参见 .github/workflows/benchmark_tests.yml)。--rename_map 参数将 VLABench 的 image / second_image / wrist_image 相机键映射到发布的 smolvla_vlabench 策略训练时使用的三相机(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"}'

推荐评估回合数

每个任务 10 个回合用于可重现的基准测试(完整原始套件 210 个,复合套件 220 个)。与 VLABench 论文中的协议匹配。

策略输入和输出

观测:

  • observation.state — 7 维末端执行器状态(位置 xyz + 欧拉 xyz + 夹爪)
  • observation.images.image — 前置相机,480×480 HWC uint8
  • observation.images.second_image — 第二相机,480×480 HWC uint8
  • observation.images.wrist_image — 腕部相机,480×480 HWC uint8

动作:

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

训练

数据集

Hub 上的 LeRobot 格式预收集 VLABench 数据集:

示例训练命令

在原始套件上微调 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 \
  --eval_freq=5000 \
  --eval.batch_size=1 \
  --eval.n_episodes=1 \
  --save_freq=10000

重现发布结果

发布的检查点 lerobot/smolvla_vlabench 在上述原始套件数据集上训练,并使用单任务 / 套件范围命令进行评估。CI 在每个触及基准测试的 PR 上运行 10 个原始任务的冒烟评估(每个一个回合)。