アノテーションのフォーマット
Annofabからダウンロードできるアノテーションのフォーマットについて記載します。
ディレクトリ構造
アノテーションZIPのフォルダ構成は以下の通りです。アノテーション情報が格納されたJSONファイルは、入力データごとに存在します。画像プロジェクトの塗りつぶしアノテーションや、3次元プロジェクトのセグメントに関するファイルは、{入力データID}/
ディレクトリに存在します。
アノテーションZIP/
├── {タスクID}/
│ ├── {入力データID}.json アノテーションのデータ
│ ├── {入力データID}/
│ │ ├── {アノテーションID} 塗りつぶしアノテーションなど
JSON構造
以下は、画像プロジェクトのアノテーションJSONファイルのサンプルです。details
キーにアノテーション情報が格納されています。JSONファイルの詳細なフォーマットについては、https://annofab.com/docs/api/#section/Simple-Annotation-ZIP を参照してください。
{
"project_id": "877cdb50-6bed-4c07-8fbf-55c6e27eaa29",
"annotation_format_version": "1.2.0",
"task_id": "sample_task_01",
"task_phase": "acceptance",
"task_phase_stage": 1,
"task_status": "not_started",
"input_data_id": "gas-station_1706_20171111_R-DRV-610_20171111140522156-0-28784.jpg",
"input_data_name": "gas-station_1706_20171111_R-DRV-610_20171111140522156-0-28784.jpg",
"details": [
{
"label": "car",
"annotation_id": "a67fa709-c47c-4210-8a21-1468920dc4e6",
"data": {
"left_top": {
"x": 1544,
"y": 755
},
"right_bottom": {
"x": 1681,
"y": 882
},
"_type": "BoundingBox"
},
"attributes": {
"car_kind": "general_car",
"condition": "",
"tracking": "a67fa709-c47c-4210-8a21-1468920dc4e6",
"traffic_lane": -1
}
},
{
"label": "whole",
"annotation_id": "fcb847a5-5607-4467-a72b-fc11fb5cfbab",
"data": {
"_type": "Classification"
},
"attributes": {
"weater": ""
}
}
],
"updated_datetime": "2022-05-01T18:27:52.483+09:00"
}
アノテーションJSONの重要な項目について説明します。
details[].label
details[].label
アノテーション仕様画面で設定したラベルの英語名です。
details[].annotation_id
details[].annotation_id
アノテーションのIDです。アノテーションJSONの中(入力データの中)でユニークな値です。
details[].attributes
details[].attributes
アノテーションの属性情報です。キーが属性の英語名、値が属性値であるオブジェクトです。
属性の種類 によってどのような属性値が格納されるかを、以下の表に記載します。
属性の種類 | 属性値のデータ型 | 属性値 |
---|---|---|
On/Off | boolean | |
数値 | integer | |
自由記述 (1行) | string | |
自由記述 (複数行) | string | |
排他選択:ラジオボタン | string | 選択肢の英語名 |
排他選択:ドロップダウン | string | 選択肢の英語名 |
トラッキングID | string | |
アノテーションリンク | string | リンク先のアノテーションのID |
details[].data
details[].data
アノテーションの座標値などの情報です。ラベルの種類によってフォーマットが異なります。詳細は各プロジェクトのアノテーションフォーマットを参照してください。
Updated 11 days ago
Did this page help you?