Roboflow is constantly improving how developers can build better computer vision models based on better input data. One key piece to this puzzle is enabling users to select augmentations that best improve dataset representation through augmentation.
Augmentation creates altered training data based on existing examples. Image augmentation improves model performance, especially on small datasets and in conditions of class imbalance.
We've recently introduced three new augmentation techniques to improve your model performance. All three modify an image's colors, causing a model to generalize better to objects of various potential input colors.
Grayscale augmentation randomly causes an input image to be converted to a single channel, grayscale output image. This causes a model to place a lower emphasis on color as a signal – which, depending on your problem's context, may be desirable or not. (For example, if you're building a model where detecting an object that is always a single color, grayscale augmentation may not be suitable.)
Unlike grayscale as a preprocessing step, grayscale as an augmentation step randomly applies to a subset of the images in a training dataset. In Roboflow, the user selects the percentage of images to be randomly translated to grayscale (depicted above with a slider), and Roboflow generates a version of this dataset accordingly.
Hue augmentation randomly alters the color channels of an input image, causing a model to consider alternative color schemes for objects and scenes in input images. This technique is useful to ensure a model is not memorizing a given object or scene's colors. While output image colors can appear odd, even bizarre, to human interpretation, hue augmentation helps a model consider the edges and shape of objects rather than only the colors.
Due to its color circle origins, hue is measured radially, meaning input images are altered relative to some amount of degrees plus or minus their starting point. Thus, in Roboflow, a user selects the number of degrees for a hue augmentation, and Roboflow randomly determines (1) the number of degrees between 0 and N, where N is the user selection and (2) whether to positively or negatively apply the hue shift (depicted above with the degree slider).
Saturation augmentation is similar to hue except that it adjusts how vibrant the image is. A fully desaturated image is grayscale, partially desaturated has muted colors, and a positive saturation shifts colors more towards the primary colors.
Adjusting the saturation of an image can help your model perform better when colors in the wild are different (for example, if a different white-balance is set, different lighting is in effect, or even if it's foggy outside).
With these new color-altering augmentations at your disposal, we're excited to see boosts in your model performance! Try them out.