Skip to content

Add batched preprocessing API#8

Merged
GiraudJules merged 1 commit into
mainfrom
feat/batched-preprocess
May 26, 2026
Merged

Add batched preprocessing API#8
GiraudJules merged 1 commit into
mainfrom
feat/batched-preprocess

Conversation

@GiraudJules

Copy link
Copy Markdown
Owner

Summary

Add a batched preprocessing path that turns multiple images into one contiguous float32 tensor in Rust.

Changes

  • add preprocess_batch(...) to the Rust preprocess module
  • add PreprocessBatchResult
  • expose preprocess_batch_numpy(...) to Python
  • support either an NxHxWx3 uint8 NumPy array or a sequence of HxWx3 uint8 arrays
  • extend Rust tests and the Python smoke test

Why

This is the next high-value preprocessing step after single-image preprocess and tensor layout helpers. It reduces Python loop overhead in inference pipelines.

Validation

  • cargo fmt --check
  • cargo test
  • cargo check --features python
  • ../../.venv/bin/maturin develop --features python
  • ../../.venv/bin/python scripts/python_smoke_test.py

@GiraudJules GiraudJules marked this pull request as ready for review May 26, 2026 23:06
@GiraudJules GiraudJules merged commit 8f41220 into main May 26, 2026
1 check passed
@GiraudJules GiraudJules deleted the feat/batched-preprocess branch May 26, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant