Image Augmentation Techniques for Training Deep Learning Models
- Image augmentation is an efficacious technique when we don’t have an ample amount of data for training a deep learning model
- Learn different techniques of image augmentation to artificially expand your image dataset
A deep learning model generally works well when it has a huge amount of data. In general, the more data we have better will be the performance of the model.
Note: If you are more interested in learning concepts in an Audio-Visual format, We have this entire article explained in the video below. If not, you may continue reading.
In the above graph, we can see that as the amount of data increases the performance of the deep learning model also improves. But acquiring a massive amount of data comes with its own challenges. Every time it is not possible to have a large amount of data to feed the deep learning network.
The problem with the lack of a good amount of data is that the deep learning model might not learn the patterns or the functions from the data and hence it might not perform well.
So how can we deal with this? So instead of spending days manually collecting the data, we may use Image Augmentation techniques.
What is Image Augmentation?
Image augmentation is a technique of altering the existing data to create some more data for the model training process. In other words, it is the process of artificially expanding the available dataset for training a deep learning model.
In this picture, the image on the left is only the original image, and the rest of the images are generated from the original training image.
Since all these images are generated from training data itself we don’t have to collect them manually. This increases the training sample without going out and collecting this data. Note that, the label for all the images will be the same and that is of the original image which is used to generate them.
Different Image Augmentation Techniques
Now let us look at different image augmentation techniques
one of the most commonly used augmentation techniques is image rotation. Even if you rotate the image, the information on the image remains the same. A cat is a cat, even if you see it from a different angle.
Hence, we can use this technique to increase the size of our training data by creating multiple images rotated at different angles.
The next image augmentation technique is image shifting. By shifting the images, we can change the position of the objects in the image and hence give more variety to the model. Which eventually can result in a more generalized model.
Image shift is a geometric transformation that maps the position of every object in the image to the new location of the final output image. So if an object is at position x,y in the original image, it gets shifted to new position X, Y in the new image as shown below. Where dx and dy are the respective shifts along with the different directions.
The next technique is Image flipping. Flipping can be considered as an extension of rotation. it allows us to flip the image in the Left-Right direction as well as the Up-Down direction.
The leftmost image here is the original image of the training set and the remaining two images are the flipped images.
Another popularly used image augmentation technique is, Image Noising where we add noise to the image. This technique allows our model to learn how to separate the signal from the noise in the image. This also makes our model more robust to changes in the image
Let’s understand one more augmentation technique, Image blurring. Images come from different sources and hence the quality of images will not be the same from each source. Some images might be of very high quality and others must be very bad. In such scenarios we can blur the original images, this will make our model more robust to the quality of the image being used in the test data. So these are some commonly used image augmentation techniques. This article was a short introduction to the image augmentation techniques used for feature engineering. If you are looking for more details and the implementation, I will recommend you to check the following article-
To summarize, If you are aiming to develop a robust and generalized deep learning model but do not have a large dataset use your creativity. In such cases, image augmentation techniques come as a savior, as they allow you to generate a wide range of new data without much effort.
I will suggest you try image augmentation in your next computer vision projects.
If you are looking to kick start your Data Science Journey and want every topic under one roof, your search stops here. Check out Analytics Vidhya’s Certified AI & ML BlackBelt Plus Program
Let us know if you have any queries in the comments below.