tlc.core.builtins.schemas.bounding_box_list_schemaΒΆ

A schema for a COCO-like bounding box list

Module ContentsΒΆ

ClassesΒΆ

Class

Description

BoundingBoxListSchema

A schema for a COCO-like bounding box list

APIΒΆ

class BoundingBoxListSchema(
classes: str | Sequence[str] | Sequence[dict[str, str]] | Sequence[MapElement] | dict[float, str] | dict[int, str] | dict[float, MapElement] | dict[int, MapElement] | None = None,
x0_number_role: str = NUMBER_ROLE_BB_MIN_X,
x1_number_role: str = NUMBER_ROLE_BB_MAX_X,
y0_number_role: str = NUMBER_ROLE_BB_MIN_Y,
y1_number_role: str = NUMBER_ROLE_BB_MAX_Y,
x0_unit: str = '',
x1_unit: str = '',
y0_unit: str = '',
y1_unit: str = '',
display_name: str = '',
description: str = '',
writable: bool = True,
display_importance: float = 0,
is_prediction: bool = False,
include_segmentation: bool = True,
include_iscrowd: bool = False,
include_confidence: bool | None = None,
include_iou: bool | None = None,
*,
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.Schema

A schema for a COCO-like bounding box list

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.

  • x0_number_role – Number role for the x0 coordinate (see number_roles).

  • x1_number_role – Number role for the x1 coordinate.

  • y0_number_role – Number role for the y0 coordinate.

  • y1_number_role – Number role for the y1 coordinate.

  • x0_unit – Unit for the x0 coordinate (”” for absolute, β€œrelative” for relative).

  • x1_unit – Unit for the x1 coordinate.

  • y0_unit – Unit for the y0 coordinate.

  • y1_unit – Unit for the y1 coordinate.

  • display_name – Display name for the schema.

  • description – Description of the schema.

  • writable – Whether the schema is writable.

  • display_importance – Display importance for UI ordering.

  • is_prediction – Whether this schema represents predictions (affects confidence/iou defaults).

  • include_segmentation – Whether to include segmentation data.

  • include_iscrowd – Whether to include the is_crowd field.

  • include_confidence – Whether to include confidence scores. Defaults to True if is_prediction.

  • include_iou – Whether to include IoU scores. Defaults to True if is_prediction.

  • label_value_map – Deprecated, use classes instead.