What is data augmentation?
Data augmentation refers to techniques that are used to add slightly edited versions of existing data or create synthetic data by using existing data, thereby increasing the actual amount of data available.
It is used to make your model’s training sets more diverse by using random, yet realistic data transformation, such as flipping or rotating images.
Essentially, you could consider data augmentation to be an approach of synthesizing new data from existing data.
What is the purpose of data augmentation in computer vision?
In computer vision data augmentation (image augmentation here) is done for the purpose of generating a synthetic dataset that is more vast than the original dataset. It aims to improve the downstream performance of your model.
Data augmentation is done because augmenting the images will create a bigger dataset that will generalize in a better manner to situations that the model could encounter in production.
The usefulness of various data augmentation varies in different situations.
Why is data augmentation important?
The accuracy of predictions in supervised Deep Learning models depends to a large extent on the amount of data available to the model during training and the level of diversity in that data.
You could literally consider data to be fuel for deep learning models. Greater volumes of diverse data lead to increasingly accurate predictions.
But collecting data is not a cakewalk, and labeling it isn’t easy either. It is a process that drains a lot of energy and money. And that is where data augmentation comes into the picture.
Data augmentation techniques increase the precision and robustness of the deep learning models by creating variations of the data that the model might encounter in the real world.
Does data augmentation reduce overfitting?
Data augmentation involves increasing the size of the data by increasing the number of images that are present in the dataset. By making use of data augmentation, a large number of similar images could be generated. This increases the size of the dataset. As more data is added, the model gets to forced to generalize because it won’t be able to overfit all the samples. This is how data augmentation manages to reduce and even minimize overfitting.
Can data augmentation be bad?
You need to make sure to balance bias with variance. Data augmentation does have an explicit regularization effect, but exploiting it could potentially result in the model learning less than it should, thus leading to substandard prediction results.
You need to try out various combinations of data augmentation so that you can find the one that is most appropriate for the data set of the problem statement.
What are the benefits of data augmentation?
Here are the main advantages of increasing the amount of training data a deep learning model has available to it by using data augmentation techniques:
- It increases the model’s ability to generalize
- It adds variability to the data and minimizes data overfitting
- It saves on the cost of collecting and labeling additional data
- It improves the accuracy of the deep learning model’s predictions
What are the drawbacks of data augmentation?
- Systems need to be put in place to assess and evaluate the quality of augmented datasets.
- Augmented datasets will carry the biases of the existing datasets. It is important to develop strategies to avoid bias.
What are the data augmentation techniques?
Here are some of the common data augmentation techniques used on images:
Flipping
This involves flipping images horizontally and vertically. The data augmentation factor could range from 2x to 4x.
Rotation
This is all about rotating your images. But there is a risk that your image dimensions might get changed. However, there are ways to work around that. The data augmentation factor only again ranges between 2x and 4x.
Scaling
You can scale your images inwards or outwards. While scaling them inwards, the image size is reduced, and while scaling them outwards, the image size would increase.
Cropping
This technique involves randomly sampling any section from the original image and then resizing it to the original image size. The technique is also referred to as random cropping.
Translation
This is just moving the image along the X or Y axis. It could even involve moving the image along both directions. It gives convolutional neural networks no choice but to look everywhere.
Gaussian noise
When your neural network tries to learn high frequency features you may face over-fitting issues. Because Gaussian noise has data points in all frequencies it distorts the high-frequency features as well as the lower frequency features.
Mixing in an appropriate amount of noise can improve your neural network’s learning capability.
Brightness
This revolves around making the image darker or lighter than the original image.
Hue
Changing the hue (or the shade) of the colours in the image.
Contrast
This involves changing the degree of separation between the darkest and brightest areas of an image.
Saturation
This technique is about changing the separation between colors of an image.
Grayscale
The data can even be augmented by making the image grayscale.
Generative Adversarial Networks
Generative Adversarial Networks can transform images from one domain into images from another domain.
Neural style transfer
Neural style transfer technique combines the content of one image with the style of another image.
What is offline data augmentation?
Offline data augmentation, also known as dataset generation, makes it possible for the programmer to save the images that were augmented directly on the disk. The methods and techniques used to carry out online data augmentation can also be used to perform offline data augmentation.
The augmented images are obtained after applying the data augmentation techniques on every training image. It increases the diversity of the dataset and the robustness of the model. Offline data augmentation can be used to improve the number of images in the dataset.
You could even combine offline and online data augmentation, storing the images on the disk during offline data augmentation and then mixing them with the original dataset and applying online data augmentation.