Image Augmentation
Image augmentation creates synthetic training data examples to improve model fit.
Image augmentation can increase the generalizability of your model’s performance by increasing the diversity of learning examples for your model.
In Roboflow, select how many times you seek a given image to be augmented. For example, sliding to 3 means each of your images will receive 2 random augmentations based on the settings you select.
Additional notes:
Example case, 3x augmentation --> 1 of the generated images is generated only with the preprocessing settings you have applied. The other 2 images receive augmentations, leaving you with 3 times the number of images for each source image.
In Roboflow, augmentations are chained together.
For example, if you select “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.
Augmentations are chained 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 generated dataset.
Doing your augmentations through Roboflow ("offline augmentation") rather than at the time of training has a few key benefits.
- 1.Model reproducibility is increased. With Roboflow, you have a copy of how each image was augmented. For example, 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. That’s wasted dollars.
Randomly flip (reflect) an image vertically or horizontally. Annotations are correctly mirrored. How does this work?
Randomly rotate an image 90 degrees or 180 degrees.
- Clockwise: Rotates an image 90 degrees clockwise.
- Counter Clockwise: Rotates an image 90 degrees counter clockwise.
- Upside Down: Rotates an image 180 degrees (upside down).
Randomly rotate an image clockwise or counter clockwise up to the degree amount the user selects. Learn when this is recommended.
- Degrees: Select the highest amount an image will be randomly rotated clockwise or counter clockwise.
- Percent: The percent area of the original image to drop. (e.g. The percentage area of the original image to keep. (e.g. a higher percentage contains a smaller amount of the original image.)
Note: annotations are affected. At present, our implementation drops any annotations that are completely out of frame. We crop any annotation that are partially out of frame to be in line with the edge of the image. For these kept annotations, we currently keep any amount of the original object detection area. We will soon provide the ability for you to select what percentage of annotation area you seek to maintain -- for example, imagine you only want to keep annotations that have at least 80% of the area of their original bounding box -- that will be supported.
- Horizontal: Select the highest amount an image will be randomly sheared across its x-axis.
- Vertical: Select the highest amount an image will be randomly sheared across its y-axis.
Adjust the gamma exposure of an image to be brighter or darker.
- Percent: Select the percent up to which an image will be randomly brightened or darkened. Up to 100 percent bright (completely white) or 100 percent dark (completely black).
- Pixels: Determines the amount of blur applied to an image (i.e. the kernel size of the blurring process; all kernel sizes are odd). 25 pixels is max blur.
- Percent: Selects the percent of an image’s pixels that are affected, up to 25 percent.
Depending on which plan your workspace is on, you may also have access to advanced augmentations such as bounding box only augmentations, cutout, and mosaic. For a complete walkthrough, contact our sales team.
Last modified 22d ago