JSON

The JSON pre-annotation format is the json annotation file exported by LabelU, supporting the export of annotation data for images, videos, and audio. It can be directly imported as pre-annotations.

Schema

The exported json file is an array, where each element is the annotation information of a sample, containing the following fields:

FieldTypeRequiredDefaultDescription
id
string
Yes-
result
string
Yes-json string
url
string
Yes-http url of the sample file
folder
string
Yes-directory of the sample file
fileName
string
Yes-

Example

[
  {
    "id": 765, // Sample id exported from labelu, optional, does not affect import as pre-annotation
    "result": "{\"width\": 512, \"height\": 512, \"rotate\": 0, \"annotations\": [{\"toolName\": \"rectTool\", \"result\": [{\"id\": \"9bx61depnkm\", \"x\": 176.8566493955095, \"y\": 189.23661485319516, \"label\": \"label-1\", \"width\": 129.9896373056995, \"height\": 142.36960276338516, \"order\": 1}]}]}",
    "url": "/api/v1/tasks/attachment/upload/271/e875f554-ISIC_0000143_fake_B.png",
    "folder": "/Users/youname/Library/Application Support/labelu/media",
    "fileName": "ISIC_0000143_fake_B.png"
  }
]

Image

FieldTypeRequiredDefaultDescription
width
integer
No-image width
height
integer
No-image height
rotate
integer
No-image rotated degree
annotations
array
No-
objectobjectobjectobjectobjectobjectobject
No-

The annotations field in the result is an array, where each element is the annotation result of an annotation tool:

{
  "toolName": "pointTool",
  "result": [
    {
      "x": 134.5060975609757,
      "y": 376.7248475609756,
      "visible": true,
      "id": "pWiUgJIH",
      "order": 3,
      "label": "label-1"
    }
  ]
}

The definitions of all fields for image annotation tools are as follows:

Video

FieldTypeRequiredDefaultDescription
width
integer
No-video width
height
integer
No-video height
duration
integer
No-video duration
annotations
array
No-
objectobjectobjectobject
No-

The definitions of all fields for video annotation tools are as follows:

Audio

FieldTypeRequiredDefaultDescription
duration
integer
No-音频时长
annotations
array
No-标注信息
objectobjectobjectobject
No-

The definitions of all fields for audio annotation tools are as follows: