Create a Dataset Version
To create a Dataset version, use the project.generate_version()
method.
import roboflow
rf = roboflow.Roboflow(api_key=YOUR_API_KEY_HERE)
project = rf.workspace().project("PROJECT_ID")
project.generate_version(settings={
"augmentation": {},
"preprocessing": {},
})
Here is a full example of the settings. There is a detailed explanation for each property below.
{
"augmentation": {
"bbblur": { "pixels": 1.5 },
"bbbrightness": { "brighten": true, "darken": false, "percent": 91 },
"bbcrop": { "min": 12, "max": 71 },
"bbexposure": { "percent": 30 },
"bbflip": { "horizontal": true, "vertical": false },
"bbnoise": { "percent": 50 },
"bbninety": { "clockwise": true, "counter-clockwise": false, "upside-down": false },
"bbrotate": { "degrees": 45 },
"bbshear": { "horizontal": 45, "vertical": 45 },
"blur": { "pixels": 1.5 },
"brightness": { "brighten": true, "darken": false, "percent": 91 },
"crop": { "min": 12, "max": 71 },
"cutout": { "count": 26, "percent": 71 },
"exposure": { "percent": 30 },
"flip": { "horizontal": true, "vertical": false },
"hue": { "degrees": 180 },
"image": { "versions": 32 },
"mosaic": true,
"ninety": { "clockwise": true, "counter-clockwise": false, "upside-down": false },
"noise": { "percent": 50 },
"rgrayscale": { "percent": 50 },
"rotate": { "degrees": 45 },
"saturation": { "percent": 50 },
"shear": { "horizontal": 45, "vertical": 45 }
},
"preprocessing": {
"auto-orient": true,
"contrast": { "type": "Contrast Stretching" },
"filter-null": { "percent": 50 },
"filter-tags": { "tag_name": true, "other_tag": false },
"grayscale": true,
"isolate": true,
"remap": { "original_class_name": "new_class_name" },
"resize": { "width": 200, "height": 200, "format": "Stretch to" },
"static-crop": { "x_min": 10, "x_max": 90, "y_min": 10, "y_max": 90 },
"tile": { "rows": 2, "columns": 2 }
}
}
Last updated
Was this helpful?