-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Move metatensor support into dev branch (crop/pad) #4548
Move metatensor support into dev branch (crop/pad) #4548
Conversation
merge master
merge master
merge master
merge master
merge master
merge master
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Thanks for sharing the implementation in the metatensor branch, I refer to the PR #4536 and made the change for
Thanks. |
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
I have integrated all the crop and pad transforms and migrated all the crop & pad unit tests from #4536.
Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I put some initial comments inline, please help fix the docs error: https://github.com/Project-MONAI/MONAI/runs/7087792214?check_suite_focus=true
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
* [DLMED] adapt Pad transform for MetaTensor Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] format code Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update inverse and spatial_pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] make thread safe Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CenterSpatialCrop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop samples Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] adjust Pad design Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CropForeground Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random weighted crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update RandCropPosNeg Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand crop by label classes Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update ResizeCropOrPad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] restore numpy pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update dict spatial pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad and divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update center spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand scale crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand spatial crop samples dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop foreground dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand weighted crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pos neg crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] update crop by labels dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update resize with pad or crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update format Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix all the mypy errors Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add crop / pad base tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad test Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pad transforms Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update samples crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add test for deepcopy Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix typo Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update docs Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [DLMED] adapt Pad transform for MetaTensor Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] format code Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update inverse and spatial_pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] make thread safe Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CenterSpatialCrop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop samples Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] adjust Pad design Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CropForeground Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random weighted crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update RandCropPosNeg Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand crop by label classes Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update ResizeCropOrPad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] restore numpy pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update dict spatial pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad and divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update center spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand scale crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand spatial crop samples dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop foreground dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand weighted crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pos neg crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] update crop by labels dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update resize with pad or crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update format Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix all the mypy errors Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add crop / pad base tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad test Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pad transforms Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update samples crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add test for deepcopy Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix typo Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update docs Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [DLMED] adapt Pad transform for MetaTensor Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] format code Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update inverse and spatial_pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] make thread safe Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CenterSpatialCrop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop samples Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] adjust Pad design Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CropForeground Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random weighted crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update RandCropPosNeg Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand crop by label classes Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update ResizeCropOrPad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] restore numpy pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update dict spatial pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad and divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update center spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand scale crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand spatial crop samples dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop foreground dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand weighted crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pos neg crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] update crop by labels dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update resize with pad or crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update format Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix all the mypy errors Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add crop / pad base tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad test Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pad transforms Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update samples crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add test for deepcopy Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix typo Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update docs Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [DLMED] adapt Pad transform for MetaTensor Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] format code Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update inverse and spatial_pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] make thread safe Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CenterSpatialCrop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random scale crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random spatial crop samples Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] adjust Pad design Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update CropForeground Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update random weighted crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update RandCropPosNeg Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand crop by label classes Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update ResizeCropOrPad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] restore numpy pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update dict spatial pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad and divisible pad Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update center spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand scale crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand spatial crop samples dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop foreground dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update rand weighted crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pos neg crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] update crop by labels dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update resize with pad or crop dict Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update format Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix all the mypy errors Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add crop / pad base tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update border pad test Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update spatial crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update pad transforms Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update samples crop Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update crop tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add test for deepcopy Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix typo Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update docs Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
This PR added
MetaTensor
support for all the crop & pad transforms.Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.