Skip to content
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

Affine transformation with warp mode doesn't "roll" keypoints #843

Open
DanielKarasek opened this issue Feb 13, 2024 · 0 comments
Open

Affine transformation with warp mode doesn't "roll" keypoints #843

DanielKarasek opened this issue Feb 13, 2024 · 0 comments

Comments

@DanielKarasek
Copy link

DanielKarasek commented Feb 13, 2024

Keypoints should roll across the borders together with the image, but instead it just goes out of the image boundaries.
Minimal example where keypoints get out of boundaries of the image, while they should warp around:

import imgaug.augmenters as iaa
import imgaug as ia

# Define the keypoints
keypoints_on_images = [ia.KeypointsOnImage([
    ia.Keypoint(x=80, y=60)], 
    shape=(100, 100, 3))]

# Define the augmenter
aug = iaa.Affine(translate_px={"x": 40}, mode="wrap")

# Apply the augmentation
images_aug, keypoints_aug = aug(images=[image], keypoints=keypoints_on_images)

print(keypoints_aug)
>>> '[KeypointsOnImage([Keypoint(x=130.00000000, y=60.00000000)], shape=(100, 100, 3))]'
# keypoint is out of the image boundaries, it should be at x:30, y:60 instead

Same problem appears for all CBAs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant