raillabel.json_format.frame module

class raillabel.json_format.frame.JSONFrame(*, frame_properties: JSONFrameProperties | None = None, objects: dict[UUID, JSONObjectData] | None = None)

Bases: _JSONFormatBase

A frame is a container of dynamic, timewise, information.

_abc_impl = <_abc._abc_data object>
frame_properties: JSONFrameProperties | None

Container of frame information other than annotations.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

objects: dict[UUID, JSONObjectData] | None

This is a JSON object that contains dynamic information on RailLabel objects. Object keys are strings containing 32 bytes UUIDs. Object values contain an ‘object_data’ JSON object.

class raillabel.json_format.frame.JSONFrameData(*, num: list[JSONNum] | None = None)

Bases: _JSONFormatBase

Additional data to describe attributes of the frame (like GPS position).

_abc_impl = <_abc._abc_data object>
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

num: list[JSONNum] | None

List of ‘num’ that describe this frame.

class raillabel.json_format.frame.JSONFrameProperties(*, timestamp: Decimal | str | None = None, streams: dict[str, JSONStreamSync] | None = None, frame_data: JSONFrameData | None = None)

Bases: _JSONFormatBase

Container of frame information other than annotations.

_abc_impl = <_abc._abc_data object>
frame_data: JSONFrameData | None

Additional data to describe attributes of the frame (like GPS position).

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

streams: dict[str, JSONStreamSync] | None

Stream timestamps for synchronization.

timestamp: Decimal | str | None

The timestamp indicates a time instant as a UTC string or numerical value to describe this frame.