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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(OD input pipeline Step 3/4) Add RandomAspectRatio layer #1054

Merged
merged 23 commits into from
Dec 10, 2022

Conversation

LukeWood
Copy link
Contributor

@LukeWood LukeWood commented Nov 28, 2022

This PR adds a RandomAspectRatio layer that takes a Dense image tensor and always outputs a ragged tensor of aspect-ratio distorted images.

JitteredResize does not tweak aspect ratios, so we can use this layer to fill all aspect ratio distortion based needs across tasks.

@LukeWood LukeWood force-pushed the aspectetc branch 3 times, most recently from 25dc0b0 to df3782b Compare December 7, 2022 18:23
@LukeWood LukeWood changed the title (Step 3/3) Add ragged augmentation layers (Step 3/4) Add RandomAspectRatio layer Dec 7, 2022
@LukeWood LukeWood changed the title (Step 3/4) Add RandomAspectRatio layer (OD input pipeline Step 3/4) Add RandomAspectRatio layer Dec 7, 2022
@LukeWood
Copy link
Contributor Author

LukeWood commented Dec 7, 2022

ok @ianstenbit @tanzhenyu @qlzh727 I believe this is prepared!

@LukeWood
Copy link
Contributor Author

LukeWood commented Dec 7, 2022

/gcbrun

Copy link
Contributor

@tanzhenyu tanzhenyu left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Implementation wise looks good to me.
Can you add a description on why we need this? (AFAIK, the OD models are expected to train well on JitteredResize layer?)

@LukeWood
Copy link
Contributor Author

LukeWood commented Dec 9, 2022

Thanks for the PR! Implementation wise looks good to me. Can you add a description on why we need this? (AFAIK, the OD models are expected to train well on JitteredResize layer?)

Sure thing, I updated a bit but JitteredResize doesn't touch aspect ratio whereas this ONLY touches aspect ratio.

@LukeWood LukeWood merged commit b0039e2 into keras-team:master Dec 10, 2022
@LukeWood LukeWood deleted the aspectetc branch December 10, 2022 19:13
ghost pushed a commit to y-vectorfield/keras-cv that referenced this pull request Nov 16, 2023
…1054)

* Add ragged image augmentations

* Add ragged image augmentation support

* Add ragged image test

* Reformat and fix

* Batchwise support

* Add resize with pad only support

* Remove pad only

* Remove pad only

* Add JitteredResize layer

* Add jittered resize to ragged image test

* Add jittered resize to serialization test

* Add ragged augmentation layers

* Add ragged image test

* checkout origin/master -- files

* Begin adding unit tests

* Update converter for bounding boxes

* Add mixed precision test

* Add serialization test

* Update ragged crop

* Fix lint

* Fix

* Seed fix

* Add serialization test
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

Successfully merging this pull request may close these issues.

2 participants