Views
No views yet


1# clone repo.
2git clone https://github.com/FlagOpen/RoboBrain2.5.git
3cd RoboBrain2.5
4
5# build conda env.
6conda create -n robobrain2_5 python=3.10
7conda activate robobrain2_5
8pip install -r requirements.txt1from inference import UnifiedInference
2
3model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
4
5# Example:
6prompt = "What is shown in this image?"
7image = "http://images.cocodataset.org/val2017/000000039769.jpg"
8
9pred = model.inference(prompt, image, task="general")
10print(f"Prediction:\n{pred}")1from inference import UnifiedInference
2
3model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
4
5# Example:
6prompt = "the person wearing a red hat"
7image = "./assets/demo/grounding.jpg"
8
9# Visualization results will be saved to ./result, if `plot=True`.
10pred = model.inference(prompt, image, task="grounding", plot=True, do_sample=False)
11print(f"Prediction:\n{pred}")1from inference import UnifiedInference
2
3model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
4
5# Example:
6prompt = "the affordance area for holding the cup"
7image = "./assets/demo/affordance.jpg"
8
9# Visualization results will be saved to ./result, if `plot=True`.
10pred = model.inference(prompt, image, task="pointing", plot=True, do_sample=False)
11print(f"Prediction:\n{pred}")1from inference import UnifiedInference
2
3model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
4
5# Example:
6prompt = "Identify spot within the vacant space that's between the two mugs"
7image = "./assets/demo/pointing.jpg"
8
9# Visualization results will be saved to ./result, if `plot=True`.
10pred = model.inference(prompt, image, task="pointing", plot=True, do_sample=True)
11print(f"Prediction:\n{pred}")1from inference import UnifiedInference
2
3model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
4
5# Example 1:
6prompt_1 = "Identify spot within toilet in the house"
7image = "./assets/demo/navigation.jpg"
8
9# Visualization results will be saved to ./result, if `plot=True`.
10pred = model.inference(prompt_1, image, task="pointing", plot=True, do_sample=True)
11print(f"Prediction:\n{pred}")
12
13# Example 2:
14prompt_2 = "Identify spot within the sofa in the house"
15image = "./assets/demo/navigation.jpg"
16
17# Visualization results will be saved to ./result, if `plot=True`.
18pred = model.inference(prompt_2, image, task="pointing", plot=True, do_sample=True)
19print(f"Prediction:\n{pred}")1from inference import UnifiedInference
2
3model = UnifiedInference("BAAI/RoboBrain2.5-8B-NV")
4
5# Example:
6prompt = "reach for the banana on the plate"
7image = "./assets/demo/trajectory.jpg"
8
9# Visualization results will be saved to ./result, if `plot=True`.
10pred = model.inference(prompt, image, task="trajectory", plot=True, do_sample=False)
11print(f"Prediction:\n{pred}")1# clone Robo-Dopamine repo.
2git clone https://github.com/FlagOpen/Robo-Dopamine.git
3cd Robo-Dopamine1import os
2from examples.inference import GRMInference
3
4# model = GRMInference("tanhuajie2001/Robo-Dopamine-GRM-3B")
5model = GRMInference("BAAI/RoboBrain2.5-8B-NV")
6
7TASK_INSTRUCTION = "organize the table"
8BASE_DEMO_PATH = "./examples/demo_table"
9GOAL_IMAGE_PATH = "./examples/demo_table/goal_image.png"
10OUTPUT_ROOT = "./results"
11
12output_dir = model.run_pipeline(
13 cam_high_path = os.path.join(BASE_DEMO_PATH, "cam_high.mp4"),
14 cam_left_path = os.path.join(BASE_DEMO_PATH, "cam_left_wrist.mp4"),
15 cam_right_path = os.path.join(BASE_DEMO_PATH, "cam_right_wrist.mp4"),
16 out_root = OUTPUT_ROOT,
17 task = TASK_INSTRUCTION,
18 frame_interval = 30,
19 batch_size = 1,
20 goal_image = GOAL_IMAGE_PATH,
21 eval_mode = "incremental",
22 visualize = True
23)
24
25print(f"Episode ({BASE_DEMO_PATH}) processed with Incremental-Mode. Output at: {output_dir}")
26