Skip to content

[WIP] 365 Inverse spatial transforms#1514

Closed
rijobro wants to merge 103 commits intoProject-MONAI:masterfrom
rijobro:inverse_transforms
Closed

[WIP] 365 Inverse spatial transforms#1514
rijobro wants to merge 103 commits intoProject-MONAI:masterfrom
rijobro:inverse_transforms

Conversation

@rijobro
Copy link
Copy Markdown
Contributor

@rijobro rijobro commented Jan 28, 2021

Fixes #365.

Initial proposition for inverting deterministic spatial transforms.

Status

Work in progress

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 --codeformat --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

To do

  • Implement inverse method for a deterministic spatial transform (SpatialPadd)
  • Implement inverse for Compose class
  • Create serialised representation of transform (append_applied_transforms and get_input_args)
  • Implement for a random class (to check we can safely store random parameters)
  • Test with CacheDataset and DataLoader to check for multiprocessing problems
  • Check GPU vs CPU
  • Check numpy vs. tensor
  • Check inclusion of batch dimension
  • Test with transforms that return lists (e.g., RandSpatialCropSamplesd)
  • Add to transforms.rst

Invertible classes

  • Compose
  • SpatialPadd
  • BorderPadd
  • DivisiblePadd
  • SpatialCropd
  • CenterSpatialCropd
  • CropForegroundd
  • ResizeWithPadOrCropd
  • Spacingd
  • Orientationd
  • Rotate90d
  • Resized
  • Flipd
  • Rotated
  • Zoomd
  • RandSpatialCropd
  • RandSpatialCropSamplesd
  • RandWeightedCropd
  • RandCropByPosNegLabeld
  • RandRotate90d
  • RandAffined
  • Rand2DElasticd
  • Rand3DElasticd
  • RandFlipd
  • RandRotated
  • RandZoomd

Not applicable

  • BoundingRectd -- doesn't modify the image, but adds a dictionary entry containing the bounding box.

@rijobro
Copy link
Copy Markdown
Contributor Author

rijobro commented Jan 28, 2021

@Nic-Ma @wyli proposition ahead of meeting to discuss inverse transforms

@rijobro rijobro marked this pull request as draft January 28, 2021 14:13
@rijobro rijobro mentioned this pull request Jan 28, 2021
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
@rijobro rijobro linked an issue Jan 28, 2021 that may be closed by this pull request
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
This reverts commit 917bb17.

Signed-off-by: Richard Brown <[email protected]>
This reverts commit a3055bf.

Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Mar 30, 2021

major feature merged, the remaining tasks are covered by other tickets or PRs, I'm closing this

@wyli wyli closed this Mar 30, 2021
@rijobro rijobro deleted the inverse_transforms branch May 4, 2021 10:45
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.

Invertible transforms Possibility to revert initial transformations on network outputs

2 participants