Create a Project Version
Create a new version for your project using the API
To create a project version, use the project.generate_version()
method.
Here is a full example of the settings. There is a detailed explanation for each property below.
Project Version Creation Options
Augmentation:
image: A setting equivalent to the "Maximum Version Size" option in the UI. For creating multiple augmented versions of an image. Accepts
versions
to specify the number of augmented versions per each original image.bbblur: A bounding box level augmentation for blurring the contents of a bounding box. Accepts
pixels
, specifying the level of random Gaussian blur to apply.bbbrightness: A bounding box level augmentation for adjusting brightness. Accepts
brighten
(boolean),darken
(boolean), andpercent
(integer) to control brightness adjustment.bbcrop: A bounding box level augmentation for cropping within bounding boxes. Accepts
min
andmax
to specify the range of cropping.bbexposure: A bounding box level augmentation for adjusting exposure. Accepts
percent
to control the exposure adjustment.bbflip: A bounding box level augmentation for flipping bounding boxes. Accepts
horizontal
(boolean) andvertical
(boolean) to control flipping.bbnoise: A bounding box level augmentation for adding noise within bounding boxes. Accepts
percent
to specify the level of noise.bbninety: A bounding box level augmentation for rotating by 90-degree increments. Accepts
clockwise
(boolean),counter-clockwise
(boolean), andupside-down
(boolean) to control rotation.bbrotate: A bounding box level augmentation for rotating bounding boxes. Accepts
degrees
to specify the rotation angle.bbshear: A bounding box level augmentation for shearing bounding boxes. Accepts
horizontal
andvertical
to control shearing.blur: An augmentation for blurring the entire image. Accepts
pixels
to specify the level of Gaussian blur.brightness: An augmentation for adjusting brightness. Accepts
brighten
(boolean),darken
(boolean), andpercent
(integer) to control brightness adjustment.crop: An augmentation for cropping the entire image. Accepts
min
andmax
to specify the range of cropping.cutout: An augmentation for cutout. Accepts
count
andpercent
to control the number and size of cutout regions.exposure: An augmentation for adjusting exposure. Accepts
percent
to control the exposure adjustment.flip: An augmentation for flipping the entire image. Accepts
horizontal
(boolean) andvertical
(boolean) to control flipping.hue: An augmentation for adjusting hue. Accepts
degrees
to specify the hue adjustment.mosaic: An augmentation for creating mosaics. Accepts a boolean value.
ninety: An augmentation for rotating by 90-degree increments. Accepts
clockwise
(boolean),counter-clockwise
(boolean), andupside-down
(boolean) to control rotation.noise: An augmentation for adding noise to the entire image. Accepts
percent
to specify the level of noise.rgrayscale: An augmentation for converting to grayscale. Accepts
percent
to control the percentage of conversion to grayscale.rotate: An augmentation for rotating the entire image. Accepts
degrees
to specify the rotation angle.saturation: An augmentation for adjusting saturation. Accepts
percent
to specify the saturation adjustment.shear: An augmentation for shearing the entire image. Accepts
horizontal
andvertical
controls shearing.
Preprocessing:
auto-orient: Automatically discards EXIF rotations and standardizes pixel ordering. Accepts a boolean
true
orfalse
.contrast: Adjusts contrast using a specific method. Accepts
type
to specify the contrast adjustment method.filter-null: Filters out null annotations. Accepts
percent
to control the percentage of null annotations to filter.filter-tags: Filters out images based on tag. If
true
, only images with that tag will be included in the version. Iffalse
, only images without that tag will be included in the version. In order to omit tag-less images, you can set"::none::": false
, andtrue
to require images to be tag-less.grayscale: Converts the image to grayscale. Accepts a boolean
true
orfalse
.isolate: Isolates each object in a separate image. Accepts a boolean
true
orfalse
.remap: Renames classes in annotations. Accepts
original_class_name
andnew_class_name
to specify the class renaming.resize: Resizes the image. Accepts
width
,height
, andformat
to specify the new dimensions and format.static-crop: Performs a static crop on the image. Accepts
x_min
,x_max
,y_min
, andy_max
to specify the crop region.tile: Tiles the image into a grid. Accepts
rows
andcolumns
to specify the number of rows and columns in the grid.
Last updated