Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.
This repository was 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

Description

@mw66

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    imageRelated to images

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions