A release is an immutable snapshot of the project's dataset. Its manifest records the exact media and labels at publication, the schema used to validate them, and an optional split recipe. Publish a new release to capture later edits or membership changes.
from visionset.kernel.domain import SplitRecipe
from visionset.kernel.services import ProjectService, ReleaseService, WorkspaceService
with WorkspaceService.open("./road-signs") as workspace:
releases = ReleaseService(workspace)
dataset = ProjectService(workspace).get_dataset(project.id)
recipe = SplitRecipe(train=0.8, val=0.1, test=0.1, seed=42)
release = releases.publish(dataset.id, "v1.0", split=recipe)
releases.manifest(release.id) # the frozen inventory, read back out of the blob store
releases.verify(release.id) # re-read and re-hash everything it names
releases.assignment(release.id) # the recipe, materialized over the frozen asset set
releases.split_report(release.id) # what that cut came to, per fold, with its warnings
releases.list(dataset.id) # every release of that dataset, oldest first| Frozen into the manifest | Kept on the release row |
|---|---|
Every asset in the trunk, by content hash, with its uri and dimensions |
tag, manifest_hash |
| Every annotation on those assets, copied - geometry, attributes, provenance | created_at, visionset_version |
| The project's active schema version and its classes | schema_version, asset_count, annotation_count - a read cache |
| The split recipe, when there is one | The split recipe - a read cache, from manifest version 13 |
The member assets consent covered, when a publish needed allow_unreviewed |
unreviewed_asset_count - a read cache, 0 without consent |
A release takes the trunk as it is when publish runs. Publishing is refused with 409
RELEASE_HAS_UNREVIEWED_WORK while an open batch has saved work on a member
asset, unless the caller consents (allow_unreviewed, CLI --allow-unreviewed); the rule, the
remedy and what consent does are in what a release sees of the trunk.
With consent, labels an open batch has saved but nobody has reviewed are included; the manifest
names those members in unreviewed_consent (manifest version 14). A member that had labels when an
open batch began and has none now is never included that way: publishing refuses with 409
RELEASE_HAS_DELETED_LABELS whatever the consent, because an empty label list would read as a
reviewed negative (a member emptied under open work).
A genuine negative cleared again in an open batch began with no labels and is released as one. An asset reviewed as empty is a member with no labels and exports as a
negative where the format can say so; a skipped or pre_labeled asset is never promoted into the
trunk. The exception is an asset already promoted: if a correction later marks it pre_labeled or
skipped, it stays a member and is released with whatever labels it holds, because promotion only
adds and nothing removes (see the open-batch guard above).
Curating an asset out of the trunk afterwards, labeling one of those assets again in a later batch, or creating a new schema version changes none of the manifest. The labels are copies, not references.
Nothing time-, machine- or identity-specific goes inside the document: no timestamp, no tag, no release id. That is why
first = releases.publish(dataset.id, "v1")
second = releases.publish(dataset.id, "v2") # nothing changed in between
assert first.manifest_hash == second.manifest_hashholds as a property of the design rather than as something the service arranges. Two consequences fall out of it:
- The manifest hash is a real fingerprint. Two releases with the same hash contain the same assets and the same labels, whoever published them and whenever.
- They share one blob. The store is content-addressed, so the second
putis a no-op. That holds for the same content under the same split recipe: the recipe is part of the document from manifest version 13, so two releases of one dataset under two recipes are two documents.
Ordering is canonical rather than historical: assets sort by content hash and then by id, and an
asset's labels sort by id. The Manifest model applies that itself, on construction - a rule the
artifact depends on belongs to the artifact, not to the habits of whoever builds one. Which batch
an asset arrived in, and on which day, must never reach the bytes.
Manifest.classes is the one collection that is not sorted. A schema's class order is
authored - it drives how a labeling surface lists them - so it is part of the frozen contract.
The manifest hash is a snapshot identity, not a universal content identity. ManifestAsset.uri
is a workspace-local path, kept because an exporter names its output files from it. The same
images ingested on another machine produce a different manifest.
manifest_version names the shape of the document itself, independent of the workspace
database's format and of the package version. A build writes the lowest version that can
express the release: 3 for a release of images with no 3D label, 4 for one that holds
any, 5 for one that holds a point-cloud asset, 6 for one that holds an asset with a
group label, 7 for one that holds an annotation a track observes, 8 for one that
holds a rotated box (obb), 9 for one that holds an asset of an image-sequence source or
an observation whose timing is unknown, 10 for one that holds a mask, 11 for one
that holds an asset of a point-cloud sequence or a track observing a scan, and 12 for one
that holds a keypoints label or whose classes carry a keypoint spec, 13 for one
published with a split recipe, 14 for one whose publish consented to unreviewed work, and
15 for one published with a recipe that cuts sequences.
| Version | Since | What changed |
|---|---|---|
| 1 | the first release | - |
| 2 | #584 | LabelClass.geometries became plural; a version-1 class's singular geometry still loads |
| 3 | #352 | a polyline may carry per-vertex visibility |
| 4 | #1038, #1045 | the polyline_3d and cuboid_3d geometries, and a calibration on each asset that carries one |
| 5 | #1046 | an asset's modality, and on a point-cloud asset its point_cloud metadata and the scan frame |
| 6 | #1147 | an asset's group_label, the group its importer placed it in |
| 7 | #1181 | tracks, each with the observations of it the release holds |
| 8 | #1160 | the obb geometry, a rotated pixel rectangle |
| 9 | #1199 | sources, each image-sequence source with the occurrences the release holds; a timestamp may be null |
| 10 | #1162 | the mask geometry, a run-length encoded raster |
| 11 | #1189 | a source's kind, point_cloud_sequence for a point-cloud sequence, and tracks over its scans |
| 12 | #1158 | the keypoints geometry and the class keypoint spec |
| 13 | #1315 | the release's split recipe |
| 14 | #1326 | unreviewed_consent, the members consent to unreviewed work covered |
| 15 | #1456 | a recipe's group_by: "sequence" and block_size, and under it each video frame's clip_frames |
An older document keeps the version it was written with, so its bytes and its hash never move and
verify still passes. Version 3 changes no existing bytes: a polyline with unknown visibility
omits the key rather than writing null, so it serializes exactly as it did under version 2.
What the bump announces is that a version-3 document may carry the key.
The number is checked against the build and against the content. A build refuses a
manifest_version above its own, and a key it does not know, because a manifest is read with
unknown keys forbidden - half-understanding hash-pinned evidence is worse than refusing it (see
below). Builds before #1315 did not compare the version, only the keys. The number is also checked
against the manifest's own content: a
document below version 4 that carries a calibration, or below version 5 that holds a point-cloud
asset, is refused, because its version claims a shape that cannot express what it holds. So a
version-2 build refuses a version-3 manifest only when that manifest carries a visibility; one
with no visibility recorded anywhere loads there unchanged.
Version 4 changes no existing bytes either. An asset's calibration is embedded only when the
asset carries a 3D label, and omitted otherwise - even when its source is calibrated - and a
release with no 3D label is still written as version 3. So a 2D release published now hashes
exactly as it did before 3D labels existed, and only a release holding one is refused by a
version-3 build. A manifest that carries a calibration under a version below 4, or a 3D label on
an asset with no calibration beside it, does not load.
Version 5 changes no existing bytes either. modality is omitted when it is image, so a
release of images is still written as version 3 or 4 with the hash it always had. A point-cloud
asset carries "modality": "point_cloud", its point_cloud metadata (format, point count,
bounds, fields) and the frame its source declares, and never a calibration or a pixel size; a
manifest holding one under a version below 5 does not load, and neither does a pixel-space label
(bbox, polygon, polyline) on a scan.
Version 6 changes no existing bytes either. group_label is omitted when an asset has none,
so a release of unlabelled assets keeps the version and the hash it had. The label is copied
whatever the release's split recipe says: the document is a function of content, and a recipe is
not content. A manifest carrying a group label under a version below 6 does not load.
Version 7 changes no existing bytes either. tracks is omitted when no track observes an
annotation the release copies, so an untracked release keeps the version and the hash it had. A
track is listed as its id, source_id, label_class and external_id, with only the
observations whose asset and annotation the release holds - a frame the release does not
contain is simply absent, and a track left with none is not listed. Each observation is the
occurrence's position and timestamp, its asset_id and its annotation_id. Observations sort
by position, never by when they were recorded, and tracks by source, then the position each is
first observed at, then id, so two publishes of an unchanged dataset still agree byte for byte. An
asset that occurs at two positions appears under both, once per annotation. A manifest carrying
tracks under a version below 7, or an observation naming an annotation the document does not hold,
does not load. An export hands its format the tracks cut to the annotations it carries.
Version 8 changes no existing bytes either. It adds a geometry and no key anywhere else, so a
release with no rotated box keeps the version and the hash it had; a manifest holding an obb
under a version below 8 does not load. The box is copied in its canonical spelling (see
annotations), so two publishes of
an unchanged dataset still agree byte for byte.
Version 9 changes no existing bytes either. sources is omitted when the release holds no
asset of an image_sequence source, so such a release keeps the version and the hash it had. A
source is listed as its source_id with every occurrence whose asset the release holds, observed
or not, each as position, timestamp and asset_id, in position order; sources sort by id. A
position the release holds no asset for is absent, so an exporter writes every held frame and
leaves only those positions as gaps. A video source is not listed: its frames are its own clip's.
A timestamp, here or on an observation, is null where the source recorded no timing, as a CVAT
task does - which is not the same document as 0. A manifest carrying sources or a null
timestamp under a version below 9, an occurrence naming an asset it does not hold, or an
observation that disagrees with the occurrence its source lists at that position, does not load.
An export cuts sources to the assets it hands its format, as it cuts tracks.
Version 10 changes no existing bytes either. It adds a geometry and no key anywhere else, so a
release holding no mask keeps the version and the hash it had; a manifest holding a mask under
a version below 10 does not load, and a build that predates the geometry refuses a version-10
manifest, since it does not know the mask type. The mask is copied in its canonical spelling (see
annotations), so two
publishes of an unchanged dataset still agree byte for byte. Three exporters write a mask whole,
coco as RLE, segmentation-png as a
class-index PNG and coco-panoptic as one segment of an RGB segment
map; every other export reports each one dropped, never degraded.
Version 11 changes no existing bytes either. A source in sources gains a kind, omitted for an
image sequence, so a release holding no point-cloud sequence keeps the version and the hash it had.
A point-cloud sequence, such as an imported nuScenes scene, is listed like an image sequence with
kind set to point_cloud_sequence, and its tracks observe cuboid_3d labels on its scans. A
manifest listing a point-cloud sequence, or a track observing a scan, under a version below 11 does
not load, and neither does a source listing an asset of the other modality. The formats that write
tracks, mot and cvat-video, open images
only: they report the scans dropped by modality and write nothing for them.
Version 12 changes no existing bytes either. A release holding no keypoints label, and none of
whose classes carries a keypoint spec, keeps the version, bytes and hash it had; a manifest using
either under a version below 12 does not load, and a build that predates them refuses a version-12
manifest. The spec is part of each class in the manifest, omitted when unset, and the release gate
re-checks every keypoints label's count against the active schema (see
schemas). Two exporters write
keypoints whole: coco as keypoint rows and ultralytics as a
pose dataset. Every other export reports each such class dropped, never degraded, and needs
lossy consent for it.
Version 13 changes no bytes of a release published without a recipe, which keeps the version and the
hash it had: split is omitted when there is none. A release published with one is written as
version 13 and carries the recipe as it was given, so the hash pins the folds as well as the content,
and a build that predates it refuses the manifest. The row keeps its copy as a cache, and verify
reports a row whose recipe disagrees with the document in cache_mismatches. The manifest is the
authority for the folds: assignment, split_report and every export cut by the manifest's recipe,
so a row edited after publication moves no fold. A manifest older than 13 cannot vouch for the row
either way, so for those the row is taken at its word. That includes every release published
without a recipe: its manifest is below 13, so a recipe written onto its row afterwards is not
detected by verify, and assignment and exports would use it. The recipe is tamper-evident only
for a release published with one under this build. ReleaseOut.split serves the row's recorded copy
of the recipe, so the API and the UI show that copy; verify is the check that the manifest agrees.
Version 14 changes no bytes of a release that needed no consent: unreviewed_consent is
omitted then, including when allow_unreviewed was passed and nothing blocked. A publish whose
consent lifted the open-batch guard is written as
version 14 with unreviewed_consent.asset_ids, every member asset an open batch had worked, sorted
by id and not capped as the refusal's list is, and a build that predates it refuses the manifest.
The row caches the count as unreviewed_asset_count, and verify reports a row that disagrees with
the document at any version, since a document that cannot record consent records none. An earlier
release, consented or not, is never rewritten: one published with consent before version 14 records
nothing and its row reads 0.
Publishing content that needs a newer version than an older build wrote still produces a different manifest hash, because the version number is part of the document.
A manifest this build does not know how to read - written by a newer build, so it carries a field
or a version this one lacks - is refused as WorkspaceCorrupt and never read partially, so
manifest, assignment, split_report and verify fail on it rather than cut folds from a
document they only half understand.
Publishing copies, beside every asset that carries a 3D label, the calibration that applied to it
at that moment - the asset's own override, else its source's - so the release can be read
without the workspace. An asset carrying one with no calibration refuses the publish with
CALIBRATION_MISSING (409), and one whose calibration was measured at another size than the
asset with CALIBRATION_RESOLUTION_MISMATCH (422). One installed format writes a 3D geometry:
kitti writes a cuboid_3d on a scan. No format writes a polyline_3d, and
none writes a 3D label on an image. Every other format, and kitti for a polyline_3d, reports the
class dropped, with its annotation and asset counts, and needs allow_lossy like any other
loss. The drop happens before pre-processing, with or without a target, so a resize or flip in the
export's recipe never refuses over a 3D label the format would not write anyway.
A point-cloud asset is read in its source's declared frame, not against a camera calibration, so
publishing copies that frame beside every scan, labelled or not. A cuboid_3d on a scan has its
yaw about that frame's up axis. See sources.md.
The project's active version - the highest one - with its classes. Each copied annotation still carries the version its own batch pinned, and those can differ: two batches approved against two versions can both be promoted into one trunk. Publishing validates every copied annotation against the active schema before freezing the manifest. If any do not conform, it refuses with the affected class counts; reconcile that content before publishing.
That publication gate makes newly created manifests internally schema-consistent. Exporters still defend against undeclared classes when reading archived or externally supplied malformed manifests, because those documents may not have come through this publication path.
report = releases.verify(release.id)
report.ok # everything present and unaltered
report.missing # content hashes with no blob at all
report.corrupt # blobs present whose bytes no longer hash to their own name
report.checked # how many were actually readverify re-reads and re-hashes. BlobStore.exists answers whether a path named by a hash
is there, which proves nothing about what is in it - a content-addressed store does not verify
itself, and that is the whole reason this method exists. exists is used only to tell a missing
blob from a corrupt one.
The manifest is settled first. If its own bytes no longer hash to manifest_hash, the report
says manifest_intact=False, checked=0, and the walk stops: a document that has been altered
is not an inventory worth trusting, and reporting assets missing on the strength of a tampered
list would be worse than saying nothing.
The row's cached schema_version, its two counts, its unreviewed_asset_count and, for a manifest
of version 13 or later, its split recipe are checked against the parsed document as well.
Anything in cache_mismatches is a bug in the build that wrote the row, not damage to the
workspace - a cache nobody checks is a fact nobody can trust.
QualityService.assess_release(release.id) reads a release without changing it: verify's findings,
the split report's warnings, class coverage and, given a format or target, the export loss
check_export computes. The only refusals at publish time remain the existing ones (a tag already taken,
no schema, an empty trunk, labels the schema rejects, unreviewed work, a 3D label without a matching
calibration); the report adds none. Each issue names the guard
that enforces it or says it is report-only. See the quality report.
Declarative and stored, never materialized into the release:
SplitRecipe(train=0.8, val=0.1, test=0.1, seed=42)The fractions must add up to one, checked with a tolerance because 0.7 + 0.15 + 0.15 is
0.9999999999999999 in binary floating point. An all-train recipe is legal. An invalid recipe
cannot be constructed at all - the refusal is pydantic's, like every other per-value rule in the
domain.
releases.assignment(release_id) turns it into folds, from the manifest's frozen asset set.
Reading live membership there would let a curator change a published release's folds by editing
the trunk afterwards, which is precisely what a release exists to make impossible.
The assignment is deterministic without a random number generator. Each asset is keyed by
sha256(seed:content_hash) and ordered by that key, so the result depends on the seed and on the
set - never on the order assets are passed in, on how many there are, or on the Python
implementation.
Identical bytes are one unit. Two assets holding the same content are the classic train/test
contamination, so every asset sharing a content hash lands in one fold, with or without grouping.
A manifest that publish writes never holds two: a project stores one asset per content hash
(uq_asset_project_content_hash), and ingesting the same bytes again reuses that asset - see
ingest.md. The rule guards a manifest built
any other way, by hand or by a tool reading the format, and the split depends on the document
alone. A unit is keyed as its first member is, so
a duplicate adds no unit and moves no other asset - without grouping, or for a copy that carries no
label. Under group_by, a copy that brings a label to an unlabelled asset re-keys that unit by the
group, and one carrying an existing label merges units, so either can move other assets of its unit.
Keying on content rather than the asset id also
means a re-ingest into a fresh project reproduces the split, every id being new.
Releases cut before this changed can re-cut differently. Until #1315 a duplicate was only placed next to its twin, so a fold boundary could separate them. A release published before that, whose manifest is older than version 13, is cut by its row's recipe under the current rules, so a manifest holding exact duplicates can come out with other folds than an export written back then. A published manifest holds none, for the reason above, so this reaches only one built another way. Publish a new release to pin the folds; the old one keeps its manifest and its hash.
Counts come from largest-remainder apportionment over units, with the last fold taking the tail
of the ordering outright. One asset under a 0.8/0.1/0.1 recipe is one training asset, not a rounding
error that loses it, and no asset can go missing to an argument about arithmetic.
Neighbouring frames are not identical bytes, so keying on content does not keep them together.
nuScenes keyframes are half a second apart and a scene holds about forty of them; split per asset,
every scene lands in all three folds and validation holds near-copies of training frames. On
v1.0-mini under 0.8/0.1/0.1 with seed 0, all ten scenes do.
A recipe can therefore ask for grouping:
SplitRecipe(train=0.8, val=0.1, test=0.1, seed=42, group_by="group_label")group_label is a name written on an asset at first arrival. It comes from one of two places: a
directory ingest that declares a capture group - one
ingest call is one group, so ingest each clip, scene or session on its own - or an importer whose
format names one, as the nuScenes import writes the scene's name. Nothing
else writes it, and nothing infers it. It is provenance, like a source:
never rewritten by a later ingest or import, and a name rather than an id,
so a re-ingest into a fresh project under the same label reproduces the split. The manifest
carries it, so the folds are cut from the document alone. With group_by:
- Every asset sharing one label is a single unit, keyed by
sha256(seed:group:label). An asset with no label is a unit of its own, keyed exactly as above. A group never straddles a fold. - Units merge transitively over bytes and labels. A copy of one scene's frame filed under another scene's label makes the two scenes one unit, keyed by the smallest of its labels; an unlabelled copy of a labelled frame joins that frame's group and changes no key.
- The fractions apply to groups, not assets. Ten scenes under
0.7/0.15/0.15are seven, two and one scenes, however many keyframes each holds, so fold sizes in assets are approximate - as close to the fractions as the groups are equal. A single group lands whole in the fold with the largest fraction, and a fold may be empty. - Everything else holds unchanged: no asset goes missing, ties break on the label and then the asset id, and the result depends only on the seed and the set. Over assets that carry no label, a grouped recipe cuts exactly the folds an ungrouped one does, so it is not refused there.
flowchart LR
M["frozen manifest<br/>content hash + group_label per asset"] --> U["union-find over<br/>bytes and labels"]
U --> K["units keyed by<br/>sha256(seed:key)"]
K --> A["largest-remainder<br/>apportion to folds"]
A --> F["train / val / test<br/>no unit spans folds"]
U --> R["split_report<br/>same units, warnings"]
The cut reads only the frozen manifest, so it is reproducible from the document alone: the
snapshot's identity (manifest_hash, which covers asset ids) and the split's reproducibility
(by content hash and label, which survive a fresh workspace) are separate facts. A re-ingest into
a fresh workspace names a different snapshot and cuts the same folds by content.
Grouping is opt-in. group_by defaults to none and is omitted from a stored recipe that
does not group, so every recipe stored before it existed - and every split it cuts - is the same
bytes and the same folds it always was.
Frames cut from a video clip are grouped only when the import declares a label. A clip's
source_id is a per-project id, so a re-import would not reproduce a split keyed on it, and the
clip's own bytes are never seen by the server. The stable key is therefore one the caller names:
a clip import started with group_label writes it on every frame it creates, exactly as a
directory ingest does, and the label is a name that survives a fresh workspace. A clip import
started without one leaves its frames unlabelled, so a grouped recipe cuts them one by one and
partial_group_labels counts them. The browser's clip screen offers no field for the label yet, so
today it is reached through the SDK or POST /projects/{project_id}/video-imports, or by exporting
frames to a directory and ingesting them under one. A frame whose bytes the project already held
keeps the label it arrived with.
A group label keeps a whole clip in one fold, which is the right cut for many clips and no cut at
all for one: a single clip under one label lands whole in train. Frames of one clip are also not
identical bytes, so a per-asset split scatters neighbours - near-copies - across all three folds.
On a 95-frame clip under 0.7/0.15/0.15, a per-asset split leaves dozens of neighbouring pairs in
two folds.
A recipe can therefore cut each sequence into contiguous blocks:
SplitRecipe(train=0.7, val=0.15, test=0.15, seed=0, group_by="sequence", block_size=10)visionset release publish -p P --tag v1 --split 0.7,0.15,0.15 --group-by sequence --block-size 10A sequence is an ordered source: a clip imported in the browser or ingested by the server, whose frames carry their
grid position (see ingest.md), or an imported image or scan sequence, whose
occurrences the manifest lists in sources. With group_by: "sequence":
- Position
pof a source falls in blockp // block_sizeof that source. Every asset drawn in one block is one unit, keyed bysha256(seed:block:source:index), and units are ordered and apportioned exactly as groups are. A block never straddles a fold, so two neighbouring frames sit in two folds only where one block ends and the next begins. - Blocks sit on the source's own grid, not on the positions the release happens to hold, so
dropping or adding a frame never moves another block's boundary. Positions are extraction-grid
ordinals: at 2 fps,
block_size=10is five seconds of footage. On an exact-count source a position is a sample at its range's own spacing, with gaps between ranges left unused, soblock_sizecounts those samples rather than seconds. - Identical bytes join the blocks they appear in, as they join groups - a static shot can put two blocks of one clip in one fold. An asset in no sequence is cut on its own.
block_sizeis required withgroup_by: "sequence"and refused without it. It has no default, because the block that keeps neighbours apart depends on the extraction rate and on how fast the scene changes. Larger blocks leave fewer boundaries and coarser fractions.- Deterministic: the result depends only on the seed, the block size and the set. A clip's source is a per-project id, so a re-import into a fresh workspace is a different sequence and can cut differently; pin the folds by publishing once.
Two cuts are refused with 409 SEQUENCE_SPLIT_REFUSED before anything is written, rather than
published with a warning: one where no asset sits in a sequence, which would cut frame by frame,
and one where the blocks leave a fold with a positive fraction empty - a sequence too short for its
blocks cannot be split honestly. The message counts the sequences, blocks and units, and names the
empty folds. Lower block_size, add frames, or set that fold's fraction to 0.
The manifest lists each video frame's clip_frames (source, position and timestamp) under this
recipe only, and is written as version 15; a release under any other recipe keeps the bytes it
had. split_report counts blocks in groups, assets in no sequence in unlabelled_assets, and
blocks joined by identical bytes in bridged_labels.
The supported path for a video. Ingest the clip in the browser, or on any surface with an
installed FFmpeg (server-side video ingest); either keeps each frame's position. Then
publish with --group-by sequence --block-size N.
What this leaves. The pairs at block boundaries are still neighbours in two folds;
sequence_boundaries counts them. Blocks do not eliminate temporal leakage, and densely sampled
exact counts make neighbours closer. Frames extracted from a clip outside VisionSet and ingested as
stills carry no position, so they are not a sequence: ingest each stretch of the clip under its own
capture group (visionset ingest DIR --group-label stretch-1, one call per stretch) and split with --group-by group_label instead. The rule and what it rules out are recorded in
A sequence split cuts contiguous blocks.
report = releases.split_report(release.id)
report.train.assets, report.train.units # assets in the fold, and the units they were cut as
report.train.groups # distinct group labels in the fold; 0 for a recipe that does not group
report.train.annotations # {"car": 41, "sign": 17}, every class of the release, zeros included
report.train.requested, report.train.actual # the recipe's fraction, and the share of assets got
report.warnings # [SplitWarning(code="empty_fold", message=...), ...]The report is computed from the same units as assignment, over the frozen manifest, so the two
cannot disagree. It lists no asset id. Class counts are annotations in the manifest, per class
name. Fold sizes count units, so ratios in assets are approximate: one scene of a hundred
frames beside nine of one is a single unit, and actual shows how far the assets drifted from
requested. Warnings never refuse a publish and never change a fold. Each is a stable code with a
message, an open vocabulary a client must tolerate:
| Code | Raised when |
|---|---|
too_few_units |
The cut has fewer units than folds with a positive fraction, so a fold stays empty whatever the seed or the fractions. Raised once, before the empty_folds it causes. |
empty_fold |
A fold with a positive fraction received no asset. The message gives the cause: fewer units than folds (beside too_few_units), or a fraction too small to round to one unit, which a larger fraction fixes. |
no_group_labels |
The recipe groups and no asset carries a label, so it cut per asset. |
partial_group_labels |
The recipe groups, some assets carry a label, and some unlabelled ones share no bytes with a labelled asset; the message counts both. Those were cut one by one, so frames correlated with them can land in other folds. |
labels_bridged |
Identical bytes joined group labels into one unit, so those groups share a fold. |
duplicates_merged |
Identical bytes removed units from the cut, so the fractions count fewer units than assets or declared groups. |
no_sequences |
The recipe cuts sequences and no asset sits in one. A publish refuses this; the code reaches only a report over a manifest built another way. |
unsequenced_assets |
The recipe cuts sequences and some assets sit in none and share no bytes with one that does; those were cut one by one. |
blocks_bridged |
Identical bytes joined sequence blocks into one unit, so those blocks share a fold. |
sequence_boundaries |
The recipe cuts sequences and some pairs of neighbouring held positions of one source sit in two folds; the message counts them. Every such pair is at a block boundary. |
class_missing_from_fold |
A class labelled in more units than there are folds with a positive fraction is absent from a non-empty one of them; the message names the folds it is absent from and the ones that hold it. A class in few enough units that no cut could reach every fold is not reported. |
too_few_units and empty_fold describe one situation from two sides, so both are raised: the
first says no seed or fraction can fill every fold and the remedy is more data or finer groups, and
each empty_fold names a fold, which is the evidence the quality report lists. An
empty_fold with no too_few_units beside it is a fraction too small for the number of units.
fold.groups counts the labels a fold holds, so a validation fold of one scene reads groups == 1
however many frames that scene has.
What this does not guarantee. Only exact duplicates and declared groups are kept together. Near-duplicates (a re-encoded or resized copy, a burst of similar frames) have different bytes and are not detected, and correlated assets nobody gave a group label are cut apart. Frames of one video source are kept apart only under a sequence split or a declared group label. A clean report means no exact duplicate straddles a fold, not that no leakage exists.
What keeping correlated data together needs from the user, today:
- A group label on every correlated asset. Declare one when ingesting each clip, scene or
session (sources.md); the
nuScenes import writes one, other importers do not. A label is only written
at an asset's first arrival and cannot be edited afterwards, so for data already in a project
without one, ingest it into a fresh project with the label.
partial_group_labelssays how many assets were cut alone. - One label for everything that shares a scene. Two clips of one place are one group only when they carry one label; under two labels they are two groups unless identical bytes bridge them.
- Enough groups for the folds. The fractions apply to groups, so three folds need at least
three, and
too_few_unitssays when there are fewer. A class held by fewer groups than folds can only reach some of them, and is not reported as missing.
An export writes these folds and no others. The assignment is cut once, over the whole frozen
manifest, and handed to the format plugin as assignment= beside the manifest; the plugin
places each asset by it and never cuts its own. That matters when a release holds images and
scans: an image format is handed only the images, and a cut by count over fewer assets would draw
other boundaries, so its folds would stop matching assignment and an augmented variant, generated
for a train asset, could land in val. A plugin whose export does not take the keyword is
called without it, as before.
On the recorded baseline, publishing 5,000 assets with
15,000 labels took 2.7 s, verifying them (re-hashing 594 MB of blobs) 0.6 s, and computing the
split folds 0.1 s. A 3,000-frame sequence with 36,000 tracked boxes published in 9.5 s at 272 MiB
peak RSS. An ultralytics export of the 5,000 images wrote in 1.7 s, and the zip the background
job adds took another 11 s. While both exist, an export needs about twice its own size in free
disk. Thresholds and untested sizes are in performance.md.
- No
delete. A release is the immutable artifact. The only thing that removes one is deleting its project, whose cascade takes it - and even then the manifest blob survives, because blobs are never deleted. - No
confirm=. That guard is for destroying data, and publishing destroys nothing. This is not a third exemption fromConfirmationRequired. - No change-log entry. The dataset log records mutations of the trunk, and
publishing mutates nothing in it. "A release happened" is a domain event -
ReleasePublished, carrying the manifest hash - not a curation entry. - No mutation at all.
Releaseis a frozen model, so the refusal belongs to the type rather than to a service method that could be forgotten.
Exporter.export(release, manifest, dest) takes the manifest beside the release rather than off
it: a Release only names its document, so an exporter given the release alone would hold a
hash and no way to resolve it. ReleaseService.manifest is what a caller resolves it with.
Coordinate normalization a format requires happens in the exporter, never in the domain.
ReleaseService.export(release_id, exporter, dest, *, allow_lossy=False, allow_non_empty=False) takes an Exporter
instance, never a format name, and that is structural rather than stylistic: import-linter
forbids visionset.kernel from importing visionset.formats at all. Resolving a name to an
implementation therefore belongs to whoever composed the call.
visionset.formats.registry is where that happens - exporters() scans the
visionset.formats entry-point group and pick(installed, name) refuses an unknown one with
ExportFormatNotFound. Discovery is importlib.metadata, never a hardcoded map and never an
if fmt == "coco" chain, because that is the whole plugin promise: a third-party distribution
registers into the same group and is indistinguishable from a built-in. The group carries
importers too, so what comes back is filtered by isinstance(plugin, Exporter) rather than by a
naming convention.
Exporter.lossy says the format drops information the kernel can represent - a geometry
variant, an attribute kind, per-annotation provenance. It is a property of the format and
not of a particular release: a bbox-only format loses a polygon whether or not today's dataset
happens to hold one, and asking per release would mean re-answering on every export and getting
a different answer as the data drifted.
An export that would lose something raises LossyExportNotConsented unless the caller passes
allow_lossy=True. That is a third word beside confirm= and allow_destructive=, and the
three are never one except: confirm= guards destroying data, allow_destructive= guards
narrowing a contract, and this guards emitting an incomplete copy of something that stays
exactly as it was. The refusal happens before anything is created, so a refused export leaves no
half-written directory behind.
lossy is a blanket claim nobody can check. Exporter.supported_geometries is the checkable
half of it: the set of GeometryType members the format can write. supported_modalities sits
beside it: the asset modalities the format can write, judged below.
ReleaseService.check_export(release_id, exporter) judges one release's frozen manifest
against one format's declaration and returns an ExportCompatibility:
{
"release_id": "…", "format": "yolov5-yaml", "compatible": false,
"format_is_lossy": true, "consent_required": true,
"excluded_annotations": 40, "excluded_assets": 40,
"degraded_annotations": 1204, "degraded_assets": 310,
"classes": [
{"label_class": "lane", "geometry": "polygon", "status": "degraded",
"annotations": 1204, "assets": 310,
"reason": "yolov5-yaml writes a polygon as its bounding box; the shape is lost",
"cropped_by": null},
{"label_class": "sign", "geometry": "bbox", "status": "supported",
"annotations": 8800, "assets": 2400, "reason": null, "cropped_by": null},
{"label_class": "weather", "geometry": "classification_tag", "status": "dropped",
"annotations": 40, "assets": 40,
"reason": "yolov5-yaml cannot place a classification_tag and drops it",
"cropped_by": null}
],
"dropped_modalities": [],
"untagged_assets": 0
}One row per (label_class, geometry), not per class. A class accepts a set of
geometries (schemas.md), and a format's answer can differ across it: a class
labelled both as boxes and as outlines is, to YOLO, one half written whole and one half
written reduced. It contributes two rows. A single row could carry only one of those verdicts
and would describe half its own output wrongly whichever it picked - the same defect
compatible: bool had before three statuses replaced it, one level down.
The one exception is a recipe whose resize crops (fill or center_crop): the labels it cuts
away or cuts down move to dropped and degraded rows of their own with cropped_by naming
the strategy, so a class can have up to three rows for one geometry and each row's count is
the labels that meet its status. cropped_by is null on every other row. See
preprocessing.md.
A class the schema declares and nobody used still gets a row per geometry, at zero. Zero excludes nothing, so it never makes a report incompatible however unsupported its shape is.
status has three values, and the reason is #158. Until then a class was supported: true or
supported: false, and that single word was read with two different intents by two parts of the
system that were each internally consistent:
_compatibilityread "not insupported_geometries" as will not be in the output, and counted it inexcluded_annotations.- The YOLO and VOC exporters read the same declaration as convert it to something I can write, and emitted the polygon as its axis-aligned bounding box - which is a real capability #62 and #414 deliberately included, documented in both module docstrings.
So a user exporting a release of 3 boxes, 2 polygons and 1 tag was told three annotations would be lost, consented, and received four label rows where the API held two exportable boxes. The extra two carried the polygon's own class name and were well-formed in every way a validator can check: every index real, every coordinate in range. Nothing was corrupt; it simply was not what the report promised.
The fix is vocabulary rather than capability. Exporter declares two geometry sets:
supported_geometries- written as they stand.degraded_geometries- written, having lost something the kernel could represent.{obb, polygon}foryolov5-yaml,darknetandvoc, each written as its axis-aligned bounding box;{polygon}forsegmentation-pngandcoco-panoptic, which rasterize a polygon into their pixel maps; and empty forcoco, which writes a box, a polygon, a mask (as RLE) and keypoints as themselves and drops a rotated box, a polyline, a classification tag and the 3D geometries, foryolo-obbanddota, which write a rotated box as itself and drop everything else, forlabelme, which writes boxes and polygons as themselves and drops everything else, forcreateml,open-imagesandtfrecord, which write boxes as themselves and drop everything else, and forcvat-imagesandcvat-video, which write a rotated box as a CVAT box and itsrotation. The two sets are disjoint, andsupportedwins if a plugin says both, because resolving a contradiction towards the weaker claim would report a loss that does not happen.
A geometry in neither set is dropped. excluded_annotations counts dropped only -
the number that disappears is the number worth having under that name - and degraded_annotations
sits beside it. compatible is false for either, so the allow_lossy gate did not move: a
polygon flattened to a box has lost its shape, and the consent it always required is still
required. Only the accounting became true.
The guard that comes with it is the part worth keeping: tests/formats/test_report_agreement.py
exports the same release through every installed format and counts the annotations in the
written label files, XML documents and COCO JSON. It asserts excluded_annotations equals what
the artifacts are actually missing, rather than restating an expected number. A fourth exporter
either lands a counter there or is declared non-writing, and the test fails until somebody
chooses - which is how a format that converts silently stops being possible.
Three more properties are worth stating, because each is a decision rather than a detail.
A class with zero annotations excludes nothing, whatever its status. A schema that declares
mask and holds no masks is carried whole by a format that cannot write one. The row is still
published, with its zeros, because "this format cannot write masks and you have none" is an
answer somebody is looking for.
The counts are per class and there are two of them. annotations is what would be lost and
assets is how wide the loss is - a thousand labels over a thousand images and the same thousand
over ten are the same total and a very different dataset, which is the argument DatasetStats
already makes.
It is computed from the manifest, never from live membership. An export describes a release, and a release is a snapshot: curating an asset out of the trunk afterwards does not move the answer. That is what lets one document be shown in a consent dialog, attached to a refusal and written into the output without three chances to disagree.
Modality is judged first, from the manifest. A version-5 ManifestAsset records its modality,
and an asset whose modality the format does not list in supported_modalities is absent from the
output whole. It gets one row per modality in dropped_modalities - modality, assets,
annotations and a reason - is counted in excluded_assets and excluded_annotations, and
makes the report incompatible, so the export needs allow_lossy. Its labels appear in no row of
classes, which judge only what reaches the format, and the export never hands such an asset to
the plugin, nor is its blob read: an image export does not refuse because a scan's blob is
missing. A plugin that declares no supported_modalities, as every one did before scans existed,
writes images: it is still discovered, and a release's scans are reported dropped for it rather
than breaking the export. kitti is the one installed format that writes a point cloud, and it
writes nothing else, so it reports a release's images dropped by count and every other format
reports its scans dropped.
A release whose every label sits on assets a format cannot open is refused, as below; one holding
no label at all still exports, and handed no asset the ultralytics, yolo-obb, yolov5-yaml and
darknet dialects write no descriptor, because no fold exists for its train key to name.
A tracked-only format drops what no track observes. A format may declare tracked_only, as
mot and cvat-video do, because a MOT row or a
CVAT track shape is one observation of one track. A label
that format would otherwise write and no track in the release observes leaves its row for a
dropped row of its own, with its own counts and a reason saying no track observes it, so an
untracked box is counted in excluded_annotations and asks for consent like any other loss.
A single-tag format keeps one tag per asset. A format may declare single_tag, as
classification-dir does, because a class directory gives a
picture one class. Of an asset's tags, the first by class name in code-point order is kept; each
other tag leaves its row for a dropped row of its own, counted in excluded_annotations. An
asset with no tag to keep is not written at all and is counted in untagged_assets; it is
counted in excluded_assets too only when it also carries a label the format drops. A non-zero
untagged_assets makes the report incompatible and is named in the refusal, so either loss asks
for consent.
export refuses with LossyExportNotConsented when the report says this release would lose
something: a label dropped or reduced, an asset left out, or a facet its written labels hold that
the format's lossy declaration covers. A format says what that declaration covers in
loses, a set of ExportFacets - attributes, confidence, provenance (anything but human, or a
model_ref), tracks, sequences, groups, calibration, keypoint names, vertex visibility (a polyline that records one state per
point) and unjudged vertices (a polyline recording unlabeled for a point) - and the report lists the ones this release holds in uncarried. ultralytics,
yolo-obb, coco-panoptic, tusimple, culane, curvelanes and bdd100k-lane declare all
of them, so a pure rotated-box release of human labels exports to yolo11-obb without asking;
a format losing vertex visibility whole reports it alone, not unjudged vertices beside it.
openlane-2d declares every facet but the vertex visibility, tracks and sequences it writes, and
adds tracks and sequences for a release holding a sequence it cannot lay out as a segment, so
the facets a format loses only for some releases are named only for those.
A lossy format that names nothing it loses asks every time, since its loss cannot be checked; a
format declaring itself lossless still cannot silently drop a geometry it never claimed to write.
The report states that rule as a field. consent_required is not compatible, or uncarried
non-empty, or a lossy format without loses, computed once where the report is built, and
export gates on the field and on nothing else, so check_export and the refusal cannot
disagree. compatible keeps its meaning, the verdict on this release: a lossy format over a
release it carries whole but whose labels hold attributes reports compatible: true, consent_required: true and names attributes in uncarried. A caller asking "will
export_release go through without allow_lossy?" reads consent_required, never compatible.
tests/kernel/test_export_consent_parity.py holds the two to one answer for every registered
format. The field is additive on the wire, and a report file written before it existed reads with the field
derived by that same rule; a client that ignores it behaves as before.
format_notes lists what every export of the format writes in place of something no release
holds, in the exporter's own words; it asks for no consent. kitti names its placeholder
calibration there, so export --check and check_export say it before the files are written.
The refusal carries the report, so a caller can say what it is consenting to without asking
twice: LossyExportNotConsented.compatibility in Python, and detail.compatibility on the API's
409, in the MCP error envelope and in the CLI's --json refusal.
Consent accepts a loss. An export that would drop every label the release holds - every row
of the report dropped, whether by the format, the target, a tracked-only or single-tag rule or
modality - is not a lossy copy of the release but a set of pictures that read as negatives, so
export and require_export_consent refuse it with 409 EXPORT_SOURCE_UNREADABLE before anything
is written, with or without allow_lossy, and before any recipe refusal, and assess_recipe
and check_export answer with that refusal. A recipe the export refuses is refused before consent
is asked too; check_export raises it, except a step the target's task cannot serve
(AUGMENTATION_INCOMPATIBLE), which it answers as refusal on the report. The
message counts the labels and names the geometries (or the modality) a target or format must carry
instead, and the export-target catalog lists which do: yolo-obb, dota and the *-obb targets
for rotated boxes, segmentation-png for masks. check_export still answers with the report, every row
dropped, its refusal carrying the export's sentence and consent_required false, since no consent
settles it. A target drops a shape it does not carry even where its format would write it reduced -
yolov4 or the voc target over a polygon, which the darknet or voc format writes as its box -
because the plugin is never handed it. A release with no label at all, every asset a reviewed
negative, is not refused, and an export writing any label asks for consent for the rest exactly
as before. The rule is applied in
the release service, so the SDK, REST, the CLI and MCP refuse alike.
A successful export writes visionset-export-report.json at the root of dest: the same
document, key for key. It is the kernel's file rather than the format's, so it is written after
the plugin runs (a plugin that clears its own subdirectory would otherwise take it along) and is
excluded from ExportResult.file_count on both sides - not counted when written, and skipped
when an earlier run left one behind. That is what keeps "an exporter that writes nothing reports
zero" true, and keeps exporting twice into one directory agreeing with itself.
ReleaseService.export(..., recipe=, recipe_name=, drivers=) applies a pre-processing
recipe: every image is resized as the recipe says, and augmented variants of
the train-fold images are written beside their sources as <hash>-aug<k>. The recipe is a
value the export snapshots - the report carries the spec it ran with, its hash, the Pillow
version, the drivers, every variant's plan and, for a recipe that
balances classes, each class's train labels before and
after (see the report, version 3) - so editing
or deleting the stored recipe afterwards changes nothing here. Balancing changes how many
variants a train image gets, never the release, its manifest or which fold an asset is in. The narrowing
above runs first and the recipe runs over what is left, so a geometry the target drops can never
make a step refuse; consent is asked before any transform. check_export(..., recipe=) refuses
now what the export would refuse: AugmentationRequiresSplit for an augmenting recipe over a
release published without a split, PreprocessingStepUnsupportedGeometry for a step that
cannot move a geometry the export would carry, and AugmentationIncompatible for any other step the
compatibility resolver refuses - the target
training a label for a task the op does not serve, among others. A recipe reads and writes images, so an export that
would hand the format a scan refuses one, at the check and at the export, with
ExportSourceUnreadable. ExportResult separates source_file_count from
augmented_file_count, and preprocessing on the report maps every written image to the asset
it came from.
ReleaseService.assess_recipe(release_id, exporter, recipe, target=, drivers=) asks the same
question of a draft recipe and answers instead of raising: the resolver's verdicts, then either
the files the export would write or the refusal it would raise with allow_lossy, as its error
code and message. It runs the transform check_export runs, then the format itself into a
scratch directory, and catches only the recipe refusals listed above, so the two cannot
disagree. source_files and augmented_files equal the export's source_file_count and
augmented_file_count, because both count the images the format reads. Consent is not judged:
the loss a lossy format or a cropping resize asks allow_lossy for is check_export's answer.
An unknown release or a damaged manifest still raises. Over REST it is
POST /releases/{id}/recipe-assessment, with the spec as the body and the export's target or
format; the CLI's recipe assess and MCP's assess_recipe answer from the same call. See
preprocessing.md.
The report an augmenting export writes records every variant's plan, so it can be checked later:
replay_report(raw, drivers) in visionset.kernel.services reads a report of any version and
replays it against the installed drivers, which is what visionset recipe replay and MCP's
replay_export_report call. See
determinism.
The user-facing unit of export is a target: the model the release will train. A target
resolves to exactly one format - the dialect that writes its descriptor grammar - and a model
with two trainer homes gets two named targets, never a runtime switch. Every installed format
declares the targets it writes for on the Exporter port, and a format that is not a trainer's
declares one target named after itself, family other, so every export is addressed the same
way. The kernel derives the catalog from those declarations; GET /export-targets,
visionset target list and the list_export_targets tool all render the same derivation, and
nothing keeps a list by hand. The registry refuses a target declared by two installed formats
(ExportTargetConflict) and a target promising a geometry its format never writes
(InvalidExportTarget), at the scan rather than at the first export.
The catalog this build ships, generated from the declarations by
scripts/export_target_catalog.py and held current by a drift gate:
| Target | Label | Family | Format | Tasks | Geometries | Recommended size | Strategy |
|---|---|---|---|---|---|---|---|
bdd100k-lane |
bdd100k-lane | other |
bdd100k-lane |
— | polyline | — | — |
classification |
classification | other |
classification |
— | classification_tag | — | — |
classification-dir |
classification-dir | other |
classification-dir |
— | classification_tag | — | — |
coco |
coco | other |
coco |
— | bbox, keypoints, mask, polygon | — | — |
coco-panoptic |
coco-panoptic | other |
coco-panoptic |
— | mask, polygon | — | — |
createml |
createml | other |
createml |
— | bbox | — | — |
culane |
culane | other |
culane |
— | polyline | — | — |
curvelanes |
curvelanes | other |
curvelanes |
— | polyline | — | — |
cvat-images |
cvat-images | other |
cvat-images |
— | bbox, classification_tag, obb, polygon, polyline | — | — |
cvat-video |
cvat-video | other |
cvat-video |
— | bbox, obb, polygon, polyline | — | — |
dota |
dota | other |
dota |
— | obb | — | — |
kitti |
kitti | other |
kitti |
— | cuboid_3d | — | — |
labelme |
labelme | other |
labelme |
— | bbox, polygon | — | — |
mot |
mot | other |
mot |
— | bbox | — | — |
open-images |
open-images | other |
open-images |
— | bbox | — | — |
openlane-2d |
openlane-2d | other |
openlane-2d |
— | polyline | — | — |
segmentation-png |
segmentation-png | other |
segmentation-png |
— | mask, polygon | — | — |
tfrecord |
tfrecord | other |
tfrecord |
— | bbox | — | — |
tusimple |
tusimple | other |
tusimple |
— | polyline | — | — |
voc |
voc | other |
voc |
— | bbox | — | — |
yolo-obb |
yolo-obb | other |
yolo-obb |
— | obb | — | — |
yolo11 |
YOLO11 | ultralytics-yolo |
ultralytics |
classify, detect, pose, segment | bbox, classification_tag, keypoints, polygon | 640×640 | letterbox |
yolo11-obb |
YOLO11-OBB | ultralytics-yolo |
yolo-obb |
obb | obb | 640×640 | letterbox |
yolo12 |
YOLO12 | ultralytics-yolo |
ultralytics |
classify, detect, pose, segment | bbox, classification_tag, keypoints, polygon | 640×640 | letterbox |
yolo12-obb |
YOLO12-OBB | ultralytics-yolo |
yolo-obb |
obb | obb | 640×640 | letterbox |
yolo26 |
YOLO26 | ultralytics-yolo |
ultralytics |
classify, detect, pose, segment | bbox, classification_tag, keypoints, polygon | 640×640 | letterbox |
yolo26-obb |
YOLO26-OBB | ultralytics-yolo |
yolo-obb |
obb | obb | 640×640 | letterbox |
yolov10 |
YOLOv10 | ultralytics-yolo |
ultralytics |
detect | bbox | 640×640 | letterbox |
yolov3 |
YOLOv3 | ultralytics-yolo |
ultralytics |
detect | bbox | 640×640 | letterbox |
yolov4 |
YOLOv4 | community-yolo |
darknet |
detect | bbox | 416×416 | stretch |
yolov5 |
YOLOv5 | ultralytics-yolo |
ultralytics |
classify, detect, segment | bbox, classification_tag, polygon | 640×640 | letterbox |
yolov6 |
YOLOv6 | ultralytics-yolo |
ultralytics |
detect | bbox | 640×640 | letterbox |
yolov7 |
YOLOv7 | community-yolo |
yolov5-yaml |
detect | bbox | 640×640 | letterbox |
yolov8 |
YOLOv8 | ultralytics-yolo |
ultralytics |
classify, detect, pose, segment | bbox, classification_tag, keypoints, polygon | 640×640 | letterbox |
yolov8-obb |
YOLOv8-OBB | ultralytics-yolo |
yolo-obb |
obb | obb | 640×640 | letterbox |
yolov9 |
YOLOv9 | ultralytics-yolo |
ultralytics |
detect, segment | bbox, polygon | 640×640 | letterbox |
tasks is the trainer's vocabulary cut to what an export for the target serves: every task it
lists is fed by a geometry it carries, and a test holds that for every installed target. So a
trainer's task no format writes for is not listed: semantic and depth appear on no target, and
the obb task of the YOLOv8, 11, 12 and 26 trainers is served by their own targets, yolov8-obb,
yolo11-obb, yolo12-obb and yolo26-obb, which yolo-obb writes,
rather than by yolov8, yolo11, yolo12 and yolo26, which the ultralytics dialect writes
without an angle. geometries is what an export addressed to the target carries, which is never
wider than the format writes and narrower where the trainer has no task for a shape. mask has no
trainer task but is exportable: segmentation-png writes it as class-index PNGs, the route
semantic masks leave by; no YOLO semantic target is declared. Keypoints, and so pose, are written
by the targets that list keypoints.
A target narrows its format. check_export, require_export_consent and export each take
an optional target, and a geometry the format writes whole but the target's trainer has no task
for is reported dropped with a reason naming the target - consented through the same allow_lossy
gate as every other loss. The export then honours the drop the report promises: the plugin is
handed the manifest with every annotation the target does not carry removed, because the port has
no word for a target and a promise the report makes must not depend on every plugin reading a
declaration it cannot see. The class vocabulary stays whole, since a class index is the frozen
schema's. The report and the ExportResult both record target - null when the export was
addressed to a format alone - so a reader of visionset-export-report.json can tell which question
it answers.
The per-export task is derived, never chosen. segment when the target accepts it and the
manifest carries any polygon; otherwise classify when the target accepts it and the manifest
carries classification tags and no box or polygon; otherwise detect. Because the manifest a
target-addressed export hands to the plugin already holds only what the target carries, the
derivation and the declaration cannot disagree: a yolov10 export of a release holding polygons is
a detect layout of its boxes, and the report says the polygons were dropped.
Three formats write a YOLO detection dataset, and they differ only in the descriptor grammar; the
fourth YOLO layout, Ultralytics OBB, is written by yolo-obb. Each is a
dialect: the wire identifier format_name names the descriptor grammar, and the model a person
will train - the target - resolves to exactly one dialect. ultralytics is what every trainer
from YOLOv3 to YOLO26 in the Ultralytics line reads; yolov5-yaml is the older grammar YOLOv7
reads; darknet is the Darknet-framework layout YOLOv4 reads. yolo, the former name of ultralytics, is accepted as an alias until the release after
next, and then removed. Every surface resolves it to the same plugin and reports format_name as
ultralytics; only the CLI warns, because visionset export --format yolo has a stderr to say
so on. POST /releases/{id}/export?format=yolo and export_release(format="yolo") accept it
silently, the response carrying no deprecation text at all - a warning has no field to land in
on a 202 or in a tool result.
The layout both share:
data.yaml
images/train/<content-hash>.png labels/train/<content-hash>.txt
images/val/… labels/val/…
images/test/… labels/test/…
visionset-export-report.json
Four of v1's decisions are deliberately not kept, and each was a way to be wrong quietly.
Classes come from the frozen schema, never from the annotations present. v1 built its class
index by sorting the names it found in the labels, so a class nobody had used yet vanished from
data.yaml - and, worse, drawing the first box of a new class renumbered every other class. A
model trained against one export and evaluated against the next is then wrong with nothing to
report it. Here the order is Manifest.classes, the project's authored schema order frozen at
publication, and every class gets an index whether or not anything uses it. Indices are positions
in that order, so they are contiguous from zero by construction - a class carries no number of
its own that could leave a gap.
A read failure aborts. v1 wrapped the image read in except Exception: pass and wrote the
label file anyway, so one lost object produced a training set silently short of an image and
carrying labels pointing at nothing. Every read goes through the ContentReader the kernel
composes, and a missing or undecodable blob is 409 EXPORT_SOURCE_UNREADABLE naming the asset.
Pixel dimensions are required. v1 parsed "WxH" out of a string and fell back to (1, 1),
which does not fail - it divides by one and writes raw pixel coordinates into a file whose whole
contract is that every number is a fraction. An asset with no recorded size is refused by name.
Files are named by content hash. v1 used the original filename with a _2 de-duplicating
suffix, which makes the mapping depend on iteration order and lets one picture ingested from two
directories land twice. A hash is stable across machines and runs and cannot collide. The cost is
that the names are not human-readable, which a directory destined for a trainer does not need.
The descriptor is path: ., one key per fold present, and names as a mapping from index:
path: .
train: images/train
val: images/val
test: images/test
names:
0: "sign"
1: "lane"There is no nc; the trainer counts the mapping. train and val are both required by the
trainer, so a release published without a recipe - one undivided set - still declares val and
points it at the training images: that says "there is no held-out set", where omitting the key
would say "this file is malformed". test is written only when it has something in it. path: .
resolves against the working directory of the process that loads the file, so a training run
starts from inside the export directory. images/ → labels/ is a string substitution on the
resolved image path, not a configured location, so those two directory names are load-bearing.
The task is derived from the release, never chosen. One export is written for one of the trainer's tasks:
posewhen the release holds any keypoints label - see below;segmentwhen the release holds any polygon - every polygon is written as its vertices and every box as its four corners, so nothing located is reduced;classifywhen the release holds classification tags and no box or polygon - the export is then the class tree the trainer reads,<fold>/<class>/<image>, one copy of an image per tag it carries, with a directory for every tag-capable class whether or not anything used it, and nodata.yaml;detectotherwise -class cx cy w hper box, clamped into the image.
supported_geometries is {bbox, polygon, classification_tag, keypoints} and degraded_geometries is
empty, so a rotated box is dropped: the oriented-box layout ultralytics reads is
yolo-obb, a format of its own. A tag beside a located label has no layout to land in and is not written, so the format
also declares solitary_geometries = {classification_tag}: whenever a box or polygon reaches the
output, the report lists every tag row as dropped and counts it in excluded_annotations,
which is what the label files hold. A tags-only export is a class tree, and an asset with no tag
is not written: the report counts it in untagged_assets. lossy = True with loses naming every
facet, so consent is asked only when the release holds one. An asset with nothing on it gets an empty label file rather than
none: ultralytics reads a missing file as "nobody looked" and an empty one as "somebody looked and
there is nothing here", and a detector needs the second.
When the release holds a keypoints label, every label row is
class cx cy w h x1 y1 v1 ... xN yN vN, normalized and clamped into the image, and the
descriptor adds kpt_shape: [N, 3]:
path: .
train: images/train
val: images/val
kpt_shape: [17, 3]
names:
0: "person"- The box is derived. The domain keeps a keypoints label as its points alone, so the box is
the tight extent of the labeled points (visibility
1or2), clamped to the image; a label with no labeled point has an empty box at the origin. On import the row's box is ageometryloss, never a second label. - Visibility is COCO's.
vis the stored0,1or2; a label recording no visibility writes2for every point, and an unlabeled point is written0 0 0. - No point names, no skeleton, no
flip_idx. The format has a slot for none of the first two, and the domain records no left-right pairing for the third, so a trainer's flip augmentation needs aflip_idxadded by hand. That is part of whylossy = True. - Keypoints only, one count.
kpt_shapeis one count for the whole file and a pose row has one shape, so the export is refused with409 EXPORT_SOURCE_UNREADABLE, before anything is written, when a box or polygon is beside the keypoints or two keypoint counts are present; the message names the classes. A tag beside them is dropped and reported, as beside a box. To write the boxes of such a release instead, address the export to a target without pose (yolov5,yolov9, ...), which drops the keypoints and derivesdetectorsegment. - Which targets carry it.
yolo26,yolo12,yolo11andyolov8, the ones whose trainer has a pose task, listkeypointsin their geometries; every other target drops it.
Read back by the ultralytics importer, a pose export keeps the class index, the point order,
the visibility and the coordinates to the writer's six decimals of a normalized side (within
half a millionth of the image's width or height); the point names come back as kp1 to kpN
and the skeleton is lost.
The descriptor has no path key, every split path starts ./ and resolves against the yaml's
own directory, nc is an integer, and names is a list:
train: ./images/train
val: ./images/val
test: ./images/test
nc: 2
names: ["sign", "lane"]Detection only, always. supported_geometries is {bbox} and degraded_geometries is
{obb, polygon}: a polygon or a rotated box is written as its axis-aligned bounding box, and the report counts it as
written in a reduced form and says which classes and how many. A classification tag has no
location and is dropped rather than given an invented box.
The descriptor is obj.data, a list of key = value lines, beside obj.names (one class per line, in
the release's frozen schema order) and the image lists train.txt and valid.txt:
classes = 2
train = train.txt
valid = valid.txt
names = obj.names
backup = backup/
The lists hold one image path per line, relative to the export root (images/train/<hash>.jpg),
and Darknet finds each label by swapping images for labels in that path, which is the layout
the other dialects already write. valid.txt is always written: a release with no validation fold
points it at the training list, as yolov5-yaml points val at the training images. Darknet has
no test key, so test images are written under images/test and listed in neither file.
Detection only, always, with the same capabilities as yolov5-yaml: a polygon or a rotated box is
written as its axis-aligned bounding box and reported as reduced, and a classification tag is dropped. The one
target is yolov4; yolov3 stays with ultralytics.
Two formats write rotated boxes (obb), and only rotated boxes: yolo-obb for the oriented-box
models in the Ultralytics line (yolo11n-obb and its siblings) and dota for the DOTA benchmark
and the toolkits that read it. The CVAT XML formats also write a rotated
box as itself, beside their other geometries. Ordinary YOLO detection is a different format: a class cx cy w h row has no angle, so ultralytics, yolov5-yaml and darknet either drop a rotated box or
write its enclosing axis-aligned box and report it degraded. Here the rotated box is native -
supported_geometries is {obb} and degraded_geometries is empty - and every other geometry is
dropped and reported dropped. Nothing is converted on the way out: a four-point polygon that
happens to be a rectangle is a polygon, and is dropped like any other. Both declare lossy = True
and a target named after the format, in family other. yolo-obb also declares the Ultralytics
OBB trainers, yolov8-obb, yolo11-obb, yolo12-obb and yolo26-obb, each with the obb task
and the ultralytics targets' 640x640 letterbox hints; the ultralytics targets keep their names
and list no obb task.
A box is written as the four corners obb_corners gives, in order round the rectangle, and read
back through obb_from_corners, which takes any start corner in either direction and returns the
canonical box (see annotations).
Corners are not clamped into the picture: clamping one corner of a box that crosses the edge
bends it into a quadrilateral that is no longer a rectangle, and Ultralytics' own DOTA converter
does not clamp either. They are written with enough digits - twelve decimals of a fraction for
yolo-obb, nine of a pixel for dota, trailing zeros dropped - that a round trip returns every
corner within 1e-6 of the box's longest side, and the angle equal modulo the canonical form;
a box whose canonical angle sits at -pi/2 may come back a hair inside pi/2, which is the same
rectangle. That is the importer's exact case, so an export reads back with no loss. A file written
elsewhere, with fewer decimals or hand-drawn whole pixels, is fitted instead: corners each within a
sixth of the shorter side of the nearest rectangle (or within one unit of their last decimal, for a
box too small to judge) import as that rectangle and a geometry loss, and anything farther is a
lost label (see import). Each picture gets a label file, empty when it holds no rotated box.
The ultralytics detection layout - images/<fold>/<content-hash>.<ext>,
labels/<fold>/<content-hash>.txt and the same data.yaml, path: ., a key per fold present and
names by index in the release's frozen schema order - with one row per rotated box:
0 0.34375 0.416666666667 0.65625 0.416666666667 0.65625 0.583333333333 0.34375 0.583333333333
a class index and four x y corners, each a fraction of the picture's width or height - here a
20 by 8 pixel box at angle 0 on a 64 by 48 picture. A release
with no recipe points val at the training images, as ultralytics does.
The benchmark's own layout, fold first, with no class list:
train/images/<content-hash>.png train/labelTxt/<content-hash>.txt
val/… val/…
test/… test/…
One row per rotated box, the corners in pixels, then the class name as the category token, then
difficult:
24 18 56 10 62 34 30 42 large-vehicle 0
No imagesource: or gsd: header is written. A category is one whitespace-free token and a row
cannot quote one, so each run of whitespace in a class name is written as a single hyphen, DOTA's
own spelling: baseball diamond is written baseball-diamond. The export report does not list the
rename, and an import of the output names the class baseball-diamond, because nothing in the file
records the original spelling. Two written classes that would share a category, such as
small vehicle and small-vehicle, refuse the export with ExportSourceUnreadable naming both,
rather than merging them. yolo-obb keeps names as they are, since they live in data.yaml.
difficult is 1 for a box carrying a boolean attribute named difficult set to true and 0
otherwise, and an import reads it back into that attribute (see import.md).
coco writes COCO instances JSON - one file per split, under
annotations/instances_<fold>.json, beside the same images/<fold>/ layout YOLO uses.
v1 had two COCO exporters and neither described a dataset. One skipped every annotation that
was not a box, the other every one that was not a polygon, so a project holding both - the
ordinary case, and now expressible in a single class since a class declares a set of
geometries - had to pick an export and silently lose the other half. There is one exporter here: COCO has always carried both, and
bbox is a required field on every annotation whether or not it also has a segmentation.
area is the polygon's own area, by the shoelace formula, not its bounding box's. v1 wrote
width * height for a segmentation, which overstates a triangle by exactly two and any concave
shape by more. That number is not decoration: pycocotools buckets detections into
small/medium/large by it, so every evaluation against such a file reports the wrong breakdown and
nothing says so.
A mask is written as compressed RLE, {"size": [height, width], "counts": "..."} - the stored
counts, byte for byte the string pycocotools encodes - with bbox the smallest pixel-aligned box
around its pixels and area its pixel count, the two numbers pycocotools computes from the same
RLE. An export reads back pixel for pixel. A mask not the size of its picture refuses the export by
asset rather than being written against the wrong frame.
Keypoints are COCO keypoint rows, in the same file as everything else. A keypoints class's
category carries keypoints, its spec's point names in order, and skeleton, its spec's edges as
1-based pairs (the spec's are 0-based); a keypoints class without a spec gets the names kp1 to
kpN and an empty skeleton, and is refused with 409 EXPORT_SOURCE_UNREADABLE when its labels
disagree about N, because a category names one list. A row carries keypoints as one
x, y, v triplet per point, num_keypoints (the points whose v is 1 or 2), bbox (the tight
extent of those points, clamped to the image: the domain keeps no box beside the points),
area (that box's), an empty segmentation and iscrowd 0. v is the stored visibility; a
label recording none writes 2 for every point, and an unlabeled point is written 0, 0, 0, so
its stored position is not kept - nobody judged it. A release may mix classes freely: a box class
and a keypoints class land in the same instances_<fold>.json.
Read back, a keypoints row is one keypoints label - class, point order, coordinates to four
decimals, visibility and spec all as written - and its box and any segmentation are a geometry
loss on import rather than a second label. A label recording no visibility reads back with every
point 2, and a class without a spec reads back with the kp1 to kpN one.
This format is not lossy, and that is the point of having a second one.
supported_geometries is {bbox, polygon, mask, keypoints}, and everything COCO has no field for - attributes,
confidence, provenance, the annotation's own id - rides in a "visionset" object on each
annotation. COCO is JSON and every reader tolerates keys it does not know; one nested object
cannot collide with a future COCO field the way four top-level keys could. So a release of boxes
and polygons exports clean, with no consent at all, and #65's report is what refuses a release
holding a classification tag - which COCO genuinely has nowhere to put.
Smaller decisions, each of which a reader can see:
- Category ids are 1-based, COCO's convention rather than ours: id 0 is conventionally
background and
pycocotoolstreats a missing category id as an error. The order is the frozen schema's, so a class nobody used still has its id. - Image and annotation ids restart at 1 in every fold.
pycocotoolsloads one file at a time and each is its own dataset; ids continuing across folds would leaveinstances_val.jsonstarting at an arbitrary number, which reads as a file with rows missing. - A box gets an empty
segmentation, not its own rectangle. A box says where something is, not what shape it is, and writing the rectangle would claim the object fills it - which a mask consumer takes literally. iscrowdis always 0, a mask's included. A1marks a region covering many instances, whichCOCOevalignores rather than matches; VisionSet has no crowd flag, a mask is one object, andpycocotoolsdecodes an RLEsegmentationwhateveriscrowdsays. A crowd region imported from COCO therefore exports as an ordinary mask, the flag already reported lost on import.infocarries the release: tag, publication moment, and the manifest hash - so an export traces back to a release that can be re-verified. Nothing reads the clock, which is why two exports of one release are byte-identical.licenseshas one entry namedunspecified. VisionSet records no licensing information about an asset anywhere, so inventing one would be a claim nobody made.
segmentation-png writes semantic segmentation as class-index PNGs: images/<fold>/<hash>.<ext>
beside masks/<fold>/<hash>.png, one mask per picture, and segmentation.json at the top - the
descriptor the segmentation-png importer requires, so an export reads back
with nothing guessed. Every class whose declared geometries include mask or polygon gets an id,
1 upward in the frozen schema's order, as COCO's categories do; a class that can never reach a
mask, a box-only or tag-only one, gets none, as classification lists only tag-capable classes.
0 is background and no id is ignore. A mask is an 8-bit greyscale (L) PNG whose grey level is
the id, or 16-bit (I;16) when there are more than 255 ids. An unlabelled picture's mask is all
background, so a picture with nothing in it reads back as one.
{
"format": "segmentation-png",
"version": 1,
"encoding": "index",
"classes": {"1": "road", "2": "car"},
"background": [0],
"ignore": [],
"images": "images",
"masks": "masks",
"splits": ["train", "val"],
"visionset": {"release_id": "...", "release_tag": "v1", "manifest_hash": "...", "overlaps": []}
}supported_geometries is {mask}: a mask's pixels are written exactly. degraded_geometries is
{polygon}: a polygon is rasterized at the picture's size, lighting each pixel whose centre it
holds, so what is finer than a pixel is lost. A box is dropped - a box says where something is, not
which pixels it covers - as are a tag and every other geometry. A class map holds one class per
pixel, so what it cannot say is content, not geometry: several masks of one class on one picture are
written as their union, one region on re-import, and a pixel two classes claim keeps the lower
id. Each picture where classes contested pixels is listed under visionset.overlaps with the
contested pixel count and the classes involved, the one that kept them included. Attributes, confidence and provenance have nowhere to go, so lossy is
true. COCO panoptic segment maps are coco-panoptic's, and RGB
colour-encoded masks are not written.
coco-panoptic writes COCO panoptic segmentation, independent of coco's instance files:
annotations/panoptic_<fold>.json, one RGB PNG per picture under annotations/panoptic_<fold>/
named <hash>.png, and the pictures under images/<fold>/. The
coco-panoptic importer reads it back, as it reads COCO's own release.
The JSON carries info (the release's tag, date and hashes, as coco writes it), one unspecified
license, images (ids 1 upward per fold, in manifest order, with file_name, width and
height), categories and annotations, one per picture with its image_id, its PNG's
file_name and segments_info. Every class whose declared geometries include mask or polygon
is a category, ids 1 upward in the frozen schema's order, as segmentation-png numbers them;
supercategory is the class's own name, since VisionSet has no class hierarchy, and isthing is
1, since VisionSet has no thing/stuff flag and a mask is one object. No color is written.
Each mask or polygon on a picture is one segment, its id 1 upward in the manifest's order of the
picture's annotations, so two exports of one release agree byte for byte. The PNG holds each
pixel's segment id as R + 256 × G + 65536 × B, and 0 (void) wherever no segment is, so an
unlabelled picture's PNG is all void. Each segments_info entry is id, category_id, area
(the segment's pixel count), bbox ([x, y, width, height], the smallest pixel-aligned box
holding it) and iscrowd 0.
supported_geometries is {mask}: a mask's pixels are written exactly. degraded_geometries is
{polygon}: a polygon is rasterized at the picture's size, lighting each pixel whose centre it
holds. A box, a tag and every other geometry are dropped. A panoptic map gives each pixel one
segment and, unlike a class map, keeps segments of one class apart, so nothing is merged: an asset
where two masks or polygons claim one pixel refuses the export, naming the asset and both
annotations, and so does one that covers no pixel - a panoptic segment holds at least one - and a
mask not the size of its picture. Every picture is checked before the first file is written, so a
refusal leaves the writer's output empty. Resolve the overlap, or export to coco, which keeps
overlapping masks. Attributes, confidence and provenance have nowhere to go, so lossy is true.
What has been checked is in the verification matrix: fixtures and round trips built in the tests. No panopticapi or other external reader is run.
voc writes one XML per image under Annotations/, the pictures under JPEGImages/, and the
folds as listings under ImageSets/Main/<fold>.txt.
That last one is the structural difference from its two siblings, and it decides the layout:
VOC splits by listing rather than by directory. A fold's file names stems, and a reader
resolves each against the one JPEGImages/ - so every image lives in one flat directory whatever
fold it is in. Putting them in per-fold directories, as YOLO and COCO do, would make every path in
those files wrong.
Coordinates are 1-based and inclusive, which is what "Pascal VOC" means. The original devkit's
annotations index from 1, and evaluation code written against them subtracts one - detectron2's
VOC loader does exactly that, with a comment saying why. A box stored as x=8, width=16 covers
0-based pixels 8..23 and is written <xmin>9</xmin><xmax>24</xmax>: sixteen pixels, counted the
way the format counts them. Writing the domain's own numbers through would be off by one against
every consumer that assumes the devkit, and off by one is the error nobody notices.
Boxes are also rounded outwards - floor on the near edge, ceil on the far one - so the
integer box covers every pixel the float box touches. Rounding to nearest would shrink a box by up
to a pixel on each side, which matters most for the small objects a detector is already worst at.
They are clamped into the image for the reason YOLO's are, and a box whose extent rounds away
still gets xmax >= xmin, because an inverted box gives a reader a negative area rather than an
error.
lossy = True and supported_geometries is {bbox}; degraded_geometries is {obb, polygon},
each written as its axis-aligned bounding box. The reason is not YOLO's: a VOC <object>
has a fixed set of children its consumers index by tag name, so there is nowhere to put an
attribute, a confidence or a provenance - where COCO can carry all three precisely because JSON
readers ignore keys they do not know.
Two values are constants rather than measurements, and both are said out loud rather than dressed
up: <depth>3</depth>, because VisionSet records an asset's width and height and not its channel
count while VOC readers expect the element; and <difficult>0</difficult> on every object, which
matters more than it looks - VOC's evaluation excludes objects marked 1 from both the ground
truth and the false positives, so writing one anywhere would silently change what a score means.
There is no reference-reader smoke test for this format, unlike the other two. VOC's devkit is MATLAB and every Python consumer parses the XML itself, so there is no loader worth pinning a CI job to: the document is the contract, and the golden-file tests assert it as text.
labelme writes one LabelMe JSON document beside each picture: <hash>.<ext> and <hash>.json
at the top of the export for a release without a split recipe, and under <fold>/ for one with.
The labelme importer reads either layout back.
Each document holds every key LabelMe's own loader reads, and nothing more: version (5.5.0,
the schema written rather than a tool that wrote it), flags ({}), shapes, imagePath (the
picture's file name, relative to the document), imageData (null: the picture is linked, never
embedded), imageHeight and imageWidth. A box is a rectangle of its top-left and bottom-right
corners, [[x, y], [x + width, y + height]], and a polygon a polygon of its vertices; every
coordinate is written as stored, in pixels, unrounded. A shape's flags are its boolean attribute
values and its description its string attribute description (empty without one); group_id
and mask are null.
lossy = True and supported_geometries is {bbox, polygon}, with nothing degraded: rotated
boxes, polylines, masks, tags and 3D geometry are dropped and reported, and confidence,
provenance and every attribute value other than a boolean and description have nowhere to go.
An export opens in LabelMe 7.9.1's own reader without repair; other LabelMe versions were not
tried.
createml writes Apple Create ML's object-detection annotation JSON, and only that: Create ML's
other tasks (classification folders, hand pose, activity, and so on) are not written. Each folder
of the export is one Create ML data source - its pictures as <hash>.<ext> beside one
annotations.json - at the top of the export for a release without a split recipe, and under
<fold>/ for one with. The createml importer reads either layout back.
The file is a JSON array with one entry per picture, labelled or not:
[
{
"image": "<hash>.png",
"annotations": [
{"label": "sign", "coordinates": {"x": 12.35, "y": 3.65, "width": 4.1, "height": 1.9}}
]
}
]x and y are the box's centre, in pixels of the picture as stored, y growing downward;
width and height are its extent, written as stored. VisionSet stores a box by its top-left
corner, so the centre is x + width / 2 and y + height / 2, rounded to ten decimal places so
the file holds no float noise such as 12.350000000000001; the importer subtracts half the extent
and rounds the same way, so a box stored with at most ten decimals reads back exactly. A box that
crosses the picture's border is written as it stands, centre and all, never clamped.
lossy = True and supported_geometries is {bbox}, with nothing degraded: polygons, rotated
boxes, polylines, masks, tags and 3D geometry are dropped and reported, and attributes,
confidence and provenance have nowhere to go. The file records no picture size, which a reader
takes from the picture itself. The output was checked against the documented schema, not opened
in Create ML itself, which runs only on macOS.
open-images writes the box annotations of Open Images, as V4 to V7 publish them, and nothing
else of that dataset: no image-level labels, segmentation masks or visual relationships. The
export holds class-descriptions-boxable.csv, one <split>-annotations-bbox.csv per split that
holds pictures, and the pictures as <split>/<hash>.<ext>, the content hash being the ImageID.
A release without a split recipe is all train; with one, val is written validation, as Open
Images names it. The open-images importer reads it back.
LabelName,DisplayName
sign,sign
ImageID,Source,LabelName,Confidence,XMin,XMax,YMin,YMax,IsOccluded,IsTruncated,IsGroupOf,IsDepiction,IsInside
<hash>,,sign,1,0.25,0.75,0.25,0.75,1,-1,0,-1,-1
VisionSet holds no Open Images MID, so LabelName and DisplayName are both the class's name.
XMin and XMax are the box's left and right edges divided by the picture's recorded width, YMin
and YMax its top and bottom divided by its height, y growing downward; the far edge is first
rounded to ten decimal places of a pixel and each fraction written as the shortest decimal that
reads back as the same float, so the importer, rounding again to ten decimals of a pixel, recovers
a box stored with at most ten decimals exactly. A box that crosses its picture's border is written
as it stands, with fractions below 0 or above 1, never clamped.
Source is blank, because it names how Google drew a box. Confidence is the label's confidence,
or 1 - ground truth - when it has none. IsOccluded, IsTruncated, IsGroupOf, IsDepiction
and IsInside are 1 or 0 from a boolean attribute of exactly that name, which the importer
also creates, and -1, Open Images' unknown, otherwise.
lossy = True and supported_geometries is {bbox}, with nothing degraded: polygons, rotated
boxes, polylines, masks, tags and 3D geometry are dropped and reported, and every other attribute
and the provenance have nowhere to go. A test reads the export with Python's csv module and
Pillow alone, by the published column spec; no Open Images tool was run against it.
tfrecord writes the TensorFlow Object Detection API's tf.train.Example dataset schema - not
an arbitrary TFRecord, which is only a container - without TensorFlow or protobuf: the record
framing (length, masked CRC32C of the length, data, masked CRC32C of the data) and the protobuf
wire format are written by hand. The export holds label_map.pbtxt and one uncompressed
<split>.tfrecord per split that holds pictures, train for a release without a split recipe,
train, val and test with one. Every picture is one record, written whether or not it carries
a box. The tfrecord importer reads it back, and also reads GZIP-compressed
and sharded record files.
item {
id: 1
name: "sign"
}
The label map's ids are 1 upward in class-name order, so the same classes always get the same
ids; 0 is the background the API reserves. Each record's features are:
| Feature | Type | Value |
|---|---|---|
image/encoded |
bytes | the picture's own bytes, JPEG or PNG |
image/format |
bytes | jpeg or png |
image/filename |
bytes | <hash>.<ext> |
image/source_id |
bytes | the content hash |
image/height, image/width |
int64 | the recorded size |
image/object/bbox/xmin, xmax, ymin, ymax |
float | per box, its edges divided by the width or height |
image/object/class/text |
bytes | per box, the class name |
image/object/class/label |
int64 | per box, the class's label-map id |
image/object/difficult, truncated, is_crowd |
int64 | per box, 1 or 0, only when a box of the picture carries a boolean attribute of that name |
A box is clamped into its picture, as the API expects fractions in [0, 1]; its far edge is first
rounded to three decimal places of a pixel. The fractions are float32, so the importer rounds each
corner back to three decimals of a pixel: a box whose corners carry at most three decimals reads
back exactly on a picture up to 16,384 pixels a side, and any other within half a thousandth of a
pixel plus the size over 2^25. A box with a flag attribute absent is written 0 beside one that
has it, and reads back false.
lossy = True and supported_geometries is {bbox}, with nothing degraded: polygons, rotated
boxes, polylines, masks, tags and 3D geometry are dropped and reported, and confidence, every other
attribute and the provenance have nowhere to go. Instance masks and keypoints are deliberately not
written in this version. A WebP picture refuses the export, because the API decodes JPEG and PNG.
A test decodes the export with its own TFRecord and protobuf parser, by the published feature names;
no TensorFlow was run against it.
The one installed format whose content is tags, and the only one that does not drop them. It
writes the pictures the way YOLO does - images/<fold>/<content-hash>.<ext> - plus two files at
the root: labels.csv, and classes.txt naming the label space.
labels.csv has three columns, image,fold,class, and one row per tag annotation. An image
carrying three tags appears three times, under one path, once per tag; its bytes are written once.
The kernel enforces no (asset, class) uniqueness for a classification tag, so two annotations of
the same class on one image produce two identical rows - the count follows the annotations exactly,
duplicates included, rather than deduplicating a label space this format does not own. The obvious
alternative - a folder per class, which is what most single-label tooling reads - cannot express any
of this: a multi-tagged image would have to be copied into every class directory, doubling the bytes
and making one picture look like several examples. It would also disagree with the pre-export
report, which counts annotations rather than images. That single-label layout is a separate format,
classification-dir, which writes one tag per picture and reports
the rest.
image is relative to the export root, so the directory is movable to a training machine and still
resolves. fold is derivable from that path and is written anyway, so a consumer reading one split
filters a column instead of parsing a path. The file is written through Python's csv module, not
by joining strings: a class name is normalized but not otherwise restricted, and one holding a
comma would shift every later column of a hand-built row while still parsing.
classes.txt is every tag-capable class the release declares, one per line, in the authored
schema order, including classes nothing was labelled with. Filtering to tag-capable classes is a
real departure from YOLO and COCO, which both name every declared class unfiltered - listing a
bbox-only class here would let a trainer allocate an output for a class this format can never emit.
So this format follows YOLO's class index on the from-the-schema-not-the-data half of its rule -
deriving the list from the annotations present is what silently changes it between two releases of
one project - and departs on the every-class-gets-a-slot half, which is the half that keeps a line
index stable. An additive schema change that adds classification_tag to an existing class can
therefore insert a name mid-vocabulary and shift every later line across two releases of one
project. labels.csv names a class by string, never by index, so line order is not part of this
format's contract - a consumer wanting a stable integer label builds its own name-to-index map from
classes.txt and cannot assume that map holds across releases.
lossy = True, because a row is a path and a class name - attributes, confidence, provenance and
the annotation's id have nowhere to go. supported_geometries is {classification_tag} and
degraded_geometries is empty: a box is not reduced to an image-level tag. Three boxes of one
class on one image would emit three identical rows, and a report counting them would be truthful
about a file that is not. Boxes, polygons and polylines are dropped, and the compatibility report
names them by class with a count before anything is written.
An asset with no tags gets its bytes and no row. There is no per-image file to leave empty here, so
absence from labels.csv is the only available spelling and it is the honest one.
classification-dir writes the conventional single-label class-directory layout,
<fold>/<class>/<content-hash>.<ext>, with the folds train, val and test the release's split
assigns (everything in train without a recipe). It is independent of
classification, whose multi-label CSV it neither reads nor changes,
and the classification-dir importer reads it back.
Every class declaring a classification tag gets a directory under every fold a picture is written
to, whether or
not anything was tagged with it, so a loader that numbers classes by sorted directory name - as
torchvision.datasets.ImageFolder does - numbers them the same in every fold, and an empty class is
kept as an empty directory. ImageFolder refuses a class directory holding no picture unless it is
given allow_empty=True. A class that cannot carry a tag gets no directory.
Each picture is written once, as its stored bytes, never copied into a second class directory. The
format declares single_tag: a picture with several tags is written under the first of them by
class name, and the report counts
the others dropped; a picture with no tag is not written and is counted in untagged_assets.
lossy = True, so neither happens without allow_lossy, and boxes, every other geometry,
attributes, confidence and provenance are dropped as well.
A class name must be one portable directory name: the export is refused for a name that is not
NFC-normalized, holds a control character, a / or a \, starts with a dot or has surrounding
whitespace, and for two names equal ignoring case, which a case-insensitive filesystem would hold
as one directory.
Five plugins - tusimple, curvelanes, bdd100k-lane, culane, openlane-2d - over the
polyline geometry #223 added. They are the port of the workload VisionSet's predecessor
actually ran, and they are what makes a lane dataset a first-class product of this tool rather
than a thing you write a script for.
All five declare lossy = True. A lane file has fields for a lane, and none of them has
anywhere to put an annotation's arbitrary attributes, its confidence, its provenance or its id.
Four of them write the vertices they were given, so polyline is in supported_geometries;
TuSimple does not, because its file format is "the X where the lane crosses each of these
rows", so a lane goes in as vertices and comes out as samples on a fixed grid. That is the third
state - carried, but reduced - and it is why tusimple declares polyline under
degraded_geometries while the other four do not.
A polyline's per-vertex visibility reaches only openlane-2d, the one lane format with a
per-point slot. OpenLane's flag is binary, so visible writes 1, occluded writes 0, and
unlabeled writes 1 - as does a lane with no visibility recorded at all, because OpenLane has no
"unknown" and an unjudged vertex is no claim that anything hid it. That 1 reads back as visible,
a judgement nobody made, so an unlabeled vertex is reported in uncarried as
unjudged_vertices and needs consent, and a release holding a lane with no visibility gets a
format_notes sentence saying every point of it is written visible. The other four have no
per-vertex field and drop it, reported as vertex_visibility. openlane-2d is also
the one lane format with an importer, which reads 0 back as occluded and 1 as visible; see
import.
openlane-2d writes upstream OpenLane's layout, the one its 2D evaluation reads: uv as
[[u...], [v...]], category an upstream category integer, attribute the lane's left-to-right
position (1 to 4 from position_role, else 0) and a float visibility per point. A class
named after an upstream category (white-dash, left-curbside, category-<n>, ...) writes that
category, so an imported lane keeps it; any other lane takes its category from style and colour,
and road edges take the curbside categories 20 and 21 in left-to-right order. Every image
sequence the release holds a lane in is written as labels/<fold>/segment-<source-id>/, each frame
named by its timestamp in OpenLane's 10 ns units, with the matching pictures under images/; a
split that cuts a sequence writes its part of it under each fold. A lane a track observes carries that track's integer track_id: its imported id when that is a
non-negative integer, otherwise the next free one in its segment. A lane no track observes carries
null, because an identity is never invented; an untracked lane is written once, at the first
position holding its asset, so a frame whose bytes repeat another's does not repeat its labels.
OpenLane names a segment's frames by their timestamp, so a sequence with a frame of unknown timing,
or two frames of one timestamp, is written as single frames instead, every track_id null, and
its tracks do not survive the export; the report names tracks and sequences in uncarried
for such a release, as it names sequences for a sequence holding no lane. Every other image is labels/<fold>/<hash>.json. No xyz is written, and intrinsic
and extrinsic are null because VisionSet records no calibration.
The lane vocabulary is a convention on attribute names - style, color, position_role, each
a select - defined in visionset/formats/lanes/_core.py and not in the kernel, because the
domain does not know what a road is and the same geometry labels railway tracks. A missing
attribute resolves to other rather than refusing, and position_role falls back to the class
name, so a schema whose classes are the road positions needs no attributes at all. See
src/visionset/formats/lanes/README.md.
Two of the five refuse rather than invent: TuSimple will not write a lane whose points are not
sorted by ascending Y - its row sampling has no meaning for a path that doubles back, anywhere
along it - and CULane will not write two lanes claiming the same one of its four mask slots.
Equal consecutive Y passes TuSimple's check, and a row landing on such a flat step takes the X of
its first point. CULane writes every vertex rounded to whole pixels, and paints only lanes whose
position is one of its four slots into the mask; any other lane is in .lines.txt alone. Both name the asset, and
both are the same ExportSourceUnreadable the YOLO exporter raises for a class the schema does
not declare. The refusal comes after the writer has begun, so through ReleaseService.export the
destination is restored to what it was (see The destination is the caller's).
The YOLO dialects, COCO and VOC carry no polyline at all, and that is checked rather than
assumed (test_the_general_formats_declare_polyline_truthfully). yolov5-yaml and voc reduce a
polygon to its bounding box, which is defensible because a polygon encloses an area a box
approximates; an open path encloses nothing, so a box drawn round it would be an invention.
ultralytics writes a polygon as its vertices - its presence is what selects the segment layout,
and its degraded_geometries is empty - but has no row for an open path either. COCO's
segmentation is a closed ring and it has no open-path primitive. All four therefore report a
polyline class as dropped, and their label files contain no trace of one.
kitti writes a release's point-cloud scans as KITTI 3D object detection splits, one per fold:
<fold>/velodyne/<content-hash>.bin, <fold>/label_2/<content-hash>.txt and
<fold>/calib/<content-hash>.txt, the layout the kitti importer reads
back. It declares supported_modalities {point_cloud} and supported_geometries
{cuboid_3d}, so a release's images are reported dropped by count, and a polyline_3d or a
classification tag on a scan is reported dropped by class. lossy = True: attributes, provenance
and ids have nowhere to go. A confidence is written as the 16th column, KITTI's score.
The boxes are in a canonical camera frame, not the sensor's. A cuboid is stored in its scan's
declared frame, a label_2 box is in a rectified camera frame, and a release holds no camera
calibration for a scan (see the decision record).
So every box is converted with one fixed calibration, and that calibration is written beside every
frame: Tr_velo_to_cam is KITTI's nominal axis swap with no offset (x_cam = -y_lidar,
y_cam = -z_lidar, z_cam = x_lidar) and R0_rect is the identity. The centre drops by
h / 2 to the bottom face, the size (l, w, h) becomes h w l, and
rotation_y = -yaw - pi/2, wrapped into [-pi, pi]; alpha is rotation_y less the angle of
the ray to the box, atan2(x, z). The boxes agree with the calibration that ships beside them,
and importing the export returns the same boxes within 2 micrometres (y and h are each written
to the micrometre and the importer recomputes the centre from both), but they are not in the
original rig's camera frame, and projecting them into the original images would place them wrongly.
A written angle stays within [-pi, pi] after rounding: pi itself is written 3.141592.
There is no image, so P0 to P3 are [I | 0], Tr_imu_to_velo is the identity, the 2D box is
zeros, truncation is 0 and occlusion is 3, KITTI's unknown.
The calibration is a placeholder, and a field-of-view crop must be turned off. A KITTI or
nuScenes import does not keep the source's camera calibration, so no release has one to carry,
and the format matrix notes the placeholder on the kitti
export row. The boxes and points agree with the written R0_rect and Tr_velo_to_cam, but
P2 = [I | 0] is no camera: a loader that keeps only the points projecting into the image, with
u >= 0, v >= 0 and positive depth through P2, keeps only those forward of, right of and below
the lidar, and drops the rest of every scan. Turn that crop off; in OpenPCDet's KITTI dataset
config it is FOV_POINTS_ONLY: False. The export is also not a drop-in KITTI tree: frames are
named by content hash in per-fold folders with no ImageSets/*.txt and no image_2, so an
OpenPCDet-style loader needs an adapter, and a nuScenes-sourced export has the same layout.
A .bin is in the lidar's forward-left-up axes. A scan in lidar_flu is written as stored;
one in lidar_rfu or camera_rdf is turned into lidar_flu, points and boxes alike, by the axis
permutation its frame declares, which keeps each cuboid's yaw. Coordinates are written in the
scan's own units, which KITTI reads as metres. Each point is float32 x, y, z, intensity, decoded
from the stored PCD, whose fields are read by name and any numeric type: a scan imported from KITTI
is written back byte for byte. Intensity is written as stored, not normalised: KITTI's own
reflectance is 0 to 1, while a scan imported from nuScenes carries 0 to 255. A point with a
non-finite coordinate is left out, and a missing or non-finite intensity is written as 0. Three kinds of scan are refused by asset with
ExportSourceUnreadable rather than written wrongly: a PLY scan, an LZF-compressed
(binary_compressed) PCD, and a scan whose coordinates are stored wider than float32 and lie 8192
or more from the origin, as a georeferenced scan's do, which a float32 .bin would round.
A class name is KITTI's first token, so whitespace inside one is written as _; two class names
that would become one token refuse the export, and so does a class written DontCare, which KITTI
readers treat as a region to ignore and the importer drops. A pre-processing recipe is refused for this format,
because it transforms images.
mot writes a release's tracked boxes as MOTChallenge (MOT16/17/20) sequences, one per source a
released track observes: <source-id>/seqinfo.ini, every frame the release holds of that source,
observed or not, as <source-id>/img1/<frame:06d><ext>, and <source-id>/gt/gt.txt with
<source-id>/gt/labels.txt, the layout the mot importer reads back. Frame
n is the occurrence at position n - 1, so only a position the release holds no frame for is a
gap in img1/, and the frames after it keep their numbers; seqLength runs to the last held
position. A video source is not listed in the manifest, and a release published before version 9
lists no source at all, so for a clip, or any sequence of such a release, only the observed frames
are written. A row is
frame,id,bb_left,bb_top,bb_width,bb_height,conf,class,visibility: the box in pixels as stored,
conf 1 for a label with no confidence and its confidence otherwise, class the class's 1-based
position in the release's schema, which labels.txt lists in that order, and visibility -1
(unknown). A track whose imported id is a positive integer written without leading zeros keeps it;
every other track is numbered after the largest such id in its sequence, in manifest order, so no
two tracks of a sequence share an id and ids never cross sequences.
The manifest carries no sequence name and no frame rate, so a sequence is named by its source id
and frameRate is the last written position over its timestamp, rounded to six decimals: an
imported MOT sequence or a clip gives its own rate back, and timing that was not uniform keeps its
frame numbers and loses its spacing. A sequence whose timing is unknown (null, as a CVAT task's
is) is refused with ExportSourceUnreadable naming the first such frame, and so, with another
message, is one whose frames after the first are all at timestamp 0, or whose frames differ in
pixel size or image type, because seqinfo.ini has one of each. It declares supported_geometries {bbox} and tracked_only, so a
box no track observes is reported dropped (see
dropped is not degraded); a frame whose
labels are all untracked is still written when its source is listed, without them.
lossy = True: attributes, provenance, the source's name and a confidence of exactly 0 or 1
have nowhere to go (0 reads back as an ignored entry, 1 as ground truth). The release's split
recipe is not applied, because a sequence is not cut across folds, and augmented variants observe no
track and are not written. MOTS, whose rows are instance masks, is not written.
Two formats write CVAT's XML 1.1, one per dialect, and the cvat-images and cvat-video
importers read each back. Neither is a generic "CVAT XML": each writes only its
own dialect. Both write coordinates in pixels as stored, at full precision rather than CVAT's two
decimals, a box as xtl = x, xbr = x + width, and polygon and polyline points as
x,y;x,y;.... <meta><task> names the release's classes in schema order, each label's <type> the
CVAT name of its one geometry (rectangle, polygon, polyline, tag) or any when it declares
several, and its attribute definitions: a string attribute as text, number as number with no
range, boolean as checkbox and select as select with its options. A shape's attribute values
are written as <attribute name> children, a boolean as true or false. Provenance survives only
as CVAT's source: human as manual, model as auto and import as file. Every shape is
occluded="0" and z_order="0". A rotated box (obb) is a <box> of its width and height
about its centre, xtl = cx - width / 2 and ybr = cy + height / 2, and a rotation of its angle
in degrees in [0, 360), clockwise on screen as CVAT turns a box (see
import); a rotated box at angle 0 writes no rotation, as CVAT does, so it
reads back as an axis-aligned box. Read back by the importer, a rotated box keeps its centre and
size to float rounding and its angle within 1e-9 radians, because it is written at full
precision; CVAT itself rounds rotation and coordinates to two decimals, so a box re-saved by
CVAT moves by up to 0.005 degrees and 0.005 pixels. A name or value holding a control character XML 1.0 cannot carry
refuses the export with ExportSourceUnreadable before anything is written. Both declare lossy = True: confidence, a polyline's per-vertex
visibility and the model behind a label have nowhere to go.
cvat-images writes annotations.xml and the pictures under images/, named by content hash, as
CVAT for images 1.1: one <image> per asset with its id in manifest order, its name, width
and height, and a subset that is its fold under the release's split recipe or default without
one. It writes boxes, rotated boxes, polygons, polylines and classification tags (<tag>) whole,
so its supported_geometries are those five and nothing is degraded.
cvat-video writes CVAT for video 1.1, one task per source a released track observes:
<source-id>/annotations.xml and every frame the release holds of that source, observed or not, as
<source-id>/images/frame_<position:06d><ext>. <size> runs to the last held position, and
<original_size> is the frames' one size; frames of two sizes or two image types refuse the
export, checked for every task before any is written. Only a position the release holds no frame
for is missing - one the source never held, or whose asset the dataset does not contain. The
importer, which keys frames by name, reads such a task back, but CVAT, which numbers a task's
pictures in sorted order, would shift every frame after that gap; a source released whole has
none. A video source is not listed in the manifest, and a release published before version 9 lists
no source at all, so for a clip, or any sequence of such a release, only the observed frames are
written. Attribute definitions are written
mutable="True", because a value may change from frame to frame. A track whose imported id is a non-negative integer written without leading zeros keeps
it, and every other is numbered after the largest such id in its task. Each observation is a shape
at keyframe="1" outside="0"; where a track does not continue to the next frame, an
outside="1" keyframe follows, because CVAT otherwise carries a track across a gap and to the
task's end. A CVAT track holds one shape element, so a track observing two refuses the export; a
box and a rotated box are both a <box> and may share a track. It
declares {bbox, obb, polygon, polyline} and tracked_only, so a label no track observes, and every tag,
is reported dropped. The split recipe is not applied, and augmented variants observe no track.
ReleaseService.export checks dest before anything is written, so every surface refuses the
same paths with the same codes:
- it must be absolute - a relative or
~path isEXPORT_DESTINATION_REFUSED. The CLI resolves--outagainst its working directory first; MCP passesdestas given; - it must be outside the workspace - the workspace root, anything under it, and any directory
containing it are refused, so an export can neither write beside
visionset.dbandblobs/nor walk them when counting. Paths are compared by file identity, so a different spelling of the same directory on a case-insensitive file system is refused too. Only the REST surface's export job, passingowned_by_workspace, writes inside the workspace - under its ownexports/, which it builds in a temp sibling and swaps in; - a file, or a directory that cannot be created or read, is
EXPORT_DESTINATION_REFUSEDnaming the operating system's reason; - a directory that already holds files is
EXPORT_DESTINATION_NOT_EMPTYunless the caller passesallow_non_empty(--allow-non-emptyon the CLI; MCP's envelope carriesretry_with: "allow_non_empty"). Two exports in one directory would otherwise mix - a split release'sval/testfiles beside an unsplit one'strain- under a report naming only the second; - a directory another export is writing into - or one inside or around it - is
EXPORT_DESTINATION_REFUSED, and the refused export writes nothing. Once that export has written a file, the empty-directory check above answers first withEXPORT_DESTINATION_NOT_EMPTY, and a retry withallow_non_emptythen meetsEXPORT_DESTINATION_REFUSEDuntil the other export returns. Once the destination is checked,ReleaseService.exportcreates it if missing and reserves it for the whole run, with an advisory lock (flock) on the directory itself, and a shared one on each directory above it, so nested destinations conflict and sibling ones do not. The lock names the directory, not a spelling of its path. It holds between two exports in one process, or two processes, whatever surface or workspace started them. The operating system drops it when its holder exits or is killed, so a crash leaves no stale reservation, and nothing is written into or beside the directory to hold it. The emptiness check is made again under the reservation, so an export that finished in between is seen. The REST export job builds into its own.tmp-directory, so its runs never meet the lock.
Even with consent the directory is not emptied - deleting files under a path a caller named
is not the kernel's to do - so ExportResult's counts then describe the directory once the
plugin has run rather than this run alone. The REST export job replaces its own path instead,
building into a temp sibling and swapping it in, because it built the path itself. An export into
a caller's directory is written in place, but an export that fails - a refusal the plugin raises
mid-write, such as TuSimple's unsorted lane or a pose export over mixed geometries, or an error
while writing, or a cancellation - is cleaned up by ReleaseService.export itself, before it lets the
reservation go: a directory it created and found empty under the reservation is removed, and
otherwise only what the run added is, so files that were there stay, another export's finished
output stays, and a retry does not meet EXPORT_DESTINATION_NOT_EMPTY. Where the platform or file
system cannot lock a directory - Windows, or a network file system such as NFS - the export logs a warning and runs
unreserved, and two exports into one directory there can still discard each other's output. That holds on every surface (REST, CLI, MCP, SDK), because all go through the
service. An exporter called directly, without the service, owns no such cleanup and may leave files. Only a
process killed mid-export leaves a partial directory: delete it, or choose a fresh one, and export again.
Every image blob the release names is then hash-checked, the check verify makes, and a
missing, unreadable or altered one is EXPORT_SOURCE_UNREADABLE naming the asset - before dest
is created, so a refused export writes nothing. The recipe is checked before dest, so retrying
with allow_non_empty does not then meet a recipe refusal. The hash check precedes the copy
rather than covering it: a blob rewritten in between is not caught.
Counting is ReleaseService's rather than the plugin's, deliberately: a number reported by the
thing it describes is not checkable, and an exporter that writes nothing must report zero rather
than say what it meant to do.
visionset release publish --tag v1.0 --project road-signs --split 0.7,0.15,0.15 --seed 42
visionset release list --project road-signs
visionset release verify v1.0 --project road-signs
visionset release split-report v1.0 --project road-signs
visionset release quality v1.0 --project road-signs --format coco
visionset export --project road-signs --release v1.0 --target yolo11 --out ./out
visionset export --project road-signs --release v1.0 --format coco --out ./out
visionset export --project road-signs --release v1.0 --target yolo11 --recipe yolo-640 --out ./out
visionset target list--split is one option rather than three, because a split is one concept, 0.7,0.15,0.15 is
how it is written everywhere, and one flag means one refusal to word. --seed stays separate; it is
not a fraction, and without --split it is refused as exit 2 because it would change nothing.
--group-by group_label keeps a group in one fold and is refused
the same way without --split. Fractions that do not add up are exit 2 - SplitRecipe refuses
them with a pydantic error, which is not a VisionSetError - so the CLI parses the recipe before
the call.
A tag is case-sensitive where a project name is not. Both comparisons live in the kernel beside
the index that enforces them (ReleaseService.get_by_tag, ProjectService.get_by_name), because
they are opposites and a surface re-deriving either would eventually pick the wrong one.
release publish --split warns on stderr (not under --json, whose clients call split-report) when the cut it stored has a warning,
and still publishes; release split-report TAG prints each fold's assets, units, groups (grouped recipes only), requested and actual share
and its annotations per class, then the warnings, and --json gives the REST body. A release without a
recipe is exit 1 with NO_SPLIT_RECIPE.
release verify exits 1 when the answer is no. Nothing refused - the check ran and found
damage - but a non-zero exit is what grep and diff already mean, and the only way a script
branches on the result without parsing output:
visionset release verify v1.0 --project road-signs && ./train.shFor export, the CLI resolves the name through the plugin registry and hands the instance to
ReleaseService.export, because the kernel is forbidden from importing the registry. It resolves a
format with pick and a target with resolve_target, never a dict lookup: a KeyError is outside
the VisionSetError tree and a typo would answer with a traceback instead of the list of installed
names. visionset format list and visionset target list print those lists without opening a
workspace at all, and visionset format matrix adds the importers and the tests recorded for each
format (see the verification matrix).
--target and --format are one choice. A target is the model the release will train and
resolves to the format that writes for it; a format addresses no trainer. Giving both, or neither,
is a usage error at exit 2, because the mistake is on the command line and nothing has been opened
yet. --format yolo, the former name of ultralytics, still works for one release and prints a
deprecation line on stderr naming the current name.
--allow-lossy is the third gate word, never folded into --yes or --allow-destructive. The
formats are the YOLO dialects, COCO and
VOC below.
When an export does leave something behind or write it reduced, the names go to stderr with
the rest of the prose, so visionset export … | xargs still receives exactly the directory. A
dropped class is listed on a Not carried by line, a reduced one on its own line:
Written in a reduced form by yolov5-yaml: lane (2). See visionset-export-report.json.
--json carries the whole report under compatibility, for the caller that never opens the
directory.
export --check is how you see that report before committing to anything (#163). Until it
landed, check_export was reachable over HTTP and from MCP and from nowhere at a terminal, so the
only way to find out what an export would cost was to attempt one and read a refusal naming neither
the classes nor the counts:
$ visionset export --check -p road-signs --release v1.0 -f yolov5-yaml
CLASS GEOMETRY STATUS ANNOTATIONS ASSETS REASON
lane polygon degraded 2 2 yolov5-yaml writes a polygon as its bounding box; the shape is lost
sign bbox supported 4 4
yolov5-yaml would drop 0 annotation(s) across 0 asset(s), and write 2 annotation(s) across 2 asset(s) in a reduced form.
Re-run without --check and with --allow-lossy to export anyway.Exit 1, on release verify's precedent, and on consent_required, the field export gates on - see
Consent is required only for a loss this release would suffer:
a lossy format that names nothing it loses exits 1 here even when the table is clean, because otherwise --check && export would promise
something the export then refuses. A format that carries the release whole exits 0 with
coco carries everything this release holds., and one that would write none of its labels exits 1
with the refusal in place of the
--allow-lossy line, since no consent settles it:
$ visionset export --check -p road-signs --release v1.0 -f dota
CLASS GEOMETRY STATUS ANNOTATIONS ASSETS REASON
lane polygon dropped 2 2 dota cannot place a polygon and drops it
sign bbox dropped 4 4 dota cannot place a bbox and drops it
dota would drop 6 annotation(s) across 4 asset(s), and write 0 annotation(s) across 0 asset(s) in a reduced form.
format 'dota' would write none of the 6 label(s) release 'v1.0' holds, and no consent accepts an export of no labels; export to a target or format that carries bbox, polygon, as the export target catalog lists.A loss no row can show is named on its own line: over the same release of imported labels, the
yolo11 target's table is all supported, and --check still exits 1 with
ultralytics does not write the provenance this release holds., the uncarried facet. A format's
format_notes print above the summary, and a refused export prints neither.
The refusal from a real export now also names the flag a person types. The kernel's sentence says
allow_lossy, which is the service parameter; cli/_errors.py's _HINTS adds --allow-lossy and
--check underneath, which is the surface supplying a remedy without bending a domain message
toward one caller. See cli.md.
The API is this service, one route per method, plus the format listing.
POST /datasets/{id}/releases { "tag": …, "split"? } → 201 ReleaseOut
GET /datasets/{id}/releases → 200 ReleasePage
GET /releases/{id} → 200 ReleaseOut
GET /releases/{id}/manifest → 200 application/json, raw
GET /releases/{id}/verify → 200 ReleaseVerificationOut
GET /releases/{id}/assignment → 200 SplitAssignmentOut
GET /releases/{id}/split-report → 200 SplitReportOut
GET /releases/{id}/quality?target=|format= → 200 QualityReportOut
GET /releases/{id}/export-compatibility?target=|format=&recipe= → 200 ExportCompatibilityOut
POST /releases/{id}/export?target=|format=&allow_lossy=&recipe= → 202 BackgroundJobOut
GET /formats → 200 FormatPage
GET /export-targets → 200 ExportTargetPage
target and format are query aliases, and exactly one is given. Both or neither is a 422
VALIDATION_ERROR whose one error has loc: ["query"] and the message
give exactly one of target and format, so a client branches on the code and the location like
every other malformed request. An unknown target is 404 EXPORT_TARGET_NOT_FOUND naming the
installed ones; a target two installed formats both declare is 500 EXPORT_TARGET_CONFLICT.
The manifest download is raw bytes off the blob store, not ReleaseService.manifest()
re-serialized, and that is the point of the route rather than an optimization. A manifest is
hash-pinned evidence: what arrives must hash to manifest_hash, and a round trip through this
build's JSON encoder would put a second serializer between a client and the bytes the hash is
of. The ETag is that digest and the response is Cache-Control: …, immutable, both honest
because a document named by its own hash cannot change.
verify is a GET and is not free. It changes nothing, which is what decides the method, but
it re-reads and re-hashes every blob the release names. missing and corrupt stay separate
lists because they are different faults with different remedies, and ok is published as a
plain field so a client does not re-derive the conjunction slightly differently from us.
split is {train, val, test, seed?, group_by?}, and ReleaseOut.split answers all five,
group_by null for a recipe that does not group. group_by takes "group_label" and nothing
else; another value is a 422 VALIDATION_ERROR.
A release with no split recipe has no assignment and no split report, and that is a
404 NO_SPLIT_RECIPE rather than an empty answer. No recipe means one undivided set; answering all-train would be
indistinguishable from a real recipe that said so.
Export is queued, and this document used to record the opposite. The limit was that
launch-and-poll needs a row to poll and a row needs a table; #328 gave the product a generic one,
so the argument expired. ultralytics writes one file per image and copies the pixels, which is minutes
of work behind a request with no way to report progress and every proxy's timeout in front of it.
POST /releases/{id}/export?format=ultralytics → 202 Accepted
Location: /background-jobs/{job_id}
GET /background-jobs/{job_id} → 200 { "state": "running", … }
GET /background-jobs/{job_id} → 200 { "state": "succeeded", "result": { … } }
GET /background-jobs/{job_id}/artifact → 200 application/zip
Everything a caller can be told now is still told now, which is the half of the old shape that survived: an unknown format is a 404 and an unconsented lossy export is a 409, both on this request, and neither creates a job. So a caller holding a job id holds one that will run. The consent check therefore happens twice - once here as the answer, once in the worker as the guarantee - which is the same bargain a uniqueness pre-check and its unique index already strike.
The output is built in <workspace>/exports/<release_id>/<format>/, a server-owned directory
like uploads/, and the handler replaces it on each run so the archive describes this export and not the last
one. Each run builds into a .tmp- sibling, swaps the directory in and renames the zip into place
last, so the zip a job names is always whole and a failed run leaves the previous export. Two
concurrent runs of one release and format need no lock, but if they differ in target or recipe
the directory and the zip may come from different runs, each whole. A kill between the
directory's two renames leaves no directory at the final path; a server's start-up sweep renames
the retired .tmp-<format>-<token>.old back when nothing took its place, and removes other .tmp- leftovers a day after their
last change (see persistence.md).
The archive is a sibling of that directory
rather than a file inside it, so a re-export cannot sweep the previous one into the new one.
Nothing expires it, and that is the policy rather than a gap. An export stays in
<workspace>/exports/ until somebody deletes it: there is no TTL, no size cap, no sweeper, and
no DELETE route. VisionSet is local-first and the disk is the user's - a tool that quietly
removed a training set somebody had exported, on a schedule they did not choose, would be
solving a problem they did not report by taking an action they cannot undo. It is the same
posture blobs and staged uploads already have, and it is stated here rather than left implicit
so that "exports are never cleaned up" reads as an answer instead of an omission. A deployment
that does want a policy owns one: the directory is plain files under a path the operator chose,
and find, a cron job or a retention rule on the volume are all better placed to express it
than this product is. Re-exporting is free, so deleting the lot is safe.
Which formats exist is a property of the deployment, so GET /formats answers it rather
than this document. lossy is on the row so a client knows before it POSTs whether the export
will need allow_lossy=true, instead of discovering it by getting a 409; geometries and
modalities beside it are what the format declares it can write, and targets names the models
it writes for. GET /export-targets is the same installation seen from the trainer's side, one
row per target with its format, tasks, geometries and hints - flattened so a client renders
one control from one read. The job an export launches carries target and format in its payload
and its result, and the archive is still laid down under <workspace>/exports/<release_id>/<format>/.
export-compatibility is the pre-flight, and it is optional. Same release, same format name,
and the same document the export refuses with and writes into its own output - a client showing a
consent dialog asks first, one that would rather be refused does not have to. A GET, because it
writes nothing and a release is immutable, so the answer is as stable as the release is. The 409
carries the identical body under detail.compatibility.
| Error | When |
|---|---|
DatasetNotFound |
No dataset with that id in this workspace - including one in a different workspace, which reads as missing rather than as forbidden. |
ReleaseNotFound |
No release with that id in this workspace. |
SchemaNotFound |
The project has no schema, so there is no version to pin. Checked before emptiness. |
EmptyRelease |
The dataset has no assets. A release of nothing is an artifact nobody can train on. Zero annotations is fine - unlabeled images are legitimate training data. |
InvalidName |
The tag is blank once stripped, longer than 128 characters, or not a slug: it must start with a letter or digit and hold only letters, digits, ., _, + and -, because a tag can become a path component in an export. Checked on publish only; looking up a tag never refuses it for its shape. Tags stay case-sensitive. |
ReleaseTagTaken |
This dataset already has a release under that tag. Case-sensitive: a tag is an identifier like a git tag, so v1.0 and V1.0 are two releases. Enforced by a pre-check and by a unique index, the second so a race cannot slip past the first. |
NoSplitRecipe |
assignment or split_report was asked of a release published without one. Not an error in the release: no recipe means one undivided set, and inventing an all-train answer would be indistinguishable from a real one. |
UnserializableManifest |
A manifest holds a NaN or infinite number. Annotation geometry refuses them on write, so this guards values that reach a manifest another way; canonical JSON cannot express them, and writing null or the bare token NaN would lose data or produce a document no other tool can parse. |
CalibrationMissing |
An asset carrying a 3D label has no calibration, neither its own nor its source's. 409. |
CalibrationResolutionMismatch |
An asset carrying a 3D label has a calibration measured at another size than the asset. 422. |
WorkspaceCorrupt |
The manifest blob is gone, or is not a readable manifest, or the trunk holds an asset that is not stored. All are guarantees failing rather than entities missing. |
ExportSourceUnreadable |
The release names bytes an export cannot use - the blob is gone, no longer matches its content hash, is not an image the format can write, or is a scan kitti cannot decode; also a recipe given for an export that writes scans, and a release the format has no layout for, such as an ultralytics pose export holding boxes too or two keypoint counts, or a coco keypoints class without a spec whose labels disagree about the count. 409, not 500: the request is fine and the stored state is not, so the message names the asset and reaches the caller. For a missing or altered blob the remedy is verify and then restoring it; for the recipe, exporting without it. A previous generation of this tool swallowed this and shipped a training set one image short. |
ExportBudgetExceeded |
A recipe export would hand its format more files, or an estimated size, than the export budget allows (100,000 files and 64 GiB by default). Refused at pre-flight, and again in the export job's worker, before anything is written; an export without a recipe is not held to it. 409. |
ExportDestinationRefused |
The export directory is relative, inside or containing the workspace, a file, cannot be created or read, or another export is writing into it. Not overridable; the remedy is another path, or waiting for the other export. |
ExportDestinationNotEmpty |
The export directory already holds files and the caller has not passed allow_non_empty. Overridable; the files are then kept and counted. |
ExportFormatNotFound |
Nothing is installed under that format name. Raised by the registry in visionset.formats, not by this service - the kernel never sees a name. |
ExportTargetNotFound |
No installed format declares a target under that name. Raised by resolve_target on the port, over the exporters the surface passed in; the message names the installed targets. |
ExportTargetConflict |
Two installed formats declare one target name. A defect of the installation rather than of the request - 500 over HTTP - and the remedy is removing one of the distributions, or exporting by format name. |
InvalidExportTarget |
An installed format declares a target promising a geometry the format never writes. Refused at the registry scan, so a defective plugin fails every listing rather than one export. |
LossyExportNotConsented |
The chosen format cannot carry everything the release holds, and the caller has not passed allow_lossy. Raised when this release's own report is not clean, names a facet in uncarried, or comes from a lossy format that does not say what it loses, and it carries that report. Retryable with the flag, which is why a client must branch on the code and never on the 409. |
PreprocessingRecipeNotFound |
The release's project has no recipe under the name the export was given. Resolved through the project the release's dataset hangs off. |
AugmentationRequiresSplit |
The recipe asks for augmented variants and the release was published without a split recipe, so there is no train fold to augment. Raised at pre-flight and again at export. |
PreprocessingStepUnsupportedGeometry |
A recipe step cannot transform a geometry the export would carry - rot90 or rotate over a polyline, a fill or center_crop resize over a polyline, a rotated box or keypoints, a resize, flip or turn over a 3D label, coarse_dropout over anything but a box, a rotated box or keypoints, shear or random_resized_crop over a rotated box, or random_crop, random_resized_crop or object_safe_crop over a classification tag. A refusal, never a consent: a label that cannot follow its image is not something to consent to. Carries the step, the geometry and the first asset. |
AugmentationIncompatible |
The compatibility resolver refuses a recipe step for a label the export would carry, for a reason other than a missing split, a geometry the step cannot move, a scan or a missing driver - today, the export's target training the label for a task the op does not serve. Carries every refused entry, never just the first. Raised at pre-flight and again at export. |
PreprocessingDriverNotFound |
No installed driver applies a step kind the recipe holds. A fact about the installation rather than the request, 500 over HTTP; the message lists the kinds that are installed. |
@visionset/ui-core's dataset screen carries the stats, the release timeline, the
publish dialog, the project's pre-processing recipes and export -
addressed to a target model, with a recipe chosen beside it. Three things it takes from this page rather than
re-deciding: a release is immutable, so nothing offers an edit; verification is on
demand, because it re-reads every blob; and a split's fractions are compared with
the same tolerance the kernel uses, since 0.7 + 0.15 + 0.15 is not 1.0.
Export consent is allow_lossy and never confirm - see
ui.md.