-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Shift augmentation in ShiftScaleRotate
works incorrect for keypoints and bboxes
#182
Comments
bboxes and keypoints use normalized coordinates internally |
Actually... I'm going to reopen it. |
Thanks. I'll pass it to @BloodAxe |
Thanks, I'll take a look on weekend on this issue. |
Hi all, In the following function: Denormalizing the coordinates before the rotation and renormalizing again, solved the issues I had:
It looks like normalization introduces different rescalings for each axis that make the transformation different from the one applied to images. Do you agree or did I miss something? |
I'm experiencing issues with the bounding box with YOLO. The center coordinates are correct, though the width and height coordinates of the bounding box are way off. This is the chunk of code that I have to read in a YOLO annotation, apply augmentations to the data, and then re-save the augmentation (for a single object)
|
I am also still experiencing the same issues as well |
Looks like we need to add |
Any updates on this @Dipet? |
Hi, sorry, no updated with this feature. |
Version: 1.12
Shift augmentation in
ShiftScaleRotate
works incorrect for keypoints and bboxes. Please compare how it's applied to img:https://github.com/albu/albumentations/blob/c26383ecd9eeb51d57185bfd699179a8a41f7b6d/albumentations/augmentations/functional.py#L143
BBoxes:
https://github.com/albu/albumentations/blob/c26383ecd9eeb51d57185bfd699179a8a41f7b6d/albumentations/augmentations/functional.py#L635
and keypoints:
https://github.com/albu/albumentations/blob/c26383ecd9eeb51d57185bfd699179a8a41f7b6d/albumentations/augmentations/functional.py#L861
'dx' and 'dy' is percentage values of image width and height. As we don't have access to image shape during these transforms it may be good to set shift range in pixels not in percents.
The text was updated successfully, but these errors were encountered: