[WIP/ENH] add babyseg and update babyAFQ - #210
Open
36000 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
AFQ/tasks/tissue.py:154
- The ValueError message is now out of sync with the supported string options. This function also accepts 'multiaxial+brainchop+synthseg' and 'babyseg', but the error text only lists 'synthseg' and 'multiaxial+brainchop', which can mislead users when they pass a valid value.
raise ValueError(
"pve must be a PVEImage, PVEImages, 'synthseg', or 'multiaxial+brainchop'"
)
AFQ/nn/babyseg.py:16
- Other AFQ.nn modules define all (e.g., AFQ/nn/brainchop.py and AFQ/nn/synthseg.py). Adding babyseg.py without all makes its public surface less explicit/inconsistent with the established pattern.
logger = logging.getLogger("AFQ")
AFQ/nn/babyseg.py:107
- New BabySeg-specific logic (label mapping + mixed-label boundary handling) is introduced here, but there are no unit tests covering it. The repo already has AFQ/nn/tests/test_nn.py for NN utilities; adding a small synthetic-ndarray test for pve_from_babyseg (including at least one voxel per label group and one mixed-label boundary case) would help prevent regressions without requiring onnxruntime.
def pve_from_babyseg(babyseg_data):
"""
Compute partial volume estimates from BabySeg segmentation.
Parameters
----------
babyseg_data : ndarray
The output segmentation from BabySeg.
Returns
-------
pve : ndarray
PVE data with CSF, GM, and WM segmentations.
"""
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.
No description provided.