Repository navigation
Add configurable group restrictions for GrapPA edges - #181
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
=======================================
Coverage 99.99% 99.99%
=======================================
Files 440 440
Lines 39282 39297 +15
=======================================
+ Hits 39280 39295 +15
Misses 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
11 tasks done
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
Add
graph.group_byto restrict GrapPA message-passing edges to nodes sharing a named cluster-label field. For example,graph: {provider: complete, group_by: ancestor}keeps the input nodes and removes edges between different ancestor groups.group_by: grouprestricts edges to particle groups.Group IDs are derived from the majority voxel label within each node. Explicit node-aligned
groupsoverride the configured field. Full-chain graph preparation derives the IDs fromclust_label, including during cache materialization. Existing cached or explicitly supplied edges are used as-is and must already carry the desired restriction.Motivation and Context
Enable PID training with ancestor- or particle-group graph context through configuration, mimicking an upstream grouping stage without merging the input nodes or requiring a custom model caller.
Type of Change
How Has This Been Tested?
spine:latestDocker image (Python 3.10, PyTorch 2.5.1).git diff --check.Reproduce the model tests with:
Checklist
Additional Notes
The restriction applies during both training and evaluation, after graph generation and length cuts. Sparse graphs are filtered rather than rebuilt separately within each group. Matching negative IDs retain the existing same-group behavior; both this and cache regeneration requirements are documented.