Repeat augmentations with exactly same parameters on two different images #1427
-
Hi, How can I repeat the same transformation (with exactly the same parameters) on two different tensors/images? For example, if I use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
as described in this link https://kornia.readthedocs.io/en/latest/applications/image_augmentations.html#customization , you can do: img1 = torch.rand(1,3,224,224)
img2 = torch.rand(1,3,224,224)
aug = K.RandomAffine(360, return_transform=True, same_on_batch=True)
img3, trans = aug(img1)
img4 = aug(img2, trans) |
Beta Was this translation helpful? Give feedback.
-
This doesn't seem to work on
This threw the following error: EDIT: Corrected a typo. |
Beta Was this translation helpful? Give feedback.
as described in this link https://kornia.readthedocs.io/en/latest/applications/image_augmentations.html#customization , you can do: