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

Q: how to turn off automatic data augmentation of ImageDataGenerator? #329

Open
mw66 opened this issue Dec 26, 2020 · 0 comments
Open

Q: how to turn off automatic data augmentation of ImageDataGenerator? #329

mw66 opened this issue Dec 26, 2020 · 0 comments
Labels
image Related to images

Comments

@mw66
Copy link

mw66 commented Dec 26, 2020

when I don't set any parameter to the ImageDataGenerator, e.g.

      trn_datagen = ImageDataGenerator()

I still found tmp files are written to (trn_datagen.flow_from_dataframe) save_to_dir.

But I do not want the ImageDataGenerator perform any data augmentation.

I will do it all by myself in my problem domain, and just provide the filenames to flow_from_dataframe, and want the ImageDataGenerator just use those files as it is.

  1. Is there any option I can completely turn off automatic data augmentation of ImageDataGenerator?

  2. a related question: do I need to do this rescale? what's the difference between setting, or not setting rescale?

      trn_datagen = ImageDataGenerator(rescale=1.0/255.0)

If I set this rescale, is it the only transformation that ImageDataGenerator will perform? and does this rescale also count as data augmentation?

I want to distinguish between two set of operations:
-- transformation:, e.g. rescale user explicitly choose to do so, which does not actually change the input data.
-- augmentation: e.g. rotate, or flip, which actually change the input image, and does not make any sense in my problem domain (and crop image is big NO NO).

I my problem domain, I want completely disable data augmentation, and I will explicitly do data transformation myself.

So what's the flags I should pass to ImageDataGenerator?

Thanks.

@mw66 mw66 added the image Related to images label Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
image Related to images
Projects
None yet
Development

No branches or pull requests

1 participant