openpi icon indicating copy to clipboard operation
openpi copied to clipboard

Max supported action dimension and number of input images?

Open HomerIsAFool opened this issue 1 year ago • 7 comments

Hi all, THANKS FOR YOUR EXCELLENT WORK!

i am trying to finetune π0 on a humanoid robot with dexterous hand. The action dim is 28 (14 for dual arm and 14 for dual hand), and there are 4 cameras(2 on the head , 2 fixed on the wrist).

I am wondering whether π₀ supports 4 image input and whether it can handle such a high-dimensional (28 dim) action sequence?

HomerIsAFool avatar Aug 27 '25 04:08 HomerIsAFool

I actually have a similar question. In the code, there is a comment stating that "Pi0 models support three image inputs at the moment: one third-person view, and two wrist views (left and right)". We would like to use 2 third-view cameras and 1 wrist camera, as we have a single robotic arm. But I feel like the model won't be able to learn much (considering that we fine-tune only)

vcozzolino avatar Aug 27 '25 06:08 vcozzolino

Try pi05 -- it's pretrained with up to 4 cameras (two external and two wrist cams!)

kpertsch avatar Sep 11 '25 21:09 kpertsch

hi @kpertsch Thank you for your suggestion. I tried pi0.5 pytorch version, and my input has 4 images(['aux_hand_eye_image', 'bottom_fixed_image', 'hand_eye_image', 'top_fixed_image'), but it seems that the pytorch version only support up to 3 cameras: Here is the log:

[rank3]: File "/home/yuji/openpi_0.5/openpi/src/openpi/models_pytorch/preprocessing_pytorch.py", line 32, in preprocess_observation_pytorch [rank3]: raise ValueError(f"images dict missing keys: expected {image_keys}, got {list(observation.images)}") [rank3]: ValueError: images dict missing keys: expected ('base_0_rgb', 'left_wrist_0_rgb', 'right_wrist_0_rgb'), got ['aux_hand_eye_image', 'bottom_fixed_image', 'hand_eye_image', 'top_fixed_image']

i am not using jax version because that my VRAM is low and can only finetune with float16. Currently it seems that only pytorch version support to train with float16

HomerIsAFool avatar Sep 18 '25 04:09 HomerIsAFool

Are you sure it's possible to use up to 4 cameras?

I was looking into the code, and there is no policy that uses 4 cameras. What dictionary key does the model expect when loading the second third-view camera?

Because right now the only available keys are 'base_0_rgb', 'left_wrist_0_rgb', and 'right_wrist_0_rgb' as also shown in the code of preprocessing_pytorch.py:

# Constants moved from model.py
IMAGE_KEYS = (
    "base_0_rgb",
    "left_wrist_0_rgb",
    "right_wrist_0_rgb",
)

vcozzolino avatar Sep 24 '25 10:09 vcozzolino

Are you sure it's possible to use up to 4 cameras?

I was looking into the code, and there is no policy that uses 4 cameras. What dictionary key does the model expect when loading the second third-view camera?

Because right now the only available keys are 'base_0_rgb', 'left_wrist_0_rgb', and 'right_wrist_0_rgb' as also shown in the code of preprocessing_pytorch.py:

# Constants moved from model.py
IMAGE_KEYS = (
    "base_0_rgb",
    "left_wrist_0_rgb",
    "right_wrist_0_rgb",
)

I also see the code, and the comment " Do not change the keys in the dict below." so I am also confused about that 😕

HomerIsAFool avatar Sep 25 '25 01:09 HomerIsAFool

I am wondering the same. @kpertsch any advice would be appreciated!

brycegoh avatar Oct 02 '25 03:10 brycegoh

Bump on this! @kpertsch

rphly avatar Oct 15 '25 09:10 rphly