tlc.core.builtins.schemas.segmentation_schema¶
A schema for instance segmentation data
Module Contents¶
Classes¶
Class |
Description |
|---|---|
A schema for instance segmentation data that includes RLE-encoded masks and per-instance properties. |
API¶
- class SegmentationSchema(
- classes: str | Sequence[str] | Sequence[dict[str, str]] | Sequence[MapElement] | dict[float, str] | dict[int, str] | dict[float, MapElement] | dict[int, MapElement] | None = None,
- display_name: str = '',
- description: str = '',
- sample_type: str = InstanceSegmentationPolygons.sample_type,
- relative: bool = False,
- writable: bool = True,
- include_iscrowd: bool = False,
- display_importance: float = 0,
- *,
- label_value_map: str | Sequence[str] | Sequence[dict[str, str]] | Sequence[MapElement] | dict[float, str] | dict[int, str] | dict[float, MapElement] | dict[int, MapElement] | None = None,
Bases:
tlc.core.schema.SchemaA schema for instance segmentation data that includes RLE-encoded masks and per-instance properties.
- Parameters:
classes – The classes to use for the label. Accepts a list of class names, a dict mapping numeric keys to class names or MapElements, or a single class name string.
display_name – Display name for the schema.
description – Description of the schema.
sample_type – Sample type for the column (valid values are “instance_segmentation_polygons” and “instance_segmentation_masks”).
relative – Whether polygon coordinates are relative to image dimensions.
writable – Whether the schema is writable.
include_iscrowd – Whether to include the is_crowd field.
display_importance – Display importance for UI ordering.
label_value_map – Deprecated, use classes instead.