divamgupta / image-segmentation-keras

Implementation of Segnet, FCN, UNet , PSPNet and other models in Keras.
https://divamgupta.com/image-segmentation/2019/06/06/deep-learning-semantic-segmentation-keras.html
MIT License
2.92k stars 1.16k forks source link

Data augmentation. Does it artificially expand the dataset? #358

Closed chan-wm closed 2 years ago

chan-wm commented 2 years ago

Having read through the code, I thought that "IMAGE_AUGMENTATION_NUM_TRIES = 10" from "https://github.com/divamgupta/image-segmentation-keras/blob/master/keras_segmentation/data_utils/augmentation.py" might indicate the number of augmented images generated from one single original image. However, I don't think that this is the case. Could someone confirm if the dataset is expanded or does it still stay the same size. I can see that the images fed in are augmented but I don't think the dataset size is increased.

divamgupta commented 2 years ago

The augmentation happens during training time for all the training batches. The image is augmented on every minibatch of training.