Image Augmentation
Create augmented images to improve model performance.
Last updated
Was this helpful?
Create augmented images to improve model performance.
Last updated
Was this helpful?
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.
We recommend starting a project with no augmentations. This allows you to evaluate the quality of your raw dataset. If you add augmentations and your dataset doesn't perform as well as expected, you will not have a baseline to which you can compare model performance.
If your model doesn't perform well without augmentations, you may need to investigate class balance, data representation, and dataset size. When you have a dataset on which you have successfully trained a model without augmentations, you can add augmentations to further help improve model performance.
Augmentations are applied through a dataset version ("offline augmentation") rather than at the time of training for a few key reasons:
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.
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!
Training costs are decreased. Because augmentations are CPU-constrained operations, your expensive, rented GPU is often waiting to be fed images for training.
Augmentations are always applied to training images after . 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.
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 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.
Augmentations in Roboflow can either be "Basic" or "Enhanced" and can be applied at two different levels.
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 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 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.
For up-to-date information on our plans and their associated features, see our .