Image Augmentation

Create augmented images to improve model performance.

Image augmentation is a step where augmentations are applied to existing images marked as "Train" in your dataset. This process can help improve the ability of your model to generalize and thus perform more effectively on unseen images.

Augmentations are applied through a dataset version ("offline augmentation") rather than at the time of training for a few key reasons:

  1. Model reproducibility is increased. With Roboflow, you have a copy of how each image was augmented. For example, you may find your model performs better on bright images rather than dark images, so you should collect more low-light training data.

  2. Training time is decreased. Augmentations are CPU-constrained operations. When you’re training on your GPU and conducting augmentations on-the-fly, your GPU is often waiting for your CPU to provide augmented data at each epoch. That adds up!

  3. Training costs are decreased. Because augmentations are CPU-constrained operations, your expensive, rented GPU is often waiting to be fed images for training.

How Augmentations Are Applied

Augmentations are always applied to training images after preprocessing steps. The selected augmentations are stacked together, with randomization for the augmentation settings, and values for each setting, applied to each augmented image. Any images that appear as duplicates during this process are filtered out of the created version.

For example, if you select augmentations to “flip horizontally” and “salt and pepper noise,” a given image will randomly be reflected as a horizontal flip and receive random salt and pepper noise.

Limiting Augmentations

When creating a dataset version with augmentations, you can select the maximum number of augmented images to include through the "Maximum Version Size" option.

For example, selecting 3x means that your final dataset version will contain each training source image with preprocessing steps applied and 2 random augmentations of each image based on the settings you select.

If you had 100 images in your dataset with a train/valid/test split of 70/20/10 and selected 3x augmentations, your final dataset would roughly have a 210/20/10 split.

Your version's final number of images may be smaller than this estimate because we de-duplicate images and certain options (like "Filter Null") can remove images from the output.

Augmentation Options

Augmentations in Roboflow can either be "Basic" or "Enhanced" and can be applied at two different levels.

Image Level Augmentations

Image level augmentations create new training data by applying transformations to the entire image rather than individual objects or regions. By modifying the full image, developers can simulate a wider range of visual conditions, helping models learn to generalize better to new data.

Bounding Box Level Augmentations

Bounding box level augmentation creates new training data by only altering the content of a source image’s bounding boxes. In doing so, developers have greater control over creating training data that is more suitable to their problem’s conditions.

A 2019 paper from Google researchers introduces the idea of using bounding box only augmentation to create optimal data for their models. In this paper, researchers showed bounding box only modifications create systemic improvements, especially for models that were fit on small datasets.

Enhanced Augmentations and Bounding Box Augmentations are premium features.

For up-to-date information on our plans and their associated features, see our pricing page.

Learn More

Last updated

Was this helpful?