comment put_inspection

Description

検査コメントを付与します。

Examples

基本的な使い方

--json に検査コメントの内容をJSON形式で指定すると、検査コメントを付与できます。

comment.json
{
    "task1":{
        "input_data1": [
            {
                "comment": "type属性が間違っています。",
                "data": {
                    "x":10,
                    "y":20,
                    "_type": "Point"
                }
            },
            {
                "comment": "枠がズレています。 #A1",
                "data": {
                    "coordinates":[
                        {"x":20, "y":20}, {"x":30, "y":30}
                    ],
                    "_type": "Polyline"
                },
                "annotation_id": "foo",
                "phrases": ["A1"]
            }
        ],
        "input_data2":[]
    },
    "task2": {
        "input_data3":[]
    }
}
  • 1階層目のキーはtask_id, 2階層目のキーはinput_data_idです。

  • 検査コメントのプロパティとして指定できるキーは以下の通りです。

    • comment:検査コメントの内容。必須。

    • data:検査コメントの位置や区間。必須。詳細は後述を参照してください。

    • annotation_id:検査コメントに紐づくアノテーションのannotation_id

    • phrases:参照する定型指摘のIDの配列

$ annofabcli comment put_inspection --project_id prj1 --json file://comment.json

data プロパティに渡す値の例

画像プロジェクト:(x=0,y=0)の位置に点
{
    "x":0,
    "y":0,
    "_type": "Point"
}
画像プロジェクト:(x=0,y=0),(x=100,y=100)のポリライン
{
    "coordinates": [{"x":0, "y":0}, {"x":100, "y":100}],
    "_type": "Polyline"
}
動画プロジェクト:0〜100ミリ秒の区間
{
    "start":0,
    "end":100,
    "_type": "Time"
}
カスタムプロジェクト(3dpc editor):原点付近に辺が1の立方体
{
    "data": "{\"kind\": \"CUBOID\", \"shape\": {\"dimensions\": {\"width\": 1.0, \"height\": 1.0, \"depth\": 1.0}, \"location\": {\"x\": 0.0, \"y\": 0.0, \"z\": 0.0}, \"rotation\": {\"x\": 0.0, \"y\": 0.0, \"z\": 0.0}, \"direction\": {\"front\": {\"x\": 1.0, \"y\": 0.0, \"z\": 0.0}, \"up\": {\"x\": 0.0, \"y\": 0.0, \"z\": 1.0}}}, \"version\": \"2\"}",
    "_type": "Custom"
}

並列処理

以下のコマンドは、並列数4で実行します。

$  annofabcli comment put_inspection --project_id prj1 --json file://comment.json \
--parallelism 4 --yes

Usage Details

検査コメントを付与します。

usage: annofabcli comment put_inspection [-h] [--yes]
                                         [--endpoint_url ENDPOINT_URL]
                                         [--logdir LOGDIR] [--disable_log]
                                         [--debug] -p PROJECT_ID [--json JSON]
                                         [--parallelism PARALLELISM]

Named Arguments

-p, --project_id

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

--json

付与する検査コメントの内容をJSON形式で指定してください。file:// を先頭に付けると、JSON形式のファイルを指定できます。

(ex) {"task1": {"input_data1": [{"comment": "type属性が間違っています。", "data": {"x": 10, "y": 20, "_type": "Point"}}]}}

--parallelism

使用するプロセス数(並列度)を指定してください。指定する場合は必ず --yes を指定してください。指定しない場合は、逐次的に処理します。

global optional arguments

--yes

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

--endpoint_url

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

Default: "https://annofab.com"

--logdir

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

Default: .log

--disable_log

ログを無効にします。

--debug

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

チェッカーロールまたはオーナロールを持つユーザで実行してください。