> 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-image-annotation-format/object-detection-format.md).

# Object detection format

Description of the Mindkosh annotation format for object detection in images.

Image annotations in Mindkosh format contains annotations grouped by the image they are in, and the annotation type, which can be bounding boxes, polygons, polylines and points (keypoints). {

```json
"annotations": {
    "version": "1.1",
    "meta": {
      "task": {
        "labels": [
          {
            "id": 11695,
            "name": "goal_post",
            "attributes": [
              {
                "id": 1757,
                "name": "occlusion",
                "mutable": true,
                "input_type": "checkbox",
                "default_value": "",
                "values": "true\nfalse"
              }
            ]
          }
        ]
      }
    },
    "images": [
      {
        "id": 0,
        "name": "psg_marseille_first_half_1228.png",
        "width": 1280,
        "height": 720,
        "boxes": [
          {
            "id": 3015293,
            "label": 11695,
            "source": "manual",
            "point_order": -1,
            "related_ids": [],
            "created_mode": "annotation",
            "created_by": "sdevgupta",
            "updated_by": "None",
            "xtl": "599.73",
            "ytl": "163.63",
            "xbr": "658.33",
            "ybr": "188.35",
            "rotation": "21.3",
            "z_order": 0,
            "attributes": [
              { "id": 1757, "name": "occlusion", "value": "true" }
            ],
          }
        ]
      }
    ]
  }
}

```

**Property Description**

<table data-search="false"><thead><tr><th width="215"></th><th></th></tr></thead><tbody><tr><td><code>id</code></td><td>Annotation ID. Unique across Mindkosh.</td></tr><tr><td><code>label</code></td><td>Label ID. Can be referenced from the labels section</td></tr><tr><td><code>source</code></td><td>Can be manual, imported or automatic</td></tr><tr><td><code>related_ids</code></td><td>Array of annotation ID of other objects connected with this annotation</td></tr><tr><td><code>created_mode</code></td><td>Which annotation mode this annotation was created in. Can be annotation, validation, qc or completed</td></tr><tr><td><code>created_by</code></td><td>User who created the annotation</td></tr><tr><td><code>updated_by</code></td><td>User who updated the annotation</td></tr><tr><td><code>attributes</code></td><td>key value pairs of attributes if available</td></tr><tr><td><code>rotation</code></td><td>Orientation of a rotated bounding box. Excluded for axis-parallel bounding boxes.</td></tr><tr><td><code>z_order</code></td><td>Layer number of an annotation. Only applicable to polygons</td></tr></tbody></table>

#### Annotation description

<table><thead><tr><th width="150"></th><th></th></tr></thead><tbody><tr><td>boxes</td><td>Described by the top left and bottom right points of the box. <code>xtl, ytl, xbr, ybr</code></td></tr><tr><td>polygons</td><td>Flat array of the points - x<sub>1,</sub> y<sub>1,</sub> x<sub>2</sub>, y<sub>2</sub>, x<sub>3</sub>, y<sub>3.</sub> Last point connects to the first point.</td></tr><tr><td>polylines</td><td>Same as the polygons. Last point does not connect to the first point.</td></tr><tr><td>points</td><td>Flat array of the points</td></tr><tr><td>cuboids</td><td>Described by the top-left and bottom right corners of the front and the back face.<br><code>xtl1, ytl1, xbr1, ybr1, xtl2, ytl2, xbr2, ybr2</code></td></tr></tbody></table>

#### Ordered bounding box

For ordered bounding boxes, the `point_order` property is set to a value between 1 and 8. It can be interpreted as follows:&#x20;

<table data-search="false"><thead><tr><th width="104">Value</th><th>Description</th></tr></thead><tbody><tr><td>-1</td><td>Bounding box was created without point order.</td></tr><tr><td>1</td><td>The top-left corner of an un-rotated bounding-box is the first point. The other points are in clockwise direction.</td></tr><tr><td>2</td><td>The top-right corner of an un-rotated bounding-box is the first point. The other points are in clockwise direction.</td></tr><tr><td>3</td><td>The bottom-right corner of an un-rotated bounding-box is the first point. The other points are in clockwise direction.</td></tr><tr><td>4</td><td>The bottom-left corner of an un-rotated bounding-box is the first point. The other points are in clockwise direction.</td></tr><tr><td>5</td><td>The top-left corner of an un-rotated bounding-box is the first point. The other points are in anti-clockwise direction.</td></tr><tr><td>6</td><td>The top-right corner of an un-rotated bounding-box is the first point. The other points are in anti-clockwise direction.</td></tr><tr><td>7</td><td>The bottom-right corner of an un-rotated bounding-box is the first point. The other points are in anti-clockwise direction.</td></tr><tr><td>8</td><td>The bottom-left corner of an un-rotated bounding-box is the first point. The other points are in anti-clockwise direction.</td></tr></tbody></table>

#### Tracks

Tracks are tracked objects across frames with the same ID. The same object across different frames has different annotation IDs but the same `track_id`.

The property `occluded` specifies if the object is part of the same track but not visible in the current frame.

Additionally the `related_track_ids` describes an array of other tracks that are connected with a particular tracked object.
