annotation_specs list_label_attribute#

Description#

アノテーション仕様のラベルとラベルに含まれている属性の一覧を出力します。

Examples#

$ annofabcli annotation_specs list_label_attribute --project_id prj1

過去のアノテーション仕様を出力する方法は、 過去のアノテーション仕様を指定する を参照してください。

出力結果#

CSV出力#

$ annofabcli annotation_specs list_label_attribute --project_id prj1 --format csv --output out.csv
out.csv#

label_id

label_name_en

label_name_ja

label_name_vi

annotation_type

attribute_id

attribute_name_en

attribute_name_ja

attribute_name_vi

attribute_type

a0a0c27b-dad8-42da-9235-c09688cdfd12

car

car

car

bounding_box

0f739b17-c22b-4f4a-a791-d142eb0bcd41

truncation

truncation

truncation

flag

53530a8f-e48f-46e9-833f-8e48becb25af

road

road

road

segmentation_v2

0f739b17-c22b-4f4a-a791-d142eb0bcd41

truncation

truncation

truncation

flag

JSON出力#

$ annofabcli annotation_specs list_label_attribute --project_id prj1 --format pretty_json --output out.json
out.json#
[
{
    "label_id": "a0a0c27b-dad8-42da-9235-c09688cdfd12",
    "label_name_en": "car",
    "label_name_ja": "car",
    "label_name_vi": "car",
    "annotation_type": "bounding_box",
    "attribute_id": "0f739b17-c22b-4f4a-a791-d142eb0bcd41",
    "attribute_name_en": "truncation",
    "attribute_name_ja": "truncation",
    "attribute_name_vi": "truncation",
    "attribute_type": "flag"
},
{
    "label_id": "53530a8f-e48f-46e9-833f-8e48becb25af",
    "label_name_en": "road",
    "label_name_ja": "road",
    "label_name_vi": "road",
    "annotation_type": "segmentation_v2",
    "attribute_id": "0f739b17-c22b-4f4a-a791-d142eb0bcd41",
    "attribute_name_en": "truncation",
    "attribute_name_ja": "truncation",
    "attribute_name_vi": "truncation",
    "attribute_type": "flag"
}
]
  • label_id : ラベルID

  • label_name_en : ラベル名(英語)

  • label_name_ja : ラベル名(日本語)

  • label_name_vi : ラベル名(ベトナム語)

  • annotation_type : アノテーションの種類

  • attribute_id : 属性ID

  • attribute_name_en : 属性名(英語)

  • attribute_name_ja : 属性名(日本語)

  • attribute_name_vi : 属性名(ベトナム語)

  • attribute_type : 属性の種類

Usage Details#

アノテーション仕様のラベルとラベルに含まれている属性の一覧を出力します。

usage: annofabcli annotation_specs list_label_attribute [-h] [--yes]
                                                        [--endpoint_url ENDPOINT_URL]
                                                        [--annofab_user_id ANNOFAB_USER_ID]
                                                        [--annofab_password ANNOFAB_PASSWORD]
                                                        [--annofab_pat ANNOFAB_PAT]
                                                        [--logdir LOGDIR]
                                                        [--disable_log]
                                                        [--debug]
                                                        (-p PROJECT_ID |
                                                        --annotation_specs_json_file ANNOTATION_SPECS_JSON_FILE)
                                                        [--history_id HISTORY_ID |
                                                        --before BEFORE |
                                                        --updated_datetime UPDATED_DATETIME]
                                                        [-f {csv,json,pretty_json}]
                                                        [-o OUTPUT]

Named Arguments#

-p, --project_id

対象のプロジェクトのproject_idを指定します。APIで取得したアノテーション仕様情報を元に出力します。

--annotation_specs_json_file

指定したアノテーション仕様のJSONファイルを指定します。JSONファイルに記載された情報を元に出力します。ただしアノテーション仕様の format_version は 3 である必要があります。

--history_id

参照するアノテーション仕様のhistory_id。指定しない場合は最新のアノテーション仕様を参照します。

--before

参照するアノテーション仕様が最新よりいくつ前かを指定します。たとえば 1 は最新より1個前を表します。

--updated_datetime

参照するアノテーション仕様の更新日時をISO 8601形式で指定します。日、分、秒、小数秒の精度で検索し、1件に特定できる必要があります。 タイムゾーンを省略した場合はJSTとして扱います。

-f, --format

Possible choices: csv, json, pretty_json

出力フォーマット

Default: 'csv'

-o, --output

出力先のファイルパスを指定します。未指定の場合は、標準出力に出力されます。

common options (after the subcommand)#

--yes

処理中に現れる問い合わせに対して、常に yes と回答します。

--endpoint_url

Annofab WebAPIのエンドポイントを指定します。

--annofab_user_id

Annofabにログインする際のユーザーID

--annofab_password

Annofabにログインする際のパスワード

--annofab_pat

Annofabにログインする際のパーソナルアクセストークン

--logdir

ログファイルを保存するディレクトリを指定します。

Default: .log

--disable_log

ログを無効にします。

--debug

HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。

すべてのプロジェクトメンバーロールで実行できます。