I always wanted to use RandAugment to improve the robustness of my vision models. But never found a straightforward example that showed how to use it in the context of TensorFlow and Keras.
Now, together with the community, we have one such example showing a clear advantage of RandAugment for improving the robustness of vision models:
The example shows how to use the imgaug library together with tf.py_function inside tf.data pipelines. Of course, it has its own demerits. But hey, that’s life!
Certainly yes and I note that in the example itself. However, the example is more focused on readability and ease of use. I didn’t find the official one that you shared to not that easy-to-use.
But I am interested to know more. Feel free to provide a minimal example of using the official one if you have time.
That seems like something we could mention in the image data augmentation tutorial. I’m sure some users end up on that page looking for RandAugment or another higher level function and are disappointed.
I think the main issue there Is that externally, to the users, Is not clear if we want that tf-models could be used also as library or if we are waiting that keras, keras-cv and keras-nlp will be standalone.
On a related note, here’s a tutorial that shows the use of RandAugment from TensorFlow Model Garden, thereby allowing for faster training with TPUs (since it is implemented using native TF ops):