raillabel.format.poly2d module¶
- class raillabel.format.poly2d.Poly2d(points: list[Point2d], closed: bool, object_id: UUID, sensor_id: str, attributes: dict[str, float | bool | str | list])¶
Bases:
object
Sequence of 2D points. Can either be a polygon or polyline.
- attributes: dict[str, float | bool | str | list]¶
Additional information associated with the annotation.
- classmethod from_json(json: JSONPoly2d, object_id: UUID) Poly2d ¶
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.
- to_json(uid: UUID, object_type: str) JSONPoly2d ¶
Export this object into the RailLabel JSON format.