how to create an image augementation code example

Example 1: image augmentation

datagen = ImageDataGenerator()datagen.fit(train)X_batch, y_batch = datagen.flow(X_train, y_train, batch_size=batch_size)model.fit_generator(datagen, samples_per_epoch=len(train), epochs=epochs)

Example 2: keras image preprocessing

keras.preprocessing.image.ImageDataGenerator(featurewise_center=False, samplewise_center=False, featurewise_std_normalization=False, samplewise_std_normalization=False, zca_whitening=False, zca_epsilon=1e-06, rotation_range=0, width_shift_range=0.0, height_shift_range=0.0, brightness_range=None, shear_range=0.0, zoom_range=0.0, channel_shift_range=0.0, fill_mode='nearest', cval=0.0, horizontal_flip=False, vertical_flip=False, rescale=None, preprocessing_function=None, data_format='channels_last', validation_split=0.0, interpolation_order=1, dtype='float32')