Mask is not being transformed (only image) #2172
-
I am trying to apply the flipnslide augmentation, however, the image only get transformed. I have tried passing the inputs as a dict and as separate args but the output mask remains the same shape as the input. Instead I am expecting the output tensor to have a shape of (58, 1, 64,64). See reproducible example below.
OUTPUT |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This might be a better question to ask in the Kornia GitHub, but I'm guessing you need to subclass |
Beta Was this translation helpful? Give feedback.
-
Thanks to you all @johnnv1 @adamjstewart @isaaccorley I have got it to work. If anyone is interested in implementing this see code below for implementation.
|
Beta Was this translation helpful? Give feedback.
This might be a better question to ask in the Kornia GitHub, but I'm guessing you need to subclass
kornia.augmentation.GeometricAugmentationBase2D
instead ofnn.Module
. See the docs for example custom augmentations. Not sure if there is a more detailed tutorial somewhere @johnnv1