This repository was archived by the owner on Sep 18, 2024. It is now read-only.
Open
Conversation
This will help us add a list of custom transformations on images
Contributor
|
Hello! Recently, the TF team released Keras Preprocessing Layers which would apply transformations after the data augmentation (to add further transformations for example). Is there a use-case where these layers are not working for you? If so, could you describe them so that we can fix that? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR will help us apply custom transformations to the images at the time of data augmentation.
Introduces a new argument, list_of_custom_transformations, in
ImageDataGenerator, wherein we can pass a list of all the custom transformations that we want to apply to the images.For Example:
Consider the following custom transformations:
Now the above two custom transformations are to be passed to
list_of_custom_transformationswhile instantiatingImageDataGeneratoras shown below:And then the subsequent steps are as usual:
I believe this feature will help us during the research phase of a project for trying out new and custom transformations.
I have not added new tests for this feature yet. So, for you to test this out I have created this Colab Notebook. It includes demo transformations and visualizations.
This is my first PR and I am still figuring out the best practices for adding new tests and updating the docs. So, it would be very helpful if someone can share some useful links to articles on creating new unit tests.
This new feature has passed all the existing tests.
Also, I didn't understand the 3rd point in the PR Overview below. So, pls help me out with that too 😄
PR Overview