Issue Position
Position models for issues, varying by media type.
Each position model serializes to a GeoJSON-compatible dict for the
position: Json GraphQL field.
- class labelbox.schema.issue_position.ImageIssuePosition(*, x: int, y: int)[source]
Bases:
BaseModelPin position on an image asset.
- x
Horizontal pixel coordinate.
- Type:
int
- y
Vertical pixel coordinate.
- Type:
int
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'x': FieldInfo(annotation=int, required=True), 'y': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class labelbox.schema.issue_position.PdfIssuePosition(*, x: float, y: float, page: int)[source]
Bases:
BaseModelPin position on a PDF page.
Coordinates are expressed as percentages (0.0 – 1.0) of the page dimensions, matching the backend
PERCENTunit.- x
Horizontal position as a fraction of page width (0.0 – 1.0).
- Type:
float
- y
Vertical position as a fraction of page height (0.0 – 1.0).
- Type:
float
- page
Zero-based page index.
- Type:
int
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'page': FieldInfo(annotation=int, required=True), 'x': FieldInfo(annotation=float, required=True), 'y': FieldInfo(annotation=float, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class labelbox.schema.issue_position.TextIssuePosition(*, text_block_id: str, start_char_index: int, end_char_index: int)[source]
Bases:
BaseModelCharacter range within a text block.
- text_block_id
Identifier of the text block.
- Type:
str
- start_char_index
Start character index (inclusive).
- Type:
int
- end_char_index
End character index (exclusive).
- Type:
int
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'end_char_index': FieldInfo(annotation=int, required=True), 'start_char_index': FieldInfo(annotation=int, required=True), 'text_block_id': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class labelbox.schema.issue_position.VideoFrameRange(*, start: int, end: int, x: int, y: int, end_x: int | None = None, end_y: int | None = None)[source]
Bases:
BaseModelA contiguous frame range with optional moving coordinates.
For a single frame, set
start == end. Whenstart == endtheend_x/end_yfields are ignored during serialization.- start
Start frame number.
- Type:
int
- end
End frame number (equal to start for a single frame).
- Type:
int
- x
Horizontal pixel coordinate at start.
- Type:
int
- y
Vertical pixel coordinate at start.
- Type:
int
- end_x
Horizontal pixel coordinate at end (moving pin). Ignored when
start == end.- Type:
int | None
- end_y
Vertical pixel coordinate at end (moving pin). Ignored when
start == end.- Type:
int | None
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'end': FieldInfo(annotation=int, required=True), 'end_x': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'end_y': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'start': FieldInfo(annotation=int, required=True), 'x': FieldInfo(annotation=int, required=True), 'y': FieldInfo(annotation=int, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class labelbox.schema.issue_position.VideoIssuePosition(*, frames: List[VideoFrameRange])[source]
Bases:
BaseModelPin position(s) on a video asset.
Supports single frames, contiguous ranges, and multiple separated ranges (with optional moving coordinates).
- frames
One or more
VideoFrameRangeentries.- Type:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'frames': FieldInfo(annotation=List[labelbox.schema.issue_position.VideoFrameRange], required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.