feat(manipulation): modularize NumPy RBF pre-warp stage for TPS pipeline PR#4#423
Open
Flames4fun wants to merge 1 commit intodreamlessx:mainfrom
Open
feat(manipulation): modularize NumPy RBF pre-warp stage for TPS pipeline PR#4#423Flames4fun wants to merge 1 commit intodreamlessx:mainfrom
Flames4fun wants to merge 1 commit intodreamlessx:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Description
Implements PR4 scope by extracting the NumPy RBF deformation into an explicit, reusable
pre-warp stage while preserving current behavior.
This keeps TPS pipeline work incremental and auditable:
apply_procedure_preset(...)now routes through a dedicated modular RBF stage, unless adata-driven displacement model path is provided.
Type of change
Changes
landmarkdiff/manipulation.py:build_rbf_prewarp_handles(...)apply_rbf_prewarp_stage(...)_apply_rbf_handles_to_face(...)apply_procedure_preset(...)to callapply_rbf_prewarp_stage(...)on the NumPyRBF path.
displacement_model_path) and fallback semantics.image_sizein the modular RBF path:build_rbf_prewarp_handles(...)is confidence-agnostic.apply_rbf_prewarp_stage(...)applies landmark-confidence weighting.tests/test_manipulation_rbf_stage.py0,50, and100apply_procedure_preset(...)image_sizecompatibility behavior in the RBF pathdocs/api/manipulation.mdTesting
ruff check landmarkdiff/ scripts/ tests/passesmypy landmarkdiff/ --ignore-missing-importspassespytest tests/passesScoped checks executed locally:
Results:
194 passed(test_manipulation*+ new RBF stage suite)37 passed(test_inference_extended.py)Screenshots / outputs
N/A (backend modularization + tests/docs only).
Checklist
Related issues: #374
@dreamlessx