This is the code for svae the Image generate by the ImageDataGenerator, the file will save follow by your origin file tree.
Why for doing this?
It is so slow when using ImageDataGenerator: 3 second for a epochs > 60 second for a epochs...
Also some image after augmentation it is being a no use data, so saving the image can let me traning faster and the quality of image will be better after human filtering.
Before using please install the following package:
scipy
tensorflow
keras
numpy
scipy
Pillow
Using the test_set for example:
It has two class: cats, dogs
After running the program:
We can have the new data
The output number of the image can be calculate by:
Number in origin file* rate* batch_size* range