-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Meta tensor load image #4130
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
Meta tensor load image #4130
Conversation
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]>
1d57add to
6c4c3d0
Compare
Signed-off-by: Richard Brown <[email protected]>
6c4c3d0 to
f9fd14a
Compare
Signed-off-by: Richard Brown <[email protected]>
78728d2 to
b227fdd
Compare
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]>
|
@Nic-Ma @ericspod @wyli |
Signed-off-by: Richard Brown <[email protected]>
ericspod
left a comment
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, I have a few optional suggestions.
|
Hi @rijobro, branches with the name pattern MONAI/.github/workflows/setupapp.yml Line 9 in 641a079
after this PR, I'll rename this MetaTensor branch to feature/MetaTensor to benefit from this...
|
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
|
@wyli Any idea what's going wrong with the checks? Some jobs are failing before starting with: |
it's a known NGC issue and the team is working on it, (https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901) |
|
for the record for more tests, after this PR I'll
(we also need a torch_function benchmark such as: https://github.com/pytorch/pytorch/tree/c371542efc31b1abfe6f388042aa3ab0cef935f2/benchmarks/overrides_benchmark |
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
|
/build |
Signed-off-by: Wenqi Li <[email protected]>
|
|
||
| def __repr__(self) -> str: | ||
| """String representation of class.""" | ||
| out: str = super().__repr__() |
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.
I think this line should be reverted, I think the output should be the same as torch.Tensor, but with the extra metadata (now we have metadata instead of voxel data). @wyli what do you think?
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.
sure, please feel free to change, the corresponding test case is this line:
MONAI/tests/test_meta_tensor.py
Line 201 in 18fca88
| self.assertTrue(str(out).startswith("\nMetaData")) |
* collate , decollate, dataset, dataloader, out= Signed-off-by: Richard Brown <[email protected]> * mypy Signed-off-by: Richard Brown <[email protected]> * skip decollation for pytorch 1.7 Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * add batch index testing Signed-off-by: Richard Brown <[email protected]> * fixes Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * load image meta tensor Signed-off-by: Richard Brown <[email protected]> * splitdims fix Signed-off-by: Richard Brown <[email protected]> * flake8 Signed-off-by: Richard Brown <[email protected]> * fix test_nifti_rw Signed-off-by: Richard Brown <[email protected]> * test_smartcachedataset Signed-off-by: Richard Brown <[email protected]> * test fixes Signed-off-by: Richard Brown <[email protected]> * test fixes Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * fixes Signed-off-by: Richard Brown <[email protected]> * fix Signed-off-by: Richard Brown <[email protected]> * fixes Signed-off-by: Richard Brown <[email protected]> * fix wsi test Signed-off-by: Richard Brown <[email protected]> * changes after code review Signed-off-by: Richard Brown <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
This shows how I would propose to modify
LoadImageto deal withMetaTensor.This caused a lot of errors throughout our codebase, which I solved with
FromMetaTensordwherever necessary.This is a temporary fix and the usages of
FromMetaTensordwill be deleted as other parts of the codebase are updated to be compatible withMetaTensor.This is a breaking change, so the PR is to
MONAI/MetaTensorinstead ofdev.Status
Ready
Types of changes