Skip to content

Annotation quality guide

Segmentation Mask and Label Map Review: Keep Pixels, Classes, and Geometry Aligned

Review a mask artifact by separating image dimensions, pixel encoding, label-map meaning, and instance identity before accepting a segmentation export.

A mask can have the expected dimensions while using the wrong class ids, palette, orientation, or background convention. Review the image geometry, mask storage, label map, instance policy, and transform history as separate evidence. This guide is a static worksheet, not a mask decoder, geospatial transformer, validator, or claim about model quality.

Updated

On this page

Define the mask contract before looking at pixels

The source dates shown in this guide identify documentation checks on 22 October 2026, not original publication dates. Follow each citation for the format vocabulary being discussed. Record a controlled image id, image width and height, mask width and height, channels or planes, storage type, and the transform from image to mask. Then identify whether values are class ids, instance ids, binary foreground values, or a color palette.

Define the mask contract before looking at pixels (table)
Contract fieldSynthetic exampleReview question
Image geometry640 by 480 pixelsWhich image version is the mask paired with?
Mask geometry640 by 480 pixelsDoes the mask align without a crop or resize?
Encodinginteger class idCould a palette or alpha channel change meaning?
Background0 means backgroundIs 0 a class, background, or unknown?
Label map1=road, 2=treeWhich version defines every nonzero value?
Instance policyclass mask onlyAre separate objects intentionally merged?
Transformnone declaredWas the mask rotated, padded, or resized?

The cited segmentation-mask documentation is a format reference, not a source of domain labels. A file that opens and has two dimensions can still be semantically wrong if a palette, value range, or label-map version is missing. Keep those findings distinct.

Review class ids and background semantics explicitly

A label map is part of the annotation contract. Record the numeric or color value, stable label id, display label, definition version, and whether the value is allowed in this task. Keep background, ignore, unknown, and unlabeled states separate when the source distinguishes them. Do not turn an absent label map into a guessed class name.

Synthetic label-map and mask summary

Review class ids and background semantics explicitly code example, JSON
{
  "image_id": "synthetic-frame-02",
  "mask": {"width": 4, "height": 3, "encoding": "uint8", "channels": 1},
  "label_map_version": "synthetic-v2",
  "values": [
    {"value": 0, "state": "background"},
    {"value": 1, "label_id": "synthetic:road", "state": "class"},
    {"value": 2, "label_id": "synthetic:tree", "state": "class"},
    {"value": 255, "state": "ignore"}
  ],
  "observed_values": [0, 1, 2, 255],
  "disposition": "conditional"
}
Review class ids and background semantics explicitly (table)
ObservationSafe interpretationDo not infer
Unexpected valueThe value is outside the supplied mapWhich class it should become
No pixels for a mapped classThe class was not observed in this fixtureThat the class is absent everywhere
255 appearsAn ignore or special state may be presentThat it means background
Palette differsEncoding metadata changed or is incompleteThat displayed colors are ids
All values fit mapObserved values have definitionsThat annotations are accurate

Reconcile mask shape with image and transform history

Compare image and mask dimensions, origin, axis direction, and transform order. A one-pixel shift can make an otherwise plausible mask overlap the wrong objects. A resize can change boundaries; a crop can remove context; a rotation can change orientation. Preserve source geometry and derived comparisons rather than overwriting the mask.

Reconcile mask shape with image and transform history (table)
CheckEvidence to recordHold condition
DimensionsImage and mask width and heightOne dimension is unknown
Pixel originTop-left or declared alternativeOrigin is absent
Transform chainCrop, pad, resize, rotate, mirrorOnly final dimensions are known
Alignment sampleSynthetic landmarks or approved visual noteNo alignment evidence is available
Storage typeBit depth, channels, palette or integer mapDecoder output is treated as source truth
Instance policyClass-only, instance ids, or merged objectsInstance meaning is guessed

The CVAT Documentation, (opens in a new tab) documentation distinguishes segmentation representations such as polygons and run-length encodings. A polygon, an RLE mask, and a raster mask can describe related regions while preserving different precision and boundary behavior. Record the representation used at each stage and any rasterization rule.

Use a synthetic failure matrix before source review

Use invented four-by-three fixtures to exercise the review. Include an offset mask, a missing label-map entry, a value that means ignore, a palette mismatch, and a class-only mask where instance separation is unavailable. The goal is to prove that the worksheet keeps facts and decisions separate, not to score a segmentation model.

Use a synthetic failure matrix before source review (table)
FixtureObserved factDisposition
same-shape-alignedImage and mask dimensions match; map resolves valuesConditional, alignment evidence still needed
one-column-shiftDimensions match but synthetic landmark is displacedHold transform record
unknown-valueMask contains an id absent from the mapHold label-map owner decision
ignore-valueSpecial value is documented as ignoreKeep separate from background
palette-changeRendered color changed while ids are unavailableHold encoding evidence
merged-instancesOne class id covers multiple regionsRecord class-only instance policy

Keep mask evidence scoped and qualified

The arXiv / Cornell University, (opens in a new tab) provides dataset context, and the cited format references describe interchange fields. Neither source proves that a particular mask is correct, complete, authorized, private, or suitable for a downstream use. A review can document dimensions, encoding, label-map coverage, transform evidence, and unresolved ambiguity.

Pair this guide with annotation label ontology versioning for label identity and bounding-box coordinate conventions for region geometry. After supported non-health scope, authority to describe the collection, and a controlled annotation packet are established, the qualified appraisal request path may be a next preparation step. It does not decode masks, convert labels, create a quote, match a buyer, issue a legal opinion, or grant a license.

Takeaways

  • Record image and mask geometry, encoding, background, label map, instance policy, and transforms separately.
  • Treat unknown and ignore values as explicit states, not guessed classes.
  • Use synthetic landmarks and small matrices to expose shifts and palette mistakes.
  • Keep polygons, RLE, and raster masks traceable as different representations.
  • Separate mask evidence from annotation accuracy, privacy, rights, and intended use.

Sources

  1. arXiv / Cornell University: Microsoft COCO: Common Objects in Context (opens in a new tab)
  2. CVAT Documentation: Segmentation mask format (opens in a new tab)
  3. CVAT Documentation: COCO format (opens in a new tab)

Use the appraisal path after the mask packet is organized.

It does not decode masks, convert labels, create a quote, match a buyer, or grant a license.