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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
<div align="center">
|
| 5 |
+
<img src="https://github.com/FlagOpen/RoboBrain2.5/raw/main/assets/logo2.png" width="500"/>
|
| 6 |
+
</div>
|
| 7 |
+
|
| 8 |
+
<h1 align="center">RoboBrain 2.5: Depth in Sight, Time in Mind. </h1>
|
| 9 |
+
|
| 10 |
+
<p align="center">
|
| 11 |
+
</a>  ⭐️ <a href="https://superrobobrain.github.io/">Project Page</a></a>   |   📑 <a href="https://arxiv.org/abs/2601.14352">Technical Report</a>   |   🤗 <a href="https://huggingface.co/collections/BAAI/robobrain25/">Hugging Face</a>   |   🤖 <a href="https://github.com/FlagOpen/RoboBrain2.5">Github</a>  
|
| 12 |
+
</p>
|
| 13 |
+
|
| 14 |
+
https://arxiv.org/abs/2601.14352
|
| 15 |
+
|
| 16 |
+
## 🔥 Overview
|
| 17 |
+
**RoboBrain-2.5** is a next-generation Embodied AI foundation model that significantly evolves its predecessor's core capabilities in general perception, spatial reasoning, and temporal modeling through extensive training on high-quality spatiotemporal data. It achieves a paradigm shift in 3D Spatial Reasoning, transitioning from 2D relative points to predicting 3D coordinates with depth information, understanding absolute metric constraints, and generating complete manipulation trajectories tailored for complex tasks with physical constraints. Furthermore, it establishes a breakthrough in Temporal Value Prediction by constructing a General Reward Modeling Method that provides dense progress tracking and multi-granular execution state estimation across varying viewpoints. This empowers VLA reinforcement learning with immediate, dense feedback signals, enabling robots to achieve high task success rates and robustness in fine-grained manipulation scenarios.
|
| 18 |
+
|
| 19 |
+
<div align="center">
|
| 20 |
+
<img src="https://github.com/FlagOpen/RoboBrain2.5/raw/main/assets/teasor.png" />
|
| 21 |
+
</div>
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
## 🚀 Key Highlights
|
| 25 |
+
|
| 26 |
+
### 1. Comprehensive Upgrade in ✨ Native 3D Spatial Reasoning ✨
|
| 27 |
+
Compared to version 2.0, **RoboBrain-2.5** achieves a leap in spatial perception and reasoning capabilities:
|
| 28 |
+
* **From 2D to 3D:** Upgraded from predicting coordinate points on 2D images to predicting coordinate points with depth information in **3D space** (3D Spatial Referring).
|
| 29 |
+
* **Relative to Absolute:** Evolved from understanding relative spatial relationships to measuring **absolute 3D spatial metric information** (3D Spatial Measuring). The model can comprehend precise physical constraint instructions (e.g., "hovering 1-5 cm above").
|
| 30 |
+
* **Point to Trace:** Advanced from predicting a single target point for pick-and-place to predicting a **series of key points** that describe the complete manipulation process (3D Spatial Trace), naturally possessing spatial planning capabilities with 3D absolute metrics.
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
### 2. Breakthrough in ✨ Dense Temporal Value Estimation ✨
|
| 34 |
+
**RoboBrain-2.5** makes significant progress in temporal modeling by constructing a General Reward Model (GRM):
|
| 35 |
+
* **Dense Progress Prediction:** Capable of multi-granularity task progress prediction across different tasks, viewpoints, and embodiments.
|
| 36 |
+
* **Execution State Estimation:** Understands task goals and estimates various states during execution (e.g., success, failure, error occurrence).
|
| 37 |
+
* **Empowering VLA Reinforcement Learning:** Provides real-time, dense feedback signals and rewards for VLA (Vision-Language-Action) reinforcement learning. With only **one demonstration**, it achieves a task success rate of **95%+** in complex, fine-grained manipulations.
|
| 38 |
+
|
| 39 |
+
### 3. More Powerful Core Capabilities from previous version 2.0
|
| 40 |
+
**RoboBrain 2.5** also maintains the three core capabilities of version 2.0, which supports ***interactive reasoning*** with long-horizon planning and closed-loop feedback, ***spatial perception*** for precise point and bbox prediction from complex instructions, ***temporal perception*** for future trajectory estimation, and ***scene reasoning*** through real-time structured memory construction and update.
|
| 41 |
+
|
| 42 |
+
## 🛠️ Setup
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
# clone repo.
|
| 46 |
+
git clone https://github.com/FlagOpen/RoboBrain2.5.git
|
| 47 |
+
cd RoboBrain2.5
|
| 48 |
+
|
| 49 |
+
# build conda env.
|
| 50 |
+
conda create -n robobrain2_5 python=3.10
|
| 51 |
+
conda activate robobrain2_5
|
| 52 |
+
pip install -r requirements.txt
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
## 💡 Quickstart
|
| 57 |
+
|
| 58 |
+
### 1. Usage for General VQA
|
| 59 |
+
```python
|
| 60 |
+
from inference import UnifiedInference
|
| 61 |
+
|
| 62 |
+
model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
|
| 63 |
+
|
| 64 |
+
# Example:
|
| 65 |
+
prompt = "What is shown in this image?"
|
| 66 |
+
image = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 67 |
+
|
| 68 |
+
pred = model.inference(prompt, image, task="general")
|
| 69 |
+
print(f"Prediction:\n{pred}")
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
### 2. Usage for Visual Grounding (VG)
|
| 73 |
+
```python
|
| 74 |
+
from inference import UnifiedInference
|
| 75 |
+
|
| 76 |
+
model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
|
| 77 |
+
|
| 78 |
+
# Example:
|
| 79 |
+
prompt = "the person wearing a red hat"
|
| 80 |
+
image = "./assets/demo/grounding.jpg"
|
| 81 |
+
|
| 82 |
+
# Visualization results will be saved to ./result, if `plot=True`.
|
| 83 |
+
pred = model.inference(prompt, image, task="grounding", plot=True, do_sample=False)
|
| 84 |
+
print(f"Prediction:\n{pred}")
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
### 3. Usage for Affordance Prediction (Embodied)
|
| 88 |
+
```python
|
| 89 |
+
from inference import UnifiedInference
|
| 90 |
+
|
| 91 |
+
model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
|
| 92 |
+
|
| 93 |
+
# Example:
|
| 94 |
+
prompt = "the affordance area for holding the cup"
|
| 95 |
+
image = "./assets/demo/affordance.jpg"
|
| 96 |
+
|
| 97 |
+
# Visualization results will be saved to ./result, if `plot=True`.
|
| 98 |
+
pred = model.inference(prompt, image, task="pointing", plot=True, do_sample=False)
|
| 99 |
+
print(f"Prediction:\n{pred}")
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
### 4. Usage for Refering Prediction (Embodied)
|
| 103 |
+
```python
|
| 104 |
+
from inference import UnifiedInference
|
| 105 |
+
|
| 106 |
+
model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
|
| 107 |
+
|
| 108 |
+
# Example:
|
| 109 |
+
prompt = "Identify spot within the vacant space that's between the two mugs"
|
| 110 |
+
image = "./assets/demo/pointing.jpg"
|
| 111 |
+
|
| 112 |
+
# Visualization results will be saved to ./result, if `plot=True`.
|
| 113 |
+
pred = model.inference(prompt, image, task="pointing", plot=True, do_sample=True)
|
| 114 |
+
print(f"Prediction:\n{pred}")
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
### 5. Usage for Navigation Tasks (Embodied)
|
| 118 |
+
```python
|
| 119 |
+
from inference import UnifiedInference
|
| 120 |
+
|
| 121 |
+
model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
|
| 122 |
+
|
| 123 |
+
# Example 1:
|
| 124 |
+
prompt_1 = "Identify spot within toilet in the house"
|
| 125 |
+
image = "./assets/demo/navigation.jpg"
|
| 126 |
+
|
| 127 |
+
# Visualization results will be saved to ./result, if `plot=True`.
|
| 128 |
+
pred = model.inference(prompt_1, image, task="pointing", plot=True, do_sample=True)
|
| 129 |
+
print(f"Prediction:\n{pred}")
|
| 130 |
+
|
| 131 |
+
# Example 2:
|
| 132 |
+
prompt_2 = "Identify spot within the sofa in the house"
|
| 133 |
+
image = "./assets/demo/navigation.jpg"
|
| 134 |
+
|
| 135 |
+
# Visualization results will be saved to ./result, if `plot=True`.
|
| 136 |
+
pred = model.inference(prompt_2, image, task="pointing", plot=True, do_sample=True)
|
| 137 |
+
print(f"Prediction:\n{pred}")
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
### 6. Usage for ✨ 3D Trajectory Prediction ✨ (Embodied)
|
| 141 |
+
```python
|
| 142 |
+
from inference import UnifiedInference
|
| 143 |
+
|
| 144 |
+
model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
|
| 145 |
+
|
| 146 |
+
# Example:
|
| 147 |
+
prompt = "reach for the banana on the plate"
|
| 148 |
+
image = "./assets/demo/trajectory.jpg"
|
| 149 |
+
|
| 150 |
+
# Visualization results will be saved to ./result, if `plot=True`.
|
| 151 |
+
pred = model.inference(prompt, image, task="trajectory", plot=True, do_sample=False)
|
| 152 |
+
print(f"Prediction:\n{pred}")
|
| 153 |
+
```
|
| 154 |
+
|
| 155 |
+
### 7. Usage for ✨ Temporal Value Estimation ✨ (Embodied)
|
| 156 |
+
***We highly recommend referring to [Robo-Dopamine](https://github.com/FlagOpen/Robo-Dopamine) for detailed usage instructions.***
|
| 157 |
+
```bash
|
| 158 |
+
# clone Robo-Dopamine repo.
|
| 159 |
+
git clone https://github.com/FlagOpen/Robo-Dopamine.git
|
| 160 |
+
cd Robo-Dopamine
|
| 161 |
+
```
|
| 162 |
+
```python
|
| 163 |
+
import os
|
| 164 |
+
from examples.inference import GRMInference
|
| 165 |
+
|
| 166 |
+
# model = GRMInference("tanhuajie2001/Robo-Dopamine-GRM-3B")
|
| 167 |
+
model = GRMInference("BAAI/RoboBrain2.5-8B-NV")
|
| 168 |
+
|
| 169 |
+
TASK_INSTRUCTION = "organize the table"
|
| 170 |
+
BASE_DEMO_PATH = "./examples/demo_table"
|
| 171 |
+
GOAL_IMAGE_PATH = "./examples/demo_table/goal_image.png"
|
| 172 |
+
OUTPUT_ROOT = "./results"
|
| 173 |
+
|
| 174 |
+
output_dir = model.run_pipeline(
|
| 175 |
+
cam_high_path = os.path.join(BASE_DEMO_PATH, "cam_high.mp4"),
|
| 176 |
+
cam_left_path = os.path.join(BASE_DEMO_PATH, "cam_left_wrist.mp4"),
|
| 177 |
+
cam_right_path = os.path.join(BASE_DEMO_PATH, "cam_right_wrist.mp4"),
|
| 178 |
+
out_root = OUTPUT_ROOT,
|
| 179 |
+
task = TASK_INSTRUCTION,
|
| 180 |
+
frame_interval = 30,
|
| 181 |
+
batch_size = 1,
|
| 182 |
+
goal_image = GOAL_IMAGE_PATH,
|
| 183 |
+
eval_mode = "incremental",
|
| 184 |
+
visualize = True
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
print(f"Episode ({BASE_DEMO_PATH}) processed with Incremental-Mode. Output at: {output_dir}")
|
| 188 |
+
|
| 189 |
+
```
|