cua_s1: preprocess RGB images for native vision on CPU - #63
Draft
Levius-Fubuki wants to merge 2 commits into
Draft
Levius-Fubuki wants to merge 2 commits into
Levius-Fubuki wants to merge 2 commits into
Conversation
4 tasks
This branch has not been deployed
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.
Purpose
Add
image_preprocess::preprocess_rgb8(width, height, rgb)to produce float32 pixel values, image grids, resized dimensions and image-token counts. Implement smart resize, antialiased uint8 bicubic resampling, normalization, merge ordering and temporal patch repetition with validated geometry and buffer lengths.The diff contains the implementation, its public module export and required upstream copyright/license notices. No runtime dependency is added.
Validation
After cleanup: workspace formatting, strict all-target Clippy, workspace tests and the locked release build passed. 25 tests passed; 3 existing GPU tests and 2 external-checkpoint tests skipped. Runtime source was compared against the previous head: only new trailing test modules were removed; production code is unchanged. Existing baseline tests remain.
Feature-specific tests, examples, documentation and validation assets were removed from this PR diff to keep it focused on core implementation. They remain in the pre-cleanup commit and a local archive.
Before cleanup, 14 reference cases and 24 held-out cases matched every float32 output byte from the pinned CPU processor; seven preprocessing integration tests passed. Those historical checks used the pre-cleanup test harness.
Self-review
Cleanup reviewed for unchanged runtime code, retained licensing and valid build targets. Draft status is retained for contributor/maintainer review.