raillabel.format.poly3d module

class raillabel.format.poly3d.Poly3d(points: list[Point3d], closed: bool, object_id: UUID, sensor_id: str, attributes: dict[str, float | bool | str | list])

Bases: object

Sequence of 3D points. Can either be a polygon or polyline.

attributes: dict[str, float | bool | str | list]

Additional information associated with the annotation.

closed: bool

If True, this object represents a polygon and if False, it represents a polyline.

classmethod from_json(json: JSONPoly3d, object_id: UUID) Poly3d

Construct an instant of this class from RailLabel JSON data.

name(object_type: str) str

Return the name of the annotation used for indexing in the object data pointers.

object_id: UUID

The unique identifyer of the real-life object, this annotation belongs to.

points: list[Point3d]

List of the 3d points that make up the polyline.

sensor_id: str

The unique identifyer of the sensor this annotation is labeled in.

to_json(uid: UUID, object_type: str) JSONPoly3d

Export this object into the RailLabel JSON format.