简体   繁体   中英

ImageDataGenerator in Keras

I am using Keras functionality ImageDataGenerator() to generate training and validation dataset. I an trying to understand what this function does internally. What are the preprocessing steps does this function perform? Where can I find the source code of this function?

You can find any source code at:

Here is the ImageDataGenerator:

The keras documentation page also has links that lead you there:

Internally, the ImageDataGenerator will make a series of different data augmentation procedures on images that you provide, and also prepare a python generator for you to use when fitting your models.

There are several data augmentation methods to use, you can have an idea of what they are in the help page above.

Generators are used to create batches in a loop. In this case, one batch of images at a time.

Instead of using model.fit() , you will use model.fit_generator() with either ImageDataGenerator.flow() or ImageDataGenerator.flow_from_directory() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM