Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve SpacingD output shape compute stability #6126

Merged
merged 5 commits into from
Mar 15, 2023

Conversation

wyli
Copy link
Contributor

@wyli wyli commented Mar 10, 2023

for slightly different affine (atol < 1e-3) the shape output might be different

sum([1.49999991e+00 1.44128689e-04] * [237. 144.]) = sum([3.55499980e+02 2.07545313e-02]) = 355.52073414989167

sum([ 1.49999989e+00 -6.16167492e-10] * [237. 144.]) = sum([ 3.55499975e+02 -8.87281188e-08]) = 355.4999748785736
  • increase the stability of affine inv
  • check affine floating point types
  • ensure same shape when there's only tiny difference in pixdim

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

wyli added 3 commits March 10, 2023 09:15
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
…ility

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli force-pushed the improve-spacing-stability branch from dbe9f37 to 5000c5b Compare March 14, 2023 22:59
@wyli wyli marked this pull request as ready for review March 14, 2023 23:01
@wyli wyli added this to the Auto3DSeg enhancement [P0 v1.2] milestone Mar 14, 2023
@wyli wyli changed the title improve spacing output shape compute stability improve SpacingD output shape compute stability Mar 14, 2023
@myron
Copy link
Collaborator

myron commented Mar 14, 2023

Looks good. Thanks!

@wyli
Copy link
Contributor Author

wyli commented Mar 14, 2023

/build

@wyli wyli enabled auto-merge (squash) March 14, 2023 23:41
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli
Copy link
Contributor Author

wyli commented Mar 15, 2023

/black

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
@wyli
Copy link
Contributor Author

wyli commented Mar 15, 2023

/build

@wyli wyli merged commit 9fd6d4c into Project-MONAI:dev Mar 15, 2023
@wyli wyli deleted the improve-spacing-stability branch March 15, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants