We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using A.Rotate in A.Compose with remove_invisible=False returns 9 times more keypoints than the input number of keypoints.
A.Rotate
A.Compose
remove_invisible=False
Steps to reproduce the behavior:
import numpy as np import albumentations as A image = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8) keypoints = np.random.randint(0, 100, (50, 2), dtype=np.uint8) # Check shape print(keypoints.shape) # (50, 2) result = A.Compose([A.Rotate(limit=45, p=1.0)], keypoint_params=A.KeypointParams(format='yx', remove_invisible=False))(image=image, keypoints=keypoints) # Check shape print(result['keypoints'].shape) # (450, 2)
result['keypoints'] should have the same shape as the input keypoints. (50, 2)
result['keypoints']
result['keypoints'] has 9 times more keypoints than the input keypoints. (9 * 50, 2)
The bug was not present in albumentations==1.4.18 and was introduced since albumentations==1.4.19
The text was updated successfully, but these errors were encountered:
It is not a bug, but a feature.
When you use border_mode=cv2.BORDER_REFLECT_101 which is the default, you get new keypoints in the reflected regions.
border_mode=cv2.BORDER_REFLECT_101
If you change border_mode to cv2.BORDER_CONSTANT, no new keypoints will be added.
border_mode
cv2.BORDER_CONSTANT
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Using
A.Rotate
inA.Compose
withremove_invisible=False
returns 9 times more keypoints than the input number of keypoints.To Reproduce
Steps to reproduce the behavior:
Expected behavior
result['keypoints']
should have the same shape as the input keypoints. (50, 2)Actual behavior
result['keypoints']
has 9 times more keypoints than the input keypoints. (9 * 50, 2)Additional context
The bug was not present in albumentations==1.4.18 and was introduced since albumentations==1.4.19
The text was updated successfully, but these errors were encountered: