Skip to content

Optim-wip: Fix & improve cropping transforms #921

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

Closed

Conversation

ProGamerGov
Copy link
Contributor

@ProGamerGov ProGamerGov commented Apr 8, 2022

This PR contains the following fixes & improvements from the JIT transforms PR here: #821, to make it easier to review.

  • Fix bug with RandomCrop

  • JIT support for RandomCrop, CenterCrop, and center_crop. This required changing some of the type hints.

  • CenterCrop / center_crop now adds padding if the crop size is larger than the input dimensions. This is extremely useful for models that require a specific input size, like CLIP models.

  • Added more comprehensive testing to for RandomCrop, CenterCrop, and center_crop. Test coverage reported by pytest should now be 100% minus the version specific tests.

@ProGamerGov ProGamerGov closed this May 9, 2022
@ProGamerGov ProGamerGov force-pushed the optim-wip-crop-improvements branch from c20357d to cd672a0 Compare May 9, 2022 19:20
@ProGamerGov ProGamerGov reopened this May 9, 2022
@ProGamerGov ProGamerGov force-pushed the optim-wip-crop-improvements branch 2 times, most recently from a061b57 to b2e0015 Compare May 10, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants