Computer Vision News - September 2019

Project We Tried for You 18 There are several additional augmentations we can perform, such as rotations of the image, zooming, crops, flips rescaling and whitening. Using the following command, we can create multiple augmentations on the same generator call: Now, after we understood how the data generator works, we will use it to demonstrate how effective it is. The experiment that we perform is as follows: we take a VGG16 pretrained model (to avoid the training of a full model) and we use it to classify images from the dogs vs cats dataset. We first train our network without data augmentations. Then we augment data and train it again. This should boost the performance of our network. We added the code of the network with the full augmentations at the end of this article. 1 data_generator = ImageDataGenerator(brightness_range = [ 0.5 , 1.5 ]) 1 2 3 4 5 6 7 data_generator = ImageDataGenerator(rotation_range = 90 , width_shift_range = 0.1 , height_shift_range = 0.1 , shear_range = 0.2 , zoom_range = 0.2 , horizontal_flip = True , fill_mode = 'nearest' )

RkJQdWJsaXNoZXIy NTc3NzU=