Skip to content

Add segmentation mask geometry helpers#9

Merged
GiraudJules merged 2 commits into
mainfrom
feat/segmentation-geometry
May 26, 2026
Merged

Add segmentation mask geometry helpers#9
GiraudJules merged 2 commits into
mainfrom
feat/segmentation-geometry

Conversation

@GiraudJules

Copy link
Copy Markdown
Owner

Summary

Add the first segmentation-oriented geometry helpers and expose them to Python.

Changes

  • add a new mask module in Rust
  • add nearest-neighbor mask resize
  • add mask letterbox and unletterbox helpers
  • add binary mask thresholding
  • add mask-to-box extraction
  • expose the corresponding NumPy APIs in Python
  • extend Rust tests and the Python smoke test

Why

This broadens rusty-cv beyond detection and moves more common Python segmentation geometry work into Rust.

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 31e8aff into main May 26, 2026
1 check passed
@GiraudJules GiraudJules deleted the feat/segmentation-geometry branch May 26, 2026 23:11
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