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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for recentering for RandomAffine and RandomPerspective transformations #8504

Open
Chiptun3r opened this issue Jun 26, 2024 · 0 comments

Comments

@Chiptun3r
Copy link

馃悰 Describe the bug

It is sometimes the case that the dataset you鈥檙e working on contains objects always in the same position and you want to keep that property during the augmentation. I suggest to add an argument to the RandomAffine and RandomPerspective transforms that, when enable, locate the old center of the image in the transformed one and translate it back to the center. Also, it maybe be useful to extend this feature to any arbitrary point, so that, if one point is specified in the original image, it will get translated back to its original place after the transformation

Versions

torchivision 0.18.1

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