raillabel.format.cuboid module

class raillabel.format.cuboid.Cuboid(pos: Point3d, quat: Quaternion, size: Size3d, object_id: UUID, sensor_id: str, attributes: dict[str, float | bool | str | list])

Bases: object

3D bounding box.

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

Additional information associated with the annotation.

classmethod from_json(json: JSONCuboid, object_id: UUID) Cuboid

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.

pos: Point3d

The center position of the cuboid in meters, where the x coordinate points ahead of the vehicle, y points to the left and z points upwards.

quat: Quaternion

The rotation of the cuboid in quaternions.

sensor_id: str

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

size: Size3d

The size of the cuboid in meters.

to_json(uid: UUID, object_type: str) JSONCuboid

Export this object into the RailLabel JSON format.