-
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
Batch inverse #1795
Batch inverse #1795
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]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
yes, I'm looking into these... @Nic-Ma is taking a few days off, I think he'll be back next Tuesday |
great, 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 comments inline, still need more time to think and test this. I'm not very familiar with the use cases, I'll look into #1794 to get a complete picture...
transform: InvertibleTransform, | ||
pad_collation_used: bool, | ||
) -> None: | ||
self.data = decollate_batch(data) |
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.
could you help add some tests for random transforms in test_decollate
with random prob=0.0?
also, not in this PR but came across an issue in monai.transforms.Decollated
that missing a call to super().__init__
_BatchInverseDataset
should call super()
in its constructor as well
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.
Added tests and added call to super constructors
for key in data.keys(): | ||
transform_key = str(key) + "_transforms" | ||
transform = data[transform_key][-1] | ||
if transform["class"] == "SpatialPadd": |
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.
this is coupled with the pad_list_data_collate
, could we make a special invertible transformPadListDataCollate
, so that we could have the __call__
and inverse
in one place...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.
Done and split into its own PR. Let's merge that first, which will simply the diff of this PR again.
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]>
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, looks good to me now.
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Richard Brown <[email protected]>
… batch_inverse
Signed-off-by: Richard Brown <[email protected]>
Batch inverse.
part of #1515
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests
.make html
command in thedocs/
folder.