Computer Vision News - September 2019
Fruit sorting and grathing Data augmentation with Keras 19 Note that we used the VGG16 and froze all its layers. We added a fully connected layer at the end, in order to output a binary classification. The variables train_it and val_it are iterator objects that iterate through our training and validation data. At the end, we plot the history of the training procedure. Results We trained our network for 50 epochs on a small portion of the dog versus cats dataset (1000 images for each class). The first training has been done on the data without the augmentations. This is done by setting the variable datagen = ImageDataGenerator(). We used 100 examples from each class as a test/validation set. The history of the training can be seen below: It can be seen that we have made a nice overfitting. Our training accuracy/ loss increases/decreases while the same value on the test data doesn't change. This is simply because we don't have enough training examples to generalize well. Although we trained a small number of parameters, we still need to use more than 1000 examples to train the network. "The goal in data augmentation is to generate new examples without changing the class label of the data"
Made with FlippingBook
RkJQdWJsaXNoZXIy NTc3NzU=