Roboflow Pro now supports Cutout and Mosaic.

Recent research has shown there is still plenty of room to grow model performance through augmenting our training data. Roboflow has written extensively about data augmentation and has highlighted some of the recent advances that have made new models like YOLOv4 and YOLOv5 state of the art.

Today we're excited to announce that we're bringing some of these new augmentations to Roboflow so you can use them with any model!

Mosaic

The mosaic augmentation was invented by Glenn Jocher earlier this year and was first released in YOLO v4. It has made quite a splash.

Example mosaic output.

It works by taking four source images and combining them together into one. This does a few things:

  • It simulates four random crops (while maintaining the relative scale of your objects compared to the image) which can help your model perform better in cases of occlusion and translation.
  • It combines classes that may not be seen together in your training set (for example, if you have pictures of apples and pictures of oranges, but no pictures of apples with oranges in the same photo, mosaic will simulate that).
  • It varies the number of objects in your images (for example, if all of your images only contain one bounding box, the output of mosaic will have between zero and four).
Mosaic deep dive video. Don't forget to subscribe to our YouTube channel!

Cutout

The second advanced augmentation we've added is cutout, also first seen in YOLOv4.

Example cutout output.

Cutout simulates occlusion by adding randomly generated black boxes on top of your images. This does two things

  • It makes your model do better detecting objects that are occluded (located) behind other objects.
  • It encourages your model to learn more distinguishing features about each class of object. For example, if you're trying to detect American flags, your model may hone in on the stars. By covering up the stars in some of the images, you force it to also learn about the stripes. And thus, its performance in detecting American flags does much better when they are flapping in the wind.

Combining Augmentations

You can use mosaic and cutout on their own or together with each other and with other augmentations. We've already seen users improving the accuracy of their models by up to 10% simply by adding Roboflow's augmentations to their existing computer vision models!

Excited to see what you build next. If you want to try out our advanced augmentations and all of Roboflow Pro's other features, get in touch and we'll show you how.