Insufficient Data
This brings us to the next aspect of data pre-processing- data augmentation. Many times, the quantity of data that we have is not sufficient to perform the task of classification well enough. In such cases, we perform data augmentation.
As an example, if we are working with a dataset of classifying gemstones into their different types, we may not have enough number of images (since high- quality images are difficult to obtain). In this case, we can perform augmentation to increase the size of your dataset.
Let’s have Rohit demonstrate this.
As you know that pooling increases the invariance. If a picture of a dog is in the top left corner of an image, with pooling, you would be able to recognize if the dog is in little bit left/right/up/down around the top left corner. But with training data consisting of data augmentation like flipping, rotation, cropping, translation, illumination, scaling, adding noise etc., the model learns all these variations. This significantly boosts the accuracy of the model. So even if the dog is there at any corner of the image, the model will be able to recognize it with high accuracy.
Do these practice questions to revise some of the concepts you just learnt about augmentation.
More Augmentations
Let’s continue with some more augmentations and transformations.
In this page, you learnt about augmentations. This should be used whenever our training data is small and we need to give the classifier more instances as training examples. There are mainly two types of augmentations:
- Linear Transformations
- Affine Transformations
Practice Questions
Attempt the following questions. The solutions to these are available on the next page. We strongly urge you to try out these problems before viewing the solutions:
- Write code to perform a left-right flip, followed by an up-down flip to the same image.
- Normalise the image using 25th and 75th percentiles.
- Perform a 90-degree rotation, and follow it up with a 4x zoom-in.
Coming Up
We are finished with pre-processing techniques. On the next page, we’ve given you the solutions to the practice questions. After this, we’ll move to network building, starting from an understanding of ResNet.
Report an error