Skip to content

Pi0 visual normalization mode assumes images to be in the range [0,1] #1065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 2 tasks
atharva-18 opened this issue May 2, 2025 · 0 comments
Open
1 of 2 tasks
Labels
bug Something isn’t working correctly policies Items related to robot policies

Comments

@atharva-18
Copy link

System Info

lerobot version: latest main
OS version: Ubuntu 22.04
Torch version: 2.6.0

Information

  • One of the scripts in the examples/ folder of LeRobot
  • My own task or dataset (give details below)

Reproduction

policy = Pi0Policy.from_pretrained("lerobot/pi0")
action = policy.select_action(batch)

Expected behavior

Thanks for implementing Pi0! I gave it a shot and observed good results using my robot arm.

Upon further inspection of your code, I found out that the default normalization mode for input images is identity:

"VISUAL": NormalizationMode.IDENTITY,

And the policy wrapper makes an assumption that given an identity transform, the input images are already in the range [0, 1], see:

# Normalize from range [0,1] to [-1,1] as expacted by siglip

This looks like an important detail which was overlooked. I believe that the default visual transform should be MIN_MAX to avoid incorrect scaling of images to SigLIP or maybe another way is to add an assertion before we prepare images for the backbone.

@imstevenpmwork imstevenpmwork added bug Something isn’t working correctly policies Items related to robot policies labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working correctly policies Items related to robot policies
Projects
None yet
Development

No branches or pull requests

2 participants