Skip to main content

Utility Command Line Interface for AnnoFab

Project description

Build Status PyPI version Python Versions

概要

AnnoFabのCLI(Command Line Interface)ツールです。 「タスクの一括差し戻し」や、「タスク一覧出力」など、AnnoFabの画面で実施するには時間がかかる操作を、コマンドとして提供しています。

注意

  • 作者または著作権者は、ソフトウェアに関してなんら責任を負いません。
  • 予告なく互換性のない変更がある可能性をご了承ください。
  • AnnoFabプロジェクトに大きな変更を及ぼすコマンドも存在します。間違えて実行してしまわないよう、注意してご利用ください。

廃止予定

  • 2020-04-01以降:annofabcli filesystem write_annotation_imageコマンドの--metadata_key_of_image_sizeを廃止します。入力データから画像サイズを取得できるようになったためです。
  • 2020-04-01以降:annofabcli inspection_comment list_unprocessedコマンドを廃止します。inspection_comment listコマンドを組み合わせて同様のことが実現できるからです。

Requirements

  • Python 3.7.1+

Install

$ pip install annofabcli

https://pypi.org/project/annofabcli/

Dockerを利用する場合

$ git clone https://github.com/kurusugawa-computer/annofab-cli.git
$ cd annofab-cli
$ chmod u+x docker-build.sh
$ ./docker-build.sh

$ docker run -it annofab-cli --help

# AnnoFabの認証情報を標準入力から指定する
$ docker run -it annofab-cli project diff prj1 prj2
Enter AnnoFab User ID: XXXXXX
Enter AnnoFab Password: 

# AnnoFabの認証情報を環境変数で指定する
$ docker run -it -e ANNOFAB_USER_ID=XXXX -e ANNOFAB_PASSWORD=YYYYY annofab-cli project diff prj1 prj2

AnnoFabの認証情報の設定

https://annofab-cli.readthedocs.io/ja/latest/user_guide/configurations.html 参照

使い方

https://annofab-cli.readthedocs.io/ja/latest/user_guide/index.html 参照

コマンド一覧

https://annofab-cli.readthedocs.io/ja/latest/command_reference/index.html

よくある使い方

受入完了状態のタスクを差し戻す

"car"ラベルの"occluded"属性のアノテーションルールに間違いがあったため、以下の条件を満たすタスクを一括で差し戻します。

  • "car"ラベルの"occluded"チェックボックスがONのアノテーションが、タスクに1つ以上存在する。

前提条件

  • プロジェクトのオーナが、annofabcliコマンドを実行する
# 受入完了のタスクのtask_id一覧を、acceptance_complete_task_id.txtに出力する。
$ annofabcli task list --project_id prj1  --task_query '{"status": "complete","phase":"acceptance"}' \
 --format task_id_list --output acceptance_complete_task_id.txt

# 受入完了タスクの中で、 "car"ラベルの"occluded"チェックボックスがONのアノテーションの個数を出力する。
$ annofabcli annotation list_count --project_id prj1 --task_id file://task.txt --output annotation_count.csv \
 --annotation_query '{"label_name_en": "car", "attributes":[{"additional_data_definition_name_en": "occluded", "flag": true}]}'

# annotation_count.csvを表計算ソフトで開き、アノテーションの個数が1個以上のタスクのtask_id一覧を、task_id.txtに保存する。

# task_id.txtに記載されたタスクを差し戻す。検査コメントは「carラベルのoccluded属性を見直してください」。
# 差し戻したタスクには、最後のannotation phaseを担当したユーザを割り当てる(画面と同じ動き)。
$ annofabcli task reject --project_id prj1 --task_id file://tasks.txt --cancel_acceptance \
  --comment "carラベルのoccluded属性を見直してください"

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

annofabcli-1.40.0.tar.gz (192.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

annofabcli-1.40.0-py3-none-any.whl (303.1 kB view details)

Uploaded Python 3

File details

Details for the file annofabcli-1.40.0.tar.gz.

File metadata

  • Download URL: annofabcli-1.40.0.tar.gz
  • Upload date:
  • Size: 192.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.6 Linux/4.18.0-16-generic

File hashes

Hashes for annofabcli-1.40.0.tar.gz
Algorithm Hash digest
SHA256 8fc9e36c1b4e6119de0439da0c9bd54bfeed457f7294b38736fe7b888d878930
MD5 20a7132b68d4fc0bbf66f9190e240888
BLAKE2b-256 734dc67ff60cbf87f79bd38c9e5a88be30bb3974ff06a0400895255685a646b4

See more details on using hashes here.

File details

Details for the file annofabcli-1.40.0-py3-none-any.whl.

File metadata

  • Download URL: annofabcli-1.40.0-py3-none-any.whl
  • Upload date:
  • Size: 303.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.6 Linux/4.18.0-16-generic

File hashes

Hashes for annofabcli-1.40.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae3c780c42a4be3c4e33fa3be2b493bee7772c2da830c9cc6404c11aac8b22c4
MD5 f5c13520a140e814e8afe8433ef5a20b
BLAKE2b-256 f692882db2edecc9b24e8b644bb1ed5f885bf04c6c84d16aa96775fc110cc1eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page