Generate synthetic data for computer vision using copy/paste context-augmentation.
Try it: https://magicscissors.app
Collecting and annotating training to create performant computer vision models is hard time-consuming work. Often, the most valuable data to collect is of the most rare edge-cases. It is impractical and, in some cases, impossible to wait for that data to present itself naturally.
Creating synthetic data to augment your real-world data can be extremely helpful in creating a robust dataset.
There are several ways to expand your dataset (for example, traditional data augmentation and creating 3D-rendered scenes). Context-augmentation is a simpler method which cuts objects of interest from one scene and pastes them into another.
Magic Scissors operates on Roboflow datasets using the Roboflow API. You'll need an API Key and three datasets in your Roboflow account:
Objects of Interest
-- this should be an object detection or instance segmentation dataset with the objects that should be cut out annotated with polygons.Backgrounds
-- this should be an object detection or instance segmentation dataset with the backgrounds that objects will be pasted over. Drop-zones should be annotated with polygons.Destination
-- this is where the new images will be stored. It should be an object detection or instance segmentation project (and may, optionally, be the same as yourObjects of Interest
dataset.
There are several settings available in Magic Scissors to customize your output:
Dataset Size
- the number of synthetic images to create.Objects Per Image
- how many objects to place on the background in each synthetic image (range of min to max).Object Size Variance
- the amount to grow or shrink objects of interest. This simulates objects being closer or farther away from the camera and can be used to adjust realism if the scale of the images inObjects of Interest
andBackgrounds
is not the same.
It can be additionally useful to vary the color, brightness, contrast,
rotation, etc of your objects of interest. You can choose these settings
on the Objects of Interest
dataset in the Roboflow interface and Magic
Scissors will use them when isolating and exporting the objects.
Example projects will be listed below. If you create a public project on Roboflow Universe with Magic Scissors, submit a PR to add it to this list.