You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional: Download all test videos and example model outputs from google cloud
# 1) Install gcloud: https://cloud.google.com/sdk/docs/install# 2) Go to target directory# cd /path/to/roboreason# Optional: disable credentials so you don't have to authenticate
gcloud config set auth/disable_credentials True
# Download test videos
gcloud storage cp --recursive gs://roboreason-view-videos-philip/test_videos ./
# Download example model outputs
gcloud storage cp --recursive gs://roboreason-view-videos-philip/model_outputs ./
# Optional: re-enable credentials afterward if you disabled them above.
gcloud config set auth/disable_credentials False
Quick start: Example reward generation and plotting
# pip install -U roboreasonimportroboreasonasrrvideo_paths= ['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4']
task_description="Pick up the cube from the table."# Robometerrewards, success_probs=rr.generate(model="Robometer", task_description=task_description, video_paths=video_paths, view_type_per_video=['external'], verbose=False)
output_robometer= {"model": "Robometer", "rewards": rewards[0]}
# SOLE-R1rewards, reasoning_traces=rr.generate(model="SOLE-R1", task_description=task_description, video_paths=video_paths, view_type_per_video=['external and wrist'], verbose=False)
output_sole= {"model": "SOLE-R1", "rewards": rewards[0], "reasoning_traces": reasoning_traces[0]}
# Optional: Ground-truth rewards (available for test videos from sim environments)importjsonwithopen(video_paths[0].replace(".mp4", "/data.json"), 'r') asf:
data=json.load(f)
output_groundtruth= {"model": "Ground truth", "rewards": data['ground-truth rewards']}
# Plotrr.video_plot(outputs=[output_groundtruth, output_sole, output_robometer], plot_save_path='model_outputs/combined/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4', video_path=video_paths[0])
Examples for generating across all models
Robometer
importroboreasonasrrrewards, success_probs=rr.generate(
model="Robometer",
task_description="Pick up the cube from the table.",
video_paths=['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4'],
view_type_per_video=['external'],
verbose=False
)
SOLE-R1
importroboreasonasrrrewards, reasoning_traces=rr.generate(
model="SOLE-R1",
task_description="Pick up the cube from the table.",
video_paths=['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4'],
view_type_per_video=['external and wrist'],
verbose=False
)
TOPReward
importroboreasonasrrrewards=rr.generate(
model="TOPReward",
task_description="Pick up the cube from the table.",
video_paths=['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4'],
view_type_per_video=['external'],
verbose=False
)
RoboReward
importroboreasonasrrrewards=rr.generate(
model="RoboReward",
task_description="Pick up the cube from the table.",
video_paths=['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4'],
view_type_per_video=['external'],
verbose=False
)
GPT-5 (and other OpenAI models)
importroboreasonasrr# requires OpenAI API key: https://developers.openai.com/api/docs/quickstartAPI_KEY="..."rewards, reasoning_traces=rr.generate(
model="GPT-5",
task_description="Pick up the cube from the table.",
video_paths=['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4'],
view_type_per_video=['external'],
key=API_KEY,
verbose=False
)
Gemini-3-Pro (and other Google models)
importroboreasonasrr# requires Gemini API key: https://ai.google.dev/gemini-api/docs/api-keyAPI_KEY="..."rewards, reasoning_traces=rr.generate(
model="Gemini-3-Pro-Preview",
task_description="Pick up the cube from the table.",
video_paths=['test_videos/robosuite/lift/unsuccessful/robosuite_lift_episode_11_unsuccessful_max_reward_37.mp4'],
view_type_per_video=['external'],
key=API_KEY,
verbose=False
)
importroboreasonasrrimportglobimportjsonvideo_paths=glob.glob('test_videos/robosuite/lift/unsuccessful/*')
## INFERENCE# Robometer for all videosrewards_robometer, success_probs_robometer=rr.generate(model="Robometer", task_description=task_description, video_paths=video_paths, view_type_per_video=['external'])
# SOLE-R1 for all videosrewards_sole, reasoning_traces_sole=rr.generate(model="SOLE-R1", task_description=task_description, video_paths=video_paths, view_type_per_video=['external and wrist'])
## PLOTTINGplot_save_dir='model_outputs/'forvideo_idxinrange(len(video_paths)):
output_robometer= {"model": "Robometer", "rewards": rewards_robometer[video_idx]}
output_sole= {"model": "SOLE-R1", "rewards": rewards_sole[video_idx]}
# Optional: Ground-truth rewards (available for test videos from sim environments)withopen(video_paths[0].replace(".mp4", "/data.json"), 'r') asf:
data=json.load(f)
output_groundtruth= {"model": "Ground truth", "rewards": data['ground-truth rewards']}
rr.video_plot(
outputs= [output_sole, output_robometer],
plot_save_path=plot_save_dir+video_paths[video_idx].split('test_videos/')[-1] ,
video_path=video_paths[video_idx],
verbose=False
)
rr.generate
Argument
Type
Required
Description
model
str
✅
Name of the model to use. Options include: "Robometer", "SOLE-R1", "TOPReward", "RoboReward", OpenAI models (e.g."GPT-5"), Google models (e.g., "Gemini-3-Pro-Preview")
task_description
str
✅
Natural language description of the task the robot is performing.
video_paths
List[str]
✅
List of paths to input video files.
view_type_per_video
List[str]
✅
List specifying the camera view(s) used for reward reasoning for each video (e.g., "external", "wrist", or "external and wrist").
key
str
❌
API key required for external models (e.g., OpenAI or Gemini). Not needed for local models.
Model Type
Return Values
SOLE-R1 / GPT / Gemini
rewards, reasoning_traces
Robometer
rewards, success_probs
TOPReward / RoboReward
rewards
rr.video_plot
Argument
Type
Required
Description
outputs
List[dict]
❌*
List of model outputs (e.g., from rr.generate) to visualize together.
plot_save_path
str
❌
Path where the output video with overlays will be saved.
video_path
str
❌
Path to the original video file being visualized.
view_type
str
❌
View type used for visualization (e.g., "external", "wrist", "external and wrist").
show_reasoning_traces
bool
❌
Whether to overlay reasoning traces on the video. Default: False.
show_all_frames
bool
❌
Whether to render all frames instead of sampled frames. Default: False.
model
str
❌**
Model name (used when calling video_plot directly instead of passing outputs).