Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Idea for Keras Preprocessing API #13

Open
PhilipMay opened this issue Nov 7, 2019 · 7 comments
Open

Idea for Keras Preprocessing API #13

PhilipMay opened this issue Nov 7, 2019 · 7 comments

Comments

@PhilipMay
Copy link

As far as I know (in the new RFC Keras Preprocessing API) the different augmentation layers (flip, roation, ...) are always used after each other. But what about the following idea:

If you could configure a certain percentage for each layer that gives the chance to activate this layer. This way not all layers are activated the same time. The advantage is that you could configure more agressive augmentation values per layer but do not "overaugment" the images.

My assumption is that this would bring a wider range of different images and improves augmentation with better cnn performance (accuracy or whatever).

What do you think?

@PhilipMay PhilipMay changed the title Idear for Keras Preprocessing API Idea for Keras Preprocessing API Nov 7, 2019
@RaphaelMeudec
Copy link

RaphaelMeudec commented Nov 12, 2019

I agree with this, I've always loved how imgaug pipelines are built. A problem I have with the ImageDataGenerator as of today is that you can't set the randomization of the augmentations, nor define a maximum number of augmentations to perform. It can lead to too much data augmentation and force to select smaller ranges for each augmentation.

@PhilipMay
Copy link
Author

What do others think about this? @fchollet @karmel , ...

@Dref360
Copy link

Dref360 commented Nov 13, 2019

Unfortunatly, the last Keras community meeting was cancelled due to TF Summit, I'll raise this issue during the next one.
Sorry for the delay.

@Dref360
Copy link

Dref360 commented Nov 13, 2019

With the new API, this could be done using a K.switch right?

@bhack
Copy link
Contributor

bhack commented Nov 19, 2019

For who Is interested also in autoaugmentation there is a thread in keras-team/autokeras#828 (comment)

@RaphaelMeudec
Copy link

@Dref360 Do you know when will be the next Keras community meeting? By the way, I'm not sure Keras is the best place to hold a flexible data augmentation pipeline. It would make more sense to hold it in tf.data or as part of the tensorflow/addons (cc @seanpmorgan) to begin with?

@LukeWood
Copy link

As far as I know (in the new RFC Keras Preprocessing API) the different augmentation layers (flip, roation, ...) are always used after each other. But what about the following idea:

If you could configure a certain percentage for each layer that gives the chance to activate this layer. This way not all layers are activated the same time. The advantage is that you could configure more agressive augmentation values per layer but do not "overaugment" the images.

My assumption is that this would bring a wider range of different images and improves augmentation with better cnn performance (accuracy or whatever).

What do you think?

Hey Phillip! I know it has been a long time, but check out what we have done in KerasCV! KerasCV API Docs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants