> For the complete documentation index, see [llms.txt](https://testindata.gitbook.io/dataset/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testindata.gitbook.io/dataset/open-api/anotations.md).

# 标签数据结构

### 标注数据结构

支持11种类型可视化，具体标注数据放入anotations数组中。

| 参数       | 类型            | 是否必传 | 描述                                                                                                            |
| -------- | ------------- | ---- | ------------------------------------------------------------------------------------------------------------- |
| label    | string        | 是    | 标注物体                                                                                                          |
| type     | string        | 是    | 标注类型，支持：box2d、ellipse、polygon、line、curve、point、parallel、box3d、cuboid、side\_cuboid、sentence，详情参考 Labels.data定义 |
| data     | object\|array | 是    | 参考Labels.data定义                                                                                               |
| instance | string        | 否    | 实例ID                                                                                                          |
| attrs    | object        | 否    | 标注物体属性，如：{"truncate":true,  "angle":90}                                                                       |
| index    | int           | 否    | 标注物体在图像中的显示层级顺序，数字大的将覆盖数字小的显示，常用于图像分割类，范围 0 - 65535                                                           |

###

### 详细Labels.data结构

```
box2d
{
    "x":21.31,  //左上点xy
    "y":33.22,
    "width":210,
    "height":122
}

ellipse
{
    "x":21.31,
    "y":33.22,
    "width":210,
    "height":122
}

polygon
[
    {"x":22.22,"y":222.22},
    {"x":22.22,"y":222.22}
]

line
[
    {"x":22.22,"y":222.22},
    {"x":22.22,"y":222.22}
]

curve 2阶贝塞尔曲线
[
    {"x":22.22,"y":222.22},
    {"x":22.22,"y":222.22}
]

point
{"x":22.22,"y":222.22}

parallel 连续的4个顶点 
[    
     {"x":22.22,"y":222.22},  
     {"x":22.22,"y":222.22},  
     {"x":22.22,"y":222.22},  
     {"x":22.22,"y":222.22}
]

box3d 点云3d框
{
    "position":{
        "x":123,
        "y":123,
        "z":123,
    },
    "scale":{
         "x":123,
         "y":123,
         "z":123,
    },
    "rotation":{
        "x":0,
        "y":0,
        "z":-1.57,
    }
}

cuboid 立体框，前后框的顶点顺序需一致
 {
    "front": [
        {"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1}
    ] ,
    "back": [
        {"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1}
    ] 
}

side_cuboid 侧面立体框（日型框）
 {
    "front": [
        {"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1},{"x":1,"y":1}
    ] ,
    "back": [
        {"x":1,"y":1},{"x":1,"y":1}
    ] 
}

sentence
{
    "text":"转写内容",
    "start": 10.001,
    "end":11.002,
    "spell":"拼音",
    "phoneme":"音素"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://testindata.gitbook.io/dataset/open-api/anotations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
