模型概述
模型特點
模型能力
使用案例
🚀 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},
}









