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

Add VectorizedBaseImageAugmentation layer #1373

Merged
merged 32 commits into from
Feb 9, 2023

Conversation

LukeWood
Copy link
Contributor

@LukeWood LukeWood commented Feb 8, 2023

Figure_1

Old non-graphmode basescale is like 100s runtime so not even comparable.

@LukeWood
Copy link
Contributor Author

LukeWood commented Feb 8, 2023

/gcbrun

@LukeWood LukeWood requested a review from ianstenbit February 8, 2023 19:20
@LukeWood LukeWood changed the title Add ragged image to BatchedBaseImageAugmentation layer Add VectorizedBaseImageAugmentation layer Feb 8, 2023
Copy link
Contributor

@ianstenbit ianstenbit left a comment

Choose a reason for hiding this comment

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

Tagging related issues:
#581
#241

@LukeWood LukeWood requested a review from ianstenbit February 9, 2023 00:27
@LukeWood
Copy link
Contributor Author

LukeWood commented Feb 9, 2023

/gcbrun

1 similar comment
@LukeWood
Copy link
Contributor Author

LukeWood commented Feb 9, 2023

/gcbrun

Copy link
Contributor

@ianstenbit ianstenbit left a comment

Choose a reason for hiding this comment

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

LGTM once the GPU tests are passing.

benchmarks/vectorized_grayscale.py Outdated Show resolved Hide resolved
@LukeWood
Copy link
Contributor Author

LukeWood commented Feb 9, 2023

/gcbrun

@LukeWood
Copy link
Contributor Author

LukeWood commented Feb 9, 2023

/gcbrun

@LukeWood
Copy link
Contributor Author

LukeWood commented Feb 9, 2023

Grayscale test passed --- root cause is that on GPU tf.image.grayscale is not memory efficient. in practice this barely matters because in tf.data we force CPU scope. If users request we can come up with a fix using pure tf-ops instead of tf.image ops

@LukeWood LukeWood merged commit 08ca8d6 into keras-team:master Feb 9, 2023
@LukeWood LukeWood deleted the raggedimgs branch February 9, 2023 02:08
@ianstenbit ianstenbit mentioned this pull request Feb 9, 2023
ghost pushed a commit to y-vectorfield/keras-cv that referenced this pull request Nov 16, 2023
* implement vectorized base image augmentation layer

* Implement vectorized RandomContrast layer

* KPL performance

* Random contrast vectorized

* Vectorized contrast

* Fix vectorized base layer

* Fix vectorized base layer

* Add vectorized grayscale layer

* Remove random contrast

* Remove random contrast

* test_preserves_ragged_status_Grayscale

* test_preserves_ragged_status_Grayscale

* Fix

* Fix masks

* Fix masks

* rename to 'batched'

* Fix docstrings

* Fix docstrings

* Remove ragged method

* Begin ragged image support

* Begin ragged image support

* Begin ragged image support

* Begin ragged image support

* Begin ragged image support

* Performance benchmark

* Reformat

* Vectorized grayscale

* Fix ragged test case

* Fix ragged test case

* Fix ragged test case

* Fix ragged test case

* Fix ragged test case
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