statistics list_annotation_attribute_filled_count#
Description#
値が入力されている属性の個数を、タスクごとまたは入力データごとに集計します。
Examples#
デフォルトではタスク単位で属性の個数を集計します。
出力結果の filled
キーは、値が入力されている属性の個数、 empty
キーは値が入力されていない属性の個数を表します。
$ annofabcli statistics list_annotation_attribute_filled_count --project_id p1 \
--output out_by_task.json --format pretty_json
[
{
"task_id": "task--02",
"task_status": "break",
"task_phase": "annotation",
"task_phase_stage": 1,
"input_data_count": 1,
"annotation_attribute_counts": {
"car": {
"occlusion": {
"empty": 10,
"filled": 20
},
"type": {
"empty": 10,
"filled": 20
}
},
"bike": {
"occlusion": {
"empty": 10,
"filled": 20
}
}
}
}
]
--group_by input_data_id
オプションを指定すると、入力データ単位で属性の個数を集計します。
$ annofabcli statistics list_annotation_attribute_filled_count --project_id p1 \
--group_by input_data_id --output out_by_input_data.json --format pretty_json
[
{
"task_id": "task--02",
"task_status": "break",
"task_phase": "annotation",
"task_phase_stage": 1,
"input_data_id": "input1",
"input_data_name": "input1",
"frame_no": 1,
"annotation_attribute_counts": {
"car": {
"occlusion": {
"empty": 10,
"filled": 20
},
"type": {
"empty": 10,
"filled": 20
}
},
"bike": {
"occlusion": {
"empty": 10,
"filled": 20
}
}
}
}
]
デフォルトでは、On/Off属性(チェックボックス)は集計対象外です。On/Off属性は基本的に常に「入力されている」と判定されるためです。
--include_flag_attribute
を指定すると、On/Off属性も集計対象にします。
出力結果#
タスクごとに集計した結果をCSVで出力#
$ annofabcli statistics list_annotation_attribute_filled_count --project_id prj1 \
--group_by task_id --format csv --output out_by_task.csv
task_id |
task_status |
task_phase |
task_phase_stage |
input_data_count |
car |
car |
---|---|---|---|---|---|---|
direction |
direction |
|||||
filled |
empty |
|||||
20250325_0 |
not_started |
annotation |
1 |
1 |
10 |
4 |
20250327_00 |
not_started |
annotation |
1 |
1 |
20 |
3 |
入力データごとに集計した結果をCSVで出力#
$ annofabcli statistics list_annotation_attribute_filled_count --project_id prj1 \
--group_by input_data_id --format csv --output out_by_input_data.csv
task_id |
task_status |
task_phase |
task_phase_stage |
input_data_id |
input_data_name |
frame_no |
car |
car |
---|---|---|---|---|---|---|---|---|
direction |
direction |
|||||||
filled |
empty |
|||||||
sample1 |
not_started |
annotation |
1 |
input1 |
input1 |
1 |
10 |
4 |
sample1 |
not_started |
annotation |
1 |
input2 |
input2 |
2 |
20 |
3 |
Usage Details#
値が入力されている属性の個数を、タスクごとまたは入力データごとに集計します。
usage: annofabcli statistics list_annotation_attribute_filled_count
[-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] [--annotation ANNOTATION]
[-p PROJECT_ID] [--group_by {task_id,input_data_id}]
[--include_flag_attribute] [-f {csv,json,pretty_json}] [-o OUTPUT]
[-tq TASK_QUERY] [-t TASK_ID [TASK_ID ...]] [--latest]
Named Arguments#
- --annotation
アノテーションzip、またはzipを展開したディレクトリを指定します。指定しない場合はAnnofabからダウンロードします。
- -p, --project_id
project_id。
--annotation
が未指定のときは必須です。--annotation
が指定されているときに--project_id
を指定すると、アノテーション仕様を参照して、集計対象の属性やCSV列順が決まります。- --group_by
Possible choices: task_id, input_data_id
アノテーションの個数をどの単位で集約するかを指定してます。
Default:
'task_id'
- --include_flag_attribute
指定した場合は、On/Off属性(チェックボックス)も集計対象にします。On/Off属性は基本的に常に「入力されている」と判定されるため、デフォルトでは集計対象外にしています。
--project_id
が指定されているときのみ有効なオプションです。- -f, --format
Possible choices: csv, json, pretty_json
出力フォーマットを指定します。
Default:
'csv'
- -o, --output
出力先のファイルパスを指定します。未指定の場合は、標準出力に出力されます。
- -tq, --task_query
集計対象タスクを絞り込むためのクエリ条件をJSON形式で指定します。使用できるキーは task_id, status, phase, phase_stage です。
file://
を先頭に付けると、JSON形式のファイルを指定できます。- -t, --task_id
対象のタスクのtask_idを指定します。
file://
を先頭に付けると、task_idの一覧が記載されたファイルを指定できます。- --latest
--annotation
を指定しないとき、最新のアノテーションzipを参照します。このオプションを指定すると、アノテーションzipを更新するのに数分待ちます。
global optional arguments#
- --yes
処理中に現れる問い合わせに対して、常に
yes
と回答します。- --endpoint_url
Annofab WebAPIのエンドポイントを指定します。
Default:
'https://annofab.com'
- --annofab_user_id
Annofabにログインする際のユーザーID
- --annofab_password
Annofabにログインする際のパスワード
- --annofab_pat
Annofabにログインする際のパーソナルアクセストークン
- --logdir
ログファイルを保存するディレクトリを指定します。
Default:
.log
- --disable_log
ログを無効にします。
- --debug
HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。