fix(train): ensure consistent color augmentation RNG across base and wrist cameras#914
Open
wadeKeith wants to merge 1 commit intoPhysical-Intelligence:mainfrom
Open
Conversation
…wrist cameras Fixes Physical-Intelligence#859. augmax.Chain splits RNG by transform count, so base cameras (4 transforms) and wrist cameras (1 transform) received different sub-RNGs for ColorJitter despite the same input seed. This caused inconsistent color semantics between camera views. Split augmentation into spatial (camera-specific) and color (shared) stages with deterministic RNG derivation via jax.random.fold_in, ensuring all cameras see the same ColorJitter parameters within each sample.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #859.
augmax.Chainsplits the input RNG into sub-keys by transform count. Base cameras use 4 transforms (RandomCrop, Resize, Rotate, ColorJitter) while wrist cameras use only 1 (ColorJitter). This means ColorJitter receives different sub-RNGs for base vs. wrist cameras, even when given the same input seed.The result: base and wrist cameras see inconsistent color augmentation within the same training sample, which may confuse the VLM about object colors across camera views.
Fix
Split augmentation into two deterministic stages:
Both stages derive their RNG from the original key using
jax.random.fold_inwith different constants, ensuring:Changes
src/openpi/models/model.py: Refactored image augmentation to use split RNG stages