raillabel.format.object module

class raillabel.format.object.Object(name: str, type: str)

Bases: object

Physical, unique object in the data, that can be tracked via its UID.

classmethod from_json(json: JSONObject) Object

Construct an instant of this class from RailLabel JSON data.

name: str

Name of the object. It is a friendly name and not used for indexing. Commonly the class name is used followed by an underscore and an integer (i.e. person_0032).

to_json(object_id: UUID, frames: dict[int, Frame]) JSONObject

Export this object into the RailLabel JSON format.

type: str

The type of an object defines the class the object corresponds to (like ‘person’).

raillabel.format.object._frame_intervals_to_json(object_id: UUID, frames: dict[int, Frame]) list[JSONFrameInterval]
raillabel.format.object._object_data_pointers_to_json(object_id: UUID, object_type: str, frames: dict[int, Frame]) dict[str, JSONElementDataPointer]