adversarial-robustness-toolbox
adversarial-robustness-toolbox copied to clipboard
TensorFlow Addons is end of life in May 2024
TensorFlow Addons (TFA) has ended development and introduction of new features. TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024. Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP).
For more information see: https://github.com/tensorflow/addons/issues/2807
What are the plans for removing/replacing TFA?
I had a little look at this and I thought that the easiest solution was probably to vendor the functions from tfa.image
that are used in this framework. What do you think?
I think they are (based on https://github.com/search?q=repo%3ATrusted-AI%2Fadversarial-robustness-toolbox+tfa.&type=code):
-
tfa.image.random_cutout
-
tfa.image.median_filter2d
-
tfa.image.transform
-
tfa.image.rotate
See also https://github.com/tensorflow/addons/issues/2845
Hi @jamesmyatt Thank you for the update, we have noticed it too. I'm currently working on updating ART and it's testing for Tensorflow 2.14. I have not yet found replacement function for all functions we use from TFA. Would you be interested to take a closer look at ART's dependencies and how to best replace them?
I think that:
-
tfa.image.transform
-> Keras has a function that appears to match (https://github.com/keras-team/keras/blob/v2.14.0/keras/layers/preprocessing/image_preprocessing.py#L720) -
tfa.image.rotate
-> can be implemented via the transform function above (c.f. https://github.com/keras-team/keras/blob/68f9af408a1734704746f7e6fa9cfede0d6879d8/keras/layers/preprocessing/image_preprocessing.py#L987). Although the layer could probably be refactored to extract the random rotation (https://keras.io/api/layers/preprocessing_layers/image_augmentation/random_rotation/) -
tfa.image.random_cutout
-> Keras CV (https://keras.io/api/keras_cv/layers/preprocessing/random_cutout/) -
tfa.image.median_filter2d
-> probably just copy-and-paste this or replace it with a different filter from tfio.experimental.filter