> For the complete documentation index, see [llms.txt](https://docs.mindkosh.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindkosh.com/python-sdk/mindkosh-point-cloud-annotation-format/cuboid-annotation-format.md).

# Cuboid annotation format

Description of cuboid annotations exported in the Mindkosh format

Each annotation item is of the form:

```json
{
    "id": <annotation_id - unique for every instance of an object>,
    "track_id": <object id - unique for every object, null if it isnt a track>,
    "objectType": <classname>,
    "h": <height>,
    "w": <width>,
    "l": <length>,
    "keyframe": <Is this frame manually labeled? Applicable only for tracks>
    "item": {
        "tx": <x-co-ordinate of the center>,
        "ty": <y-co-ordinate of the center>,
        "tz": <z-co-ordinate of the center>,
        "rx": <rotation in radians around X-axis>,
        "ry": <rotation in radians around Y-axis>,
        "rz": <rotation in radians around Z-axis>,
        "occlusion": 0,
        "face": <FACE_ID describing which way the object is facing>
    }
    "attributes": [
        {
            "spec_id": <attribute_id>,
            "value": <value of the attribute>
        }
    ]
}
```

#### Face ID

FACE\_ID is encoded as follows. Note that the angle of rotation alone is enough to deduce the front face. FACE\_ID is a redundant field to deduce the same.

| ID | Direction vector |
| -- | ---------------- |
| 0  | +X               |
| 1  | -X               |
| 2  | +Y               |
| 3  | -Y               |
| 4  | +Z               |
| 5  | -Z               |

### Conventions

We follow the same convention as KITTI, with 1 major change - all our values are specified from the point cloud frame, rather than the camera frame.<br>

**Dimensions**<br>

1. Length is measured front-to-back.
2. Width is measured side-to-side
3. Height is measured from top-to-bottom

{% hint style="warning" %}
This assumes that the forward facing faces have been properly marked. By default the face is assumed to be in the positive Y direction (when the cuboid is un-rotated).
{% endhint %}

**Rotation**

Rotation is measured counter-clockwise from the Y axis (of the point cloud). It is always positive.

<figure><img src="https://mindkosh.slite.com/api/files/CsNY0qE5lD9vV_/IMG_0010.JPEG?apiToken=eyJhbGciOiJIUzI1NiIsImtpZCI6IjIwMjMtMDUtMDQifQ.eyJzY29wZSI6Im5vdGUtZXhwb3J0IiwibmlkIjoieFU1YWxtNWxaYVVJSlYiLCJpYXQiOjE3ODc5MDg4MzcsImlzcyI6Imh0dHBzOi8vc2xpdGUuY29tIiwianRpIjoicGo2X3VTSHlUWXhzcTciLCJleHAiOjE3OTA1MDA4Mzd9.SqU3AUsanYcY1xu2o4VmDjITFFaBwwyEbb2oY2x0024" alt="An example scenario when looking at an object top-down. Red axis is X, Green axis is Y."><figcaption><p>An example scenario when looking at an object top-down. Red axis is X, Green axis is Y.</p></figcaption></figure>
