Match Behavior of mn.transforms.Affined and mn.networks.layers.AffineTransform #8238
Unanswered
sudomakeinstall
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First, thanks to everyone for maintaining this incredible project. :-)
I'm trying to understand a difference in behavior between the transform
mn.transforms.Affined
and the layermn.networks.layers.AffineTransform
; specifically, if I apply a transformA
usingmn.transforms.Affined
in my dataloader and then subsequently try to reverse this transformation within my network usingmn.networks.layers.AffineTransform
, the images do not align. I suspect that these classes are making different assumptions about normalization and/or orientation, but am having trouble parsing this out from the documentation [1,2].Below is a minimal example reproducing the issue--could anyone suggest how I could modify this so that the output aligns with the input (after resampling/cropping but before applying the affine transform)? Note that in my actual application I can't use the
.invert()
function because I'm trying to learn the transformation parameters that I'm applying.Best, and thanks,
--Davis
[1] https://docs.monai.io/en/stable/transforms.html#monai.transforms.Affined
[2] https://docs.monai.io/en/stable/networks.html#affine-transform
Beta Was this translation helpful? Give feedback.
All reactions