-
Notifications
You must be signed in to change notification settings - Fork 615
[1/2] Add Image Ops for Data Augmentation #1333
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
Comments
Ok So these unchecked options are remaining. But what is PIL does it stands for Pillow or something else. And i have to implement these in autoaugment.py am i right. |
That's right, but the appropriate namescapes and where to place these operations is something that can be discussed here or on your PR. |
Ok so for now i just need to make a script for these operations and after that we decide that where to put them all. So all these operations are have to be integrated in one script or i have to make a different scripts for all of them. |
Yeah, as long as the public API stays the same and is decided first, it's not critical how you name your files. |
@gabrieldemarmiesse : I have some doubts so we have to use the tensorflow for doing these operations or we are free to use any module. |
You should always use tensorflow to make those ops (so they can run on tpu/cpu/cuda/ROCm and can be exported in a graph and have gradients and many other things... ) and where you put the ops is not critical (meaning we care more about the pull request being merged than about the name of the file, as it can be changed later without impacting the API). You can group ops together in the same file if you feel this is the right move. Prefer using python only if possible. |
Ok and what about Tensorflow version shall i need to take care about the version also or i can use any version of Tensorflow. |
We currently test with tensorflow 2.1.0 and 2.2.0rc0 |
ok thank you |
@gabrieldemarmiesse : Do we have a pre defined gaussian filter in tensorflow or any similar to this or i just need to make a filter in order to blur the images. |
Just to compare to this ops checkbox list with RemixMatch/FixMatch https://github.com/google-research/remixmatch/blob/master/libml/augment.py#L36-L41 |
Here the EfficientDet Autoaugment ops list https://github.com/google/automl/blob/master/efficientdet/aug/autoaugment.py#L43-L153 |
@bhack |
@vinayvr11 I think it could be interesting to make a new list expecially for BBox ops in EfficentDet in a new ticket and instead extend the list here for image ops. But you need to double check the overlapped ops for these lists. |
Thank you @bhack i want to know one thing can i use numpy for making some ops. |
@vinayvr11 I think the same as #1333 (comment) |
ok so do we have any filter operation in tensorflow_addons or i have to add that from scratch. |
No idea. You can look in the source code, I don't know all the functions by heart haha |
@vinayvr11 We had an Averaging filter already integrated. See also #358 |
/cc @parth-p |
Thank you |
As Google is a little bit evolutionary fragmented.. 😜 We have others recent interesting augmentations to be double checked for overlaps in https://github.com/google-research/simclr/blob/master/data_util.py. There you can find also Tensorflow impl. of Gaussian Blur. /cc @chentingpc |
So shall i stop working on this blur ops because i just made a script for blurring using mean_filter. |
Use that impl as a reference to add Gaussian Blur. |
sure thanks |
Can we complete at least the unique ops list in checkbox list for image ops in all these source? |
Thank you for that @abhichou4 i made a gaussian blur script for Tensorflow addons can i send the PR of that. |
@abhichou4 Can you edit the ticket to expand the list? RemixMatch/FixMatch:
Then SimCLR.. |
Ok so i need this for color can i just assume this and send a PR or wait for merge. |
@abhichou4 : Can i use the random image like you generated in your test script or the repository test_data image. |
|
I believe |
Yes, same here but i only test the operation on one image Yellow_smiley_face.png as this is the smallest one. |
I have added the test file as well please check that. |
@abhichou4 : posterize is also done please check that. |
Could you please merge my commits they have passed all tests. |
Just for the note... there are many other interesting augmentations operations that could be inspired by https://github.com/aleju/imgaug (It works also on other datatypes like heatmaps, keypoints etc..). |
@abhichou4 @vinayvr11 @bhack The checklist above should only be ticked once the PR has been merged. I've unselected all the open PRs. Also, please open a single PR for each image op, even if it's a simple op. It makes it super tough to review when 4/5 ops are combined into a single PR. @abhichou4 I'm closing #1352 since it's WIP, and implements multiple ops. Create separate issues. |
@Squadrick Thanks but I have not the privilege level to tick the checklist 😉 |
Per #1226 (comment) the autoaugment/randaugment features will be a part of https://github.com/keras-team/keras-cv Apologies for not being able to present this information sooner to the contributors. |
Part 2: #1353
As part of #1226, relevant image ops need to be added to
tfa.image
. List of ops tracked in this issue (tick the op only once the corresponding PR is merged):Reference: https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/autoaugment.py
The text was updated successfully, but these errors were encountered: