Computer VisionDeep LearningMachine LearningTutorial

Data Augmentation – What is it?


Especially in the field of Machine Learning, you will read about an approach called “Data Augmentation”. This idea is great to boost the performance of your Machine Learning Models. First at all, we want to clarify what Data Augmentation means. Data Augmentation is an approach to generate more training samples for your model without actually taking more images/videos/datapoints by yourself. Imagine you want to train a Deep Neural Network on detecting different kinds of street signs.

The first step of course is to go out and get a few thousand of training images. So you go into the wild and take pictures of traffic signs. Even if you are very passionate about taking these images, you will not reach more than 10 000 images. If we assume you got 40 diferent signs to detect, this means 250 images per traffic sign. If you compare this to big datasets, you will quickly understand, that 250 images per class are not that much. Especially for Deep NNs, because these kind of models are really hungry for data.

This is the place where Data Augmentation comes in. Data Augmentation applies small changes to the original images. These changes are quite smalle to not make detection of this given sample impossible, but they still boost the performance a lot. We list a few possible augmentation techniques for images.

  • Random Noise: Randomly add/subtract to each pixel and color a small number
  • Gaussian Blur: Blur the image using gaussian or similar kernels
  • JPEG Compression: JPEG compression introduces some small fragments, which are kind of unique in Data Augmentation methods
  • Rotation: Rotate the image by a small amount
  • Mirror: Mirror the image (only possible if there is no “correct” direction for the image)
  • Crop: Extract a slightly smaller region than the original image and resize it (if needed) to original image size
  • Contrast changes: Change contrast to be lower/higher than original
  • Elastic Deformation: Deformate the image a bit

There are plenty of Data Augmentation techniques and a simple rule of thumb is: The more you use the better will be your performance
Of course this is only a rule of thumb, but in general Data Augmentation helps to improve the accuracies of your models by a few percent points. The reason why Data Augmentation improves the accuracy, even though the changes are quite small, is because it fights overfitting of your model. Overfitting is a big problem especially for Deep Neural Networks. That is why every Deep Learning framework offers a few standard Data Augmentation techniques.

We also append a few augmentation examples, so you are able to see, that the changes are quite small.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.