statistics visualize_annotation_count

Description

各ラベル、各属性値のアノテーション数をヒストグラムで可視化したファイルを出力します。

Examples

基本的な使い方

アノテーションzipをダウンロードして、アノテーション数が記載されたCSVファイルを出力します。

$ annofabcli statistics visualize_annotation_count --project_id prj1 --output_dir out_dir/
out_dir/
├── labels_count.html                ラベルごとのアノテーション数をヒストグラムで可視化したHTMLファイル
├── attributes_count.html            属性ごとのアノテーション数をヒストグラムで可視化したHTMLファイル
│

集計対象の属性の種類は以下の通りです。

  • ドロップダウン

  • ラジオボタン

  • チェックボックス

デフォルトではタスクごとにアノテーション数を集計します。入力データごとに集計する場合は、 --group_by input_data_id を指定してください。

$ annofabcli statistics list_annotation_count --project_id prj1 --output_dir out_dir/ \
--group_by input_data_id

--annotation にアノテーションzipまたはzipを展開したディレクトリを指定できます。

$ annofabcli statistics list_annotation_count --project_id prj1 --output_dir out_dir/ \
--annotation annotation.zip

出力結果

$ annofabcli statistics visualize_annotation_count --project_id prj1 --output_dir out_by_task/ \
--group_by task_id
out_by_task/
├── labels_count.html
├── attributes_count.html
../../_images/labels_count.png

out_by_task

labels_count.html

attributes_count.html

Usage Details

各ラベル、各属性値のアノテーション数をヒストグラムで可視化したファイルを出力します。

usage: annofabcli statistics visualize_annotation_count [-h] [--yes]
                                                        [--endpoint_url ENDPOINT_URL]
                                                        [--logdir LOGDIR]
                                                        [--disable_log]
                                                        [--debug] -p
                                                        PROJECT_ID
                                                        [--annotation ANNOTATION]
                                                        -o OUTPUT_DIR
                                                        [--group_by {task_id,input_data_id}]
                                                        [--bins BINS]
                                                        [-tq TASK_QUERY]
                                                        [-t TASK_ID [TASK_ID ...]]
                                                        [--latest]

Named Arguments

-p, --project_id

対象のプロジェクトのproject_idを指定します。

--annotation

アノテーションzip、またはzipを展開したディレクトリを指定します。指定しない場合はAnnofabからダウンロードします。

-o, --output_dir

出力先ディレクトリのパス

--group_by

Possible choices: task_id, input_data_id

アノテーションの個数をどの単位で集約するかを指定します。

Default: "task_id"

--bins

ヒストグラムのビンの数を指定します。

Default: 20

-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"

--logdir

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

Default: .log

--disable_log

ログを無効にします。

--debug

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