Skip to content

cleanup prototype auto augment transforms #6463

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

Merged
merged 5 commits into from
Aug 23, 2022

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Aug 22, 2022

While going through the codebase with @vfdev-5 and @datumbox, we noticed that the auto augment transforms were not using the _get_params / _transform idiom. Looking into it, I don't think there is currently a reason to not do that. I guess this was a limitation of the past design.

datumbox
datumbox previously approved these changes Aug 22, 2022
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

image = pil_to_tensor(orig_image)
def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
if isinstance(inpt, features.Image) or is_simple_tensor(inpt):
image = inpt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We should start renaming image to inpt. Videos will be passed here soon.

@datumbox datumbox dismissed their stale review August 22, 2022 15:46

refactoring needed

@pmeier pmeier requested a review from datumbox August 23, 2022 08:48
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to merge on green CI.

@pmeier pmeier merged commit d8025b9 into pytorch:main Aug 23, 2022
@pmeier pmeier deleted the cleanup-autoaugment branch August 23, 2022 09:18
pmeier added a commit to pmeier/vision that referenced this pull request Aug 25, 2022
facebook-github-bot pushed a commit that referenced this pull request Aug 25, 2022
Summary:
* cleanup prototype auto augment transforms

* remove custom fill parsing from auto augment

Reviewed By: datumbox

Differential Revision: D39013684

fbshipit-source-id: d0fd5329d9a672024dc0659f1153e8833e35622c
datumbox added a commit that referenced this pull request Aug 25, 2022
* fix passtrough on transforms and add dispatchers for five and ten crop

* Revert "cleanup prototype auto augment transforms (#6463)"

This reverts commit d8025b9.

* use legacy kernels in deprecated Grayscale and RandomGrayscale transforms

* fix default type for Lambda transform

* fix default type for ToDtype transform

* move simple_tensor to features module

* [skip ci]

* Revert "move simple_tensor to features module"

This reverts commit 7043b6e.

* cleanup

* reinstate valid AA changes

* address review

* Fix linter

Co-authored-by: Vasilis Vryniotis <[email protected]>
facebook-github-bot pushed a commit that referenced this pull request Aug 30, 2022
Summary:
* fix passtrough on transforms and add dispatchers for five and ten crop

* Revert "cleanup prototype auto augment transforms (#6463)"

This reverts commit d8025b9.

* use legacy kernels in deprecated Grayscale and RandomGrayscale transforms

* fix default type for Lambda transform

* fix default type for ToDtype transform

* move simple_tensor to features module

* [skip ci]

* Revert "move simple_tensor to features module"

This reverts commit 7043b6e.

* cleanup

* reinstate valid AA changes

* address review

* Fix linter

Reviewed By: NicolasHug

Differential Revision: D39131014

fbshipit-source-id: 0237a0e2a8256cf7ec5f5bc3b529e471c465ea04

Co-authored-by: Vasilis Vryniotis <[email protected]>
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.

4 participants