Stability¶
What you can rely on when you update Blendmentation, and what may change.
Versions¶
Versions follow Semantic Versioning: major.minor.patch.
- Patch (1.0.1): bug fixes only.
- Minor (1.1.0): new features. Scripts written for an earlier 1.x keep working.
- Major (2.0.0): may break scripts. The changelog lists every breaking change and what to write instead.
Before a name is removed or changes meaning, it is deprecated first: it keeps working,
with a DeprecationWarning saying what replaces it, for at least one minor release.
The 0.x versions before 1.0.0 made no such promise: a release could break scripts, and the changelog says how.
What is covered¶
The Python API¶
The public names are the ones in the API reference: each module's __all__.
| Module | Public names |
|---|---|
augmentations |
Compose, OneOf, Chain, Augmentation and every augmentation class, graph_preview |
generating |
Compose, Instances and every step class |
state |
restoring, set |
export |
coco, yolo, voc, bop, augmentation_stats, skip_stats, augmentation_report |
Import them either way, both stay:
from blendmentation import augmentations
from blendmentation.augmentations import augmentations # the same names
For these, the promise is:
- Names and arguments. The main arguments can be passed by position, as in the
examples (
Translation(x, y, z),Number(data_path, value_range),BBox(classes)). Everything else is a keyword argument (p=,otherwise=,name=,data_path=, the settings), so new options can be added without breaking calls. Defaults don't change in a minor release. - Behavior as documented, e.g. what
pmeans, thatstate.restoring()sets every change back, which files a step writes. - Results.
results,actualandappliedkeep their documented form; dicts returned bydescribe,augmentation_statsandskip_statsmay get new keys.
Also covered: blendmentation.__version__.
The files a dataset is made of¶
- File names:
<prefix><index>.png,<index>.json,<index>_mask_<class>_<n>.pngand the others the generating steps describe. - The label JSON: its keys (
version,resolution,image,bboxes,masks,full_masks,poses,camera,keypoints,aovs,passes,background,augmentations,bbox_image,segmentation_image, and the ones you name withOutputFieldor pass to the generatingCompose) and what their values mean, as the steps document them. New keys may be added in a minor release, so code reading labels should ignore keys it doesn't know. Every label starts with"version", the Blendmentation version that wrote it. - The augmentation records: the graph file (
augmentations.json) andskipped.jsonlthatgenerating.Augmentationswrites, as documented there; like the labels, they may get new keys. - Units and conventions: boxes and keypoints in pixels from the image's top-left
corner; the camera matrix
Kwith OpenCV pixel centers; poses in OpenCV camera axes; distances in Blender units,camera.unit_scalemeters each. - Exports: the files
export.coco,yolo,vocandbopwrite follow their formats (COCO, Ultralytics YOLO, Pascal VOC, BOP), so the tools of those formats keep reading them.
What is not covered¶
These may change in any release, with a line in the changelog:
- Anything not in
__all__: the helpers in the public modules (e.g.check_range,flatten,rle), and the modules behind them (bpy_augmentations,bpy_generating,bpy_paths,bpy_undo,graph,polygons...). They are importable, but they are not the API. - Methods and attributes left out of the API reference on the public classes (e.g.
apply,check,skip,prepare,stage,Vector.bounds): they are how the classes work inside. To write your own augmentation, subclassAugmentationand implementapply(obj), settingactual, as its documentation shows; that much is covered. - The HTML pages of
augmentation_reportandgraph_preview: their look and layout. The functions themselves are covered. - The Blender add-on: its panels and buttons, and the exact text of the templates
it copies (
Node.template,Modifier.template,Chain.shape_keys_template): the code they write keeps working, its layout and comments may change. - Random draws: the same
random.seed()gives the same datapoints within a version, not across versions. A new feature or fix can draw random numbers in another order. - Pixels: renders depend on the Blender version and its engines, so images and masks of the same scene can differ slightly between Blender versions.
- Supported Blender versions: the minimum follows Blender's LTS releases. Raising it is announced in the changelog.