-
Notifications
You must be signed in to change notification settings - Fork 328
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
[AutoAugment] Add Rotate operation. #402
Comments
It looks like linked implementation uses |
Yes, honestly it already fails on master to optimize the performance without XLA (as many other ops that we currently use): See also my rationale at: |
P.s there is a partial coverage effort (translation only) with tensorflow/tensorflow#55335 but for MLIR (as XLA is still a different code path today in TF) |
Hi @sebastian-sz! Is this different from the RandomRotation KPL? We can use utils.transform however needed if we must. |
@LukeWood In terms of using the layer as a part of AutoAugment I do believe this is different. For instance, with default KLP we cannot directly control the probability as well as "angles" parameter at which the Rotation's are applied, which is necessary in the AutoAugment pipeline. |
I have added some utils from keras that are required for the rotation and the translation as part of #407, if that's any help. I too had to code the rotate operation for AugMix. This layer may be useful. |
Is there any use case we can think of that requires this to be a layer; in particular: will you ever want to preprocess your inputs by ALWAYS rotating by X deg? If not, maybe it is best as a preprocessing util |
True, it makes no sense to rotate images at a fixed angle. This util may be useful* |
@LukeWood yes - this is actually the case in AutoAugment, where you want to rotate the image by X degrees based on subpolicy's magnitude: @quantumalaviya Thanks for linking #407 I didn't know about it and it looks like exactly the thing needed. I agree that this function doesn't need to be a KLP and is good enough as a utility function. |
Cool, let’s leave it open until we can merge @quantumalaviya ’s PR and actually include the utility to rotate an image a fixed amount |
Hey @sebastian-sz for now lets close this until we decide to fully pursue AutoAugment! If someone wants to pursue it, we can discuss but for now we are just recommending the use of RandAugment as it's search space is MUCH easier to traverse. Cheers! |
@LukeWood absolutely! Upon further reading I even think that current Rotate ops are sufficient for this. |
* Fix typo in functional model input flattening * Add unit test
Short Description
Rotate is one of the operations used by AutoAugment. Currently it's not present in
keras_cv
, so AutoAugment cannot be implemented.What it does
From Tensorlfow Addons docs: Rotate image(s) counterclockwise by the passed angle(s) in radians.
Papers
AutoAugment: Learning Augmentation Strategies from Data
arxiv link
Existing Implementations
Tensorflow addons
tensorflow/tpu
Other Information
RandomRotation
as we need to be able to control the probability at which the op is applied.Rotation
?The text was updated successfully, but these errors were encountered: