Data augmentation in deep learning I am working on a deep learning project for face recognition. I am using the pre-trained model VGG16.

The dataset has around 100 classes, and each class have 80 images. I split the dataset 60% training, 20% validation, 20% testing. I used data augmentation (ImageDataGenerator()) to increase the training data.

The model gave me different results when I change ImageDataGenerator() arguments. See the following cases:

Case1:

 train_datagen = ImageDataGenerator(
    rotation_range=15,
    width_shift_range=0.2,
    height_shift_range=0.2,
    shear_range=0.2,
    zoom_range=0.2,
    horizontal_flip=True,
    fill_mode='nearest')
validate_datagen = ImageDataGenerator()
Test_datagen = ImageDataGenerator()


Case1 result: High training accuracy and validation accuracy, but the training accuracy is lower. check the following image:




Case2:

train_datagen = ImageDataGenerator(
      rescale=1./255,
      shear_range=0.2,
      zoom_range=0.2,
      horizontal_flip=True)

validate_datagen = ImageDataGenerator()
    Test_datagen = ImageDataGenerator()


Case2 result: Overfitting. check the following image:



Case3:

train_datagen = ImageDataGenerator(
      rescale=1./255,
      shear_range=0.2,
      zoom_range=0.2,
      horizontal_flip=True)

validate_datagen = ImageDataGenerator(rescale=1./255)
    Test_datagen = ImageDataGenerator(rescale=1./255)


Case3 result: High training accuracy and validation accuracy, but the training accuracy is lower.. check the following image:



1-  Why does using augmentation in validation and testing data ImageDataGenerator(rescale=1./255) in case3 give different result than case2?

2- Is adding ImageDataGenerator(rescale=1./255) to the testing and validation better than not adding it?

3- Do you think there is a problem in the result of the first case?
1 and 2: If you rescale you images, you should do it on all partitions: training, validation and test. If you only rescale your images on the training set, then your network will see very different values (0~255, vs 0.0~1.0) on validation/test set and therefore give poor accuracy. That's your case 2.
I don't see any obvious problem.