模型简介
模型特点
模型能力
使用案例
🚀 SpatialVLA在分形与桥梁数据集上的微调模型
本模型是通过在分形数据集上对 SpatialVLA模型 进行微调得到的,用于Simpler-env基准测试。
🚀 快速开始
SpatialVLA仅依赖HuggingFace Transformers 🤗,这使得模型的部署极为便捷。若你的环境支持 transformers >= 4.47.0
,可直接使用以下代码加载模型并进行推理(需要8.5GB的GPU内存)。
import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor
model_name_or_path="IPEC-COMMUNITY/spatialvla-4b-224-pt"
processor = AutoProcessor.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True, torch_dtype=torch.bfloat16).eval().cuda()
image = Image.open("example.png").convert("RGB")
prompt = "What action should the robot take to pick the cup?"
inputs = processor(images=[image], text=prompt, return_tensors="pt")
generation_outputs = model.predict_action(inputs)
actions = processor.decode_actions(generation_outputs, unnorm_key="fractal20220817_data/0.1.0")
print(actions)
✨ 主要特性
- 多团队合作研发:由来自上海人工智能实验室、上海科技大学和TeleAI的研究人员组成的SpatialVLA团队开发。
- 跨模态能力:属于视觉 - 语言 - 动作模型(语言、图像 => 机器人动作),能够根据输入的语言和图像信息输出机器人动作。
- 开源许可:采用MIT许可证,方便开发者使用和二次开发。
- 可微调性:基于预训练模型进行微调,能快速适应特定任务。
📦 安装指南
如果你想使用该模型进行微调或预训练,需要先克隆 官方仓库:
git clone https://github.com/SpatialVLA/SpatialVLA.git
然后安装所需的包,并从Hugging Face模型中心下载模型。SpatialVLA的视觉语言模型(VLM)骨干是PaLiGemma2,需要 transformers >= 4.47.0
。因此,需要创建一个Python版本 >= 3.10的Python环境:
conda create -n spatialvla python=3.10
conda activate spatialvla
从 requirements.txt
文件中安装包。请注意,我们使用了自定义的 dlimp
来支持种子设置以确保结果可复现。如果你遇到任何问题,请从 dlimp_custom 手动安装 dlimp
。
pip install -r requirements.txt
💻 使用示例
基础用法
import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor
model_name_or_path="IPEC-COMMUNITY/spatialvla-4b-224-pt"
processor = AutoProcessor.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoModel.from_pretrained(model_name_or_path, trust_remote_code=True, torch_dtype=torch.bfloat16).eval().cuda()
image = Image.open("example.png").convert("RGB")
prompt = "What action should the robot take to pick the cup?"
inputs = processor(images=[image], text=prompt, return_tensors="pt")
generation_outputs = model.predict_action(inputs)
actions = processor.decode_actions(generation_outputs, unnorm_key="fractal20220817_data/0.1.0")
print(actions)
高级用法
从头开始训练
SpatialVLA在64个A100 GPU集群上,使用来自OXE和RH20T数据集的110万个真实机器人演示数据进行了约10天的预训练,批次大小为2048。你可以使用以下命令从头开始预训练模型:
# torchrun
bash scripts/spatialvla_4b_pretrain/torchrun_pretrain.sh
# 或在slurm集群中
bash scripts/spatialvla_4b_pretrain/slurm_pretrain.sh
微调
我们的大多数微调实验是在4个或8个A100 GPU上使用LoRA进行的。你可以使用以下脚本进行全参数或LoRA微调。对于使用小数据集的真实世界实验,我们建议使用LoRA进行微调。
# 全参数微调
bash scripts/spatialvla_4b_finetune/finetune_full.sh
# LoRA微调
bash scripts/spatialvla_4b_finetune/finetune_lora.sh
📚 详细文档
模型详情
属性 | 详情 |
---|---|
开发者 | 由来自上海人工智能实验室、上海科技大学和TeleAI的研究人员组成的SpatialVLA团队 |
模型类型 | 视觉 - 语言 - 动作(语言、图像 => 机器人动作) |
语言 | 英语 |
许可证 | MIT |
微调基础模型 | paligemma2-3b-pt-224 |
预训练数据集 | Open X-Embodiment 和 RH20T |
仓库地址 | https://github.com/SpatialVLA/SpatialVLA |
论文 | SpatialVLA: Exploring Spatial Representations for Visual-Language-Action Model |
项目页面和视频 | https://spatialvla.github.io/ |
模型使用范围
SpatialVLA模型在未见过的新机器人实体或预训练混合中未涵盖的设置上无法进行零样本泛化。在这些情况下,我们建议在所需的设置上收集演示数据集,并对SpatialVLA模型进行微调。
评估
SimplerEnv在Google机器人任务上的评估
模型 | 视觉匹配 - 拿起可乐罐 | 视觉匹配 - 靠近 | 视觉匹配 - 打开/关闭抽屉 | 视觉匹配 - 平均 | 变体聚合 - 拿起可乐罐 | 变体聚合 - 靠近 | 变体聚合 - 打开/关闭抽屉 | 变体聚合 - 平均 |
---|---|---|---|---|---|---|---|---|
RT-1 (Begin) | 2.7% | 5.0% | 13.9% | 6.8% | 2.2% | 4.0% | 6.9% | 4.2% |
RT-1 (15%) | 71.0% | 35.4% | 56.5% | 60.2% | 81.3% | 44.6% | 26.7% | 56.2% |
RT-1 (Converged) | 85.7% | 44.2% | 73.0% | 74.6% | 89.8% | 50.0% | 32.3% | 63.3% |
HPT | 56.0% | 60.0% | 24.0% | 46.0% | -- | -- | 31.0% | 45.0% |
TraceVLA | 28.0% | 53.7% | 57.0% | 42.0% | 60.0% | 56.4% | 29.4% | 39.6% |
RT-1-X | 56.7% | 31.7% | 59.7% | 53.4% | 49.0% | 32.3% | 35.3% | 64.3% |
RT-2-X | 78.7% | 77.9% | 25.0% | 60.7% | 82.3% | 79.2% | -- | -- |
Octo-Base | 17.0% | 4.2% | 22.7% | 16.8% | 0.6% | 3.1% | 1.1% | 1.1% |
OpenVLA | 16.3% | 46.2% | 35.6% | 27.7% | 54.5% | 47.7% | 17.7% | 39.8% |
RoboVLM (zero-shot) | 72.7% | 66.3% | 26.8% | 56.3% | 68.3% | 56.0% | 8.5% | 46.3% |
RoboVLM (fine-tuning) | 77.3% | 61.7% | 43.5% | 63.4% | 75.6% | 60.0% | 10.6% | 51.3% |
SpatialVLA (zero-shot) | 81.0% | 69.6% | 59.3% | 71.9% | 89.5% | 71.7% | 36.2% | 68.8% |
SpatialVLA (fine-tuning) | 86.0% | 77.9% | 57.4% | 75.1% | 88.0% | 72.7% | 41.8% | 70.7% |
SimplerEnv在WidowX机器人任务上的评估
模型 | 把勺子放在毛巾上 - 抓取勺子 | 把勺子放在毛巾上 - 成功 | 把胡萝卜放在盘子上 - 抓取胡萝卜 | 把胡萝卜放在盘子上 - 成功 | 把绿色方块堆叠在黄色方块上 - 抓取绿色方块 | 把绿色方块堆叠在黄色方块上 - 成功 | 把茄子放在黄色篮子里 - 抓取茄子 | 把茄子放在黄色篮子里 - 成功 | 总体平均 |
---|---|---|---|---|---|---|---|---|---|
RT-1-X | 16.7% | 0.0% | 20.8% | 4.2% | 8.3% | 0.0% | 0.0% | 0.0% | 1.1% |
Octo-Base | 34.7% | 12.5% | 52.8% | 8.3% | 31.9% | 0.0% | 66.7% | 43.1% | 16.0% |
Octo-Small | 77.8% | 47.2% | 27.8% | 9.7% | 40.3% | 4.2% | 87.5% | 56.9% | 30.0% |
OpenVLA | 4.1% | 0.0% | 33.3% | 0.0% | 12.5% | 0.0% | 8.3% | 4.1% | 1.0% |
RoboVLM (zero-shot) | 37.5% | 20.8% | 33.3% | 25.0% | 8.3% | 8.3% | 0.0% | 0.0% | 13.5% |
RoboVLM (fine-tuning) | 54.2% | 29.2% | 25.0% | 25.0% | 45.8% | 12.5% | 58.3% | 58.3% | 31.3% |
SpatialVLA (zero-shot) | 25.0% | 20.8% | 41.7% | 20.8% | 58.3% | 25.0% | 79.2% | 70.8% | 34.4% |
SpatialVLA (fine-tuning) | 20.8% | 16.7% | 29.2% | 25.0% | 62.5% | 29.2% | 100.0% | 100.0% | 42.7% |
WidowX机器人的零样本机器人控制评估
空间理解能力评估
📄 许可证
本模型采用MIT许可证。
🔧 技术细节
本模型是通过在分形数据集上对SpatialVLA模型进行微调得到的。SpatialVLA的视觉语言模型骨干是PaLiGemma2,需要 transformers >= 4.47.0
。在预训练阶段,使用了来自OXE和RH20T数据集的110万个真实机器人演示数据,在64个A100 GPU集群上进行了约10天的训练,批次大小为2048。微调实验大多在4个或8个A100 GPU上使用LoRA进行。
📚 引用
如果你在研究中使用了本模型,请引用以下论文:
@misc{qu2025spatialvlaexploringspatialrepresentations,
title={SpatialVLA: Exploring Spatial Representations for Visual-Language-Action Model},
author={Delin Qu and Haoming Song and Qizhi Chen and Yuanqi Yao and Xinyi Ye and Yan Ding and Zhigang Wang and JiaYuan Gu and Bin Zhao and Dong Wang and Xuelong Li},
year={2025},
eprint={2501.15830},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2501.15830},
}









