0

At this point of time the following works perfectly when it comes to data augmentation

datagen = ImageDataGenerator(
    rotation_range=20, # randomly rotate images by up to 20 degrees
    width_shift_range=0.1, # randomly shift images horizontally by up to 10%
    height_shift_range=0.1, # randomly shift images vertically by up to 10%
    shear_range=0.2, # apply random shear transformations
    zoom_range=0.2, # randomly zoom into images by up to 20%
    horizontal_flip=True, # randomly flip images horizontally
    fill_mode='nearest', # fill any empty pixels with the nearest value
    rescale=1./255,
    validation_split=0.2
)

However, if I would want to implement augmentation techniques which involve 2 images, such as mix up and cut mix image augmentation, I am not sure how would we do that using image datagenerator Thanks for the attention

ps:

cut mix : CutMix is an image data augmentation strategy. Instead of simply removing pixels as in Cutout, we replace the removed regions with a patch from another image.

Mix Up : Mixup is a data augmentation technique that generates a weighted combination of random image pairs from the training data

Sadaf Shafi
  • 1,016
  • 11
  • 27

0 Answers0