
Learn about three types of data augmentation.Inside the rest of today’s tutorial you will: I’ll help you clear up some of the confusion regarding data augmentation (and give you the context you need to successfully apply it). Technically, all the answers are correct - but the only way you know if a given definition of data augmentation is correct is via the context of its application.

Instead, the ImageDataGenerator accepts the original data, randomly transforms it, and returns only the new, transformed data.īut remember how I said this was a trick question? It’s not taking the original data, randomly transforming it, and then returning both the original data and transformed data. That’s right - the Keras ImageDataGenerator class is not an “additive” operation. Training the CNN on this randomly transformed batch (i.e., the original data itself is not used for training).Replacing the original batch with the new, randomly transformed batch.Taking this batch and applying a series of random transformations to each image in the batch (including random rotation, resizing, shearing, etc.).Accepting a batch of images used for training.While the word “augment” means to make something “greater” or “increase” something (in this case, data), the Keras ImageDataGenerator class actually works by: Only 5% of respondents answered this trick question “correctly” (at least if you’re using Keras’ ImageDataGenerator class).Īgain, it’s a trick question so that’s not exactly a fair assessment, but here’s the deal: Here are the results: Figure 1: My twitter poll on the concept of Data Augmentation. The question was simple - data augmentation does which of the following? Knowing that I was going to write a tutorial on data augmentation, two weekends ago I decided to have some fun and purposely post a semi-trick question on my Twitter feed. I’ll also dispel common confusions surrounding what data augmentation is, why we use data augmentation, and what it does/does not do. In today’s tutorial, you will learn how to use Keras’ ImageDataGenerator class to perform data augmentation. Click here to download the source code to this post
