ラベルカテゴリとフレーム属性を含むラベル付けカテゴリ設定ファイルを作成する - Amazon SageMaker

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

ラベルカテゴリとフレーム属性を含むラベル付けカテゴリ設定ファイルを作成する

Amazon SageMaker API オペレーション を使用して 3D 点群または動画フレームのラベル付けジョブを作成する場合CreateLabelingJob、ラベルカテゴリ設定ファイルを使用してラベルとワーカー向け指示書を指定します。必要に応じて、ラベルカテゴリ属性ファイルに以下を指定することもできます。

  • 動画フレームと 3D 点群のオブジェクト追跡とオブジェクト検出タスクタイプのラベルカテゴリ属性を指定できます。ワーカーは 1 つ以上の属性を使用して、そのオブジェクトに関する詳細情報を提供できます。例えば、occluded 属性を使用して、オブジェクトが部分的に遮られたときをワーカーが識別できるようにすることができます。categoryAttributes パラメータを使用して 1 つのラベルにラベルカテゴリ属性を指定することも、categoryGlobalAttributes パラメータを使用してすべてのラベルにラベルカテゴリ属性を指定することもできます。

  • frameAttributes を使用して、動画フレームと 3D 点群のオブジェクト追跡とオブジェクト検出タスクタイプのフレーム属性を提供できます。フレーム属性を作成すると、ワーカータスクの各フレームまたは点群に表示されます。動画フレームラベル付けジョブでは、これらは、ワーカーが動画フレーム全体に割り当てる属性です。3D 点群のラベル付けジョブでは、これらの属性は 1 つの点群に適用されます。フレーム属性を使用して、ワーカーが特定のフレームまたは点群内のシーンに関する詳細情報を提供できるようにします。

  • 動画フレームラベル付けジョブでは、ラベルカテゴリ設定ファイルを使用して、ワーカーに送信されるタスクタイプ (境界ボックス、ポリライン、ポリゴン、または特徴点) を指定します。

ワーカーによるラベルカテゴリ属性とフレーム属性の値の指定は、任意です。

重要

auditLabelAttributeName でラベル属性名を指定する必要があるのは、ラベルを検証または調整するために監査ジョブを実行する場合のみです。このパラメータを使用して、ワーカーに調整させたい注釈を生成したラベル付けジョブLabelAttributeNameで使用される を入力します。コンソールでラベル付けジョブを作成するときに、ラベル属性名を指定しなかった場合、ジョブの名前が として使用されます LabelAttributeName。

ラベルカテゴリ設定ファイルスキーマ

次の表に、ラベルカテゴリ設定ファイルに含めることができる要素と、含める必要がある要素を示します。

注記

パラメータ annotationType は、動画フレームラベル付けジョブでのみサポートされています。

[Parameter] (パラメータ)

必須

使用できる値

説明

frameAttributes

いいえ

JSON オブジェクトのリスト。

各 JSON オブジェクトの必須パラメータ:

name, type, description

type"number" の場合、minimummaximum は必須です。

各 JSON オブジェクトの任意パラメータ:

enum, editsAllowed, isRequired

このパラメータを使用して、ラベル付けジョブ内のすべてのフレームまたは 3D 点群に適用されるフレーム属性を作成します。

詳細については、このセクションの 3 番目の表を参照してください。
categoryGlobalAttributes

いいえ

JSON オブジェクトのリスト。

各 JSON オブジェクトの必須パラメータ:

name, type

type"number" の場合、minimummaximum は必須です。

各 JSON オブジェクトの任意パラメータ:

description, enum, editsAllowed, isRequired

このパラメータを使用して、labels で指定したすべてのラベルに適用されるラベルカテゴリ属性を作成します。

詳細については、このセクションの 3 番目の表を参照してください。
labels

はい

最大 30 個の JSON オブジェクトのリスト

各 JSON オブジェクトの必須パラメータ:

label

各 JSON オブジェクトの任意パラメータ:

categoryAttributes, editsAllowed

ラベルまたはクラスを指定するには、このパラメータを使用します。クラスごとに 1 つずつ label を追加します。

ラベルカテゴリ属性をラベルに追加するには、そのラベルに categoryAttributes を追加します。

editsAllowed を使用して、調整ラベル付けジョブでラベルを編集可能にするかどうかを指定します。検証ラベル付けジョブの場合は、editsAllowed"none" に設定します。

詳細については、以下のテーブルを参照してください。

annotationType(動画フレームラベル付けジョブでのみサポートされます)

いいえ

文字列

使用できるパラメータ:

BoundingBox, Polyline, Polygon, Keypoint

デフォルト値:

BoundingBox

これを使用して、動画フレームラベル付けジョブのタスクタイプを指定します。例えば、ポリゴン動画フレームオブジェクト検出タスクでは、Polygon を選択します。

動画フレームラベル付けジョブを作成するときに annotationType を指定しない場合、Ground Truth はデフォルトで BoundingBox を使用します。

instructions

いいえ

JSON オブジェクト

各 JSON オブジェクトの必須パラメータ:

"shortInstruction", "fullInstruction"

このパラメータを使用して、ワーカーがタスクを完了するためのワーカー向け指示書を追加します。ワーカー向け指示書の詳細については、「ワーカー向け指示書」を参照してください。

短い指示書は 255 文字未満、長い指示書は 2,048 文字未満である必要があります。

詳細については、「ワーカー向け指示書の作成」を参照してください。

auditLabelAttributeName

調整と検証のタスクタイプで必須

文字列

注釈を調整するラベル付けジョブでLabelAttributeName使用されている を入力します。

このパラメータは、動画フレームと 3D 点群のオブジェクト検出、オブジェクト追跡、または 3D 点群セマンティックセグメンテーションの調整ジョブを作成する場合にのみ使用します。

次の表に、Labels のリスト作成に使用できるパラメータと使用すべきパラメータを示します。各パラメータは JSON オブジェクトに含める必要があります。

[Parameter] (パラメータ) 必須 使用できる値 [Description] (説明)
label

はい

文字列

ワーカーに表示されるラベルカテゴリの名前。各ラベルカテゴリ名は一意である必要があります。

categoryAttributes

いいえ

JSON オブジェクトのリスト。

各 JSON オブジェクトの必須パラメータ:

name, type

minimummaximum の場合、type"number" は必須です。

各 JSON オブジェクトの任意パラメータ:

description, enum, editsAllowed, isRequired

このパラメータを使用して、labels で指定する特定のラベルにラベルカテゴリ属性を追加します。

ラベルに 1 つ以上のラベルカテゴリ属性を追加するには、その label と同じ labels JSON オブジェクトを categoryAttributes JSON オブジェクトに含めます。

詳細については、以下のテーブルを参照してください。
editsAllowed

いいえ

文字列

サポートされる値:

"none": 修正は許可されていません。

または

"any"(デフォルト): すべての修正が許可されます。

ワーカーがラベルを編集できるかどうかを指定します。

動画フレームまたは 3D 点群の調整ラベル付けジョブの場合、このパラメータを labels リストの 1 つ以上の JSON オブジェクトに追加して、ワーカーがラベルを編集できるかどうかを指定します。

3D 点群と動画フレームの検証ラベル付けジョブの場合、このパラメータを "none" の値で labels リスト内の各 JSON オブジェクトに追加します。これにより、すべてのラベルが編集不可になります。

次の表に、frameAttributes を使用してフレーム属性を作成し、categoryGlobalAttributescategoryAttributes パラメータを使用してラベルカテゴリ属性を作成するために使用できるパラメータと使用する必要のあるパラメータを示します。

[Parameter] (パラメータ)

必須

使用できる値

[Description] (説明)

name

はい

文字列

このパラメータを使用して、ラベルカテゴリ属性またはフレーム属性に名前を割り当てます。これは、ワーカーに表示される属性名です。

ラベルカテゴリ設定ファイル内のラベルカテゴリ属性名は、それぞれ一意である必要があります。グローバルラベルカテゴリ属性とラベル固有のラベルカテゴリ属性には、同じ名前を付けることはできません。

type

はい

文字列

必須の値:

"string" または "number"

このパラメータを使用して、ラベルカテゴリまたはフレームの属性タイプを定義します。

type"string" を指定し、この属性に enum の値を指定すると、ワーカーは指定した選択肢の 1 つから選択できるようになります。

"string"type を指定し、この属性に enum の値を指定しない場合、ワーカーはフリーフォームテキストを入力できます。

typenumber を指定する場合、ワーカーは指定された minimum から maximum の間の数字を入力できます。

enum

いいえ

文字列のリスト

このパラメータを使用して、ワーカーがこのラベルカテゴリまたはフレーム属性に対して選択できるオプションを定義します。ワーカーは、enum で指定された 1 つの値を選択できます。例えば、 [["foo", "buzz", "bar"]を enum に指定する場合、ワーカーは foobuzz、または bar から、いずれかを選択できます。

enum リストを使用するには、type"string" を指定する必要があります。

description

frameAttributes: はい

categoryAttributes または categoryGlobalAttributes: いいえ

文字列

このパラメータを使用して、ラベルカテゴリまたはフレーム属性の説明を追加します。このフィールドを使用して、ワーカーに属性に関する詳細情報を提供できます。

このフィールドは、フレーム属性でのみ必須です。

minimum および maximum 属性 type"number" の場合は必須です。 整数

これらのパラメータを使用して、ワーカーが数値ラベルカテゴリ属性またはフレーム属性に入力できる最小値と最大値を指定します。

minimummaximum を使用するには、type"number" を指定する必要があります。

editsAllowed

いいえ

文字列

必須の値:

"none": 修正は許可されていません。

または

"any"(デフォルト): すべての修正が許可されます。

ワーカーがラベルカテゴリまたはフレーム属性を編集できるかどうかを指定します。

動画フレームまたは 3D 点群の調整検証のラベル付けジョブの場合は、このパラメータをラベルカテゴリとフレーム属性の JSON オブジェクトに追加して、ワーカーが属性を編集できるかどうかを指定します。

isRequired

いいえ

ブール値

ワーカーが属性に注釈を付ける必要があるかどうかを指定します。ワーカーは、すべての必須属性に注釈を付けるまで、ジョブを送信できません。

ラベルとラベルカテゴリの属性クォータ

クラスごとに最大 10 個のラベルカテゴリ属性を指定できます。この 10 属性クォータには、グローバルラベルカテゴリ属性が含まれます。例えば、4 つのグローバルラベルカテゴリ属性を作成し、3 つのラベルカテゴリ属性をラベル X に割り当てると 、そのラベルには合計 4+3=7 のラベルカテゴリ属性が割り当てられます。すべてのラベルカテゴリおよびラベルカテゴリ属性の制限については、次の表を参照してください。

タイプ

最小

最大

ラベル (Labels)

1

30

ラベル名の文字数クォータ

1

16

ラベルごとのラベルカテゴリ属性 (categoryAttributescategoryGlobalAttributes の合計)

0

10

ラベルごとのフリーフォームテキスト入力ラベルカテゴリ属性 (categoryAttributescategoryGlobalAttributes の合計)。

0 5

フレーム属性

0

10

frameAttributes のフリーフォームテキスト入力属性。

0 5

属性名の文字数クォータ (name)

1

16

属性説明の文字数クォータ (description)

0

128

属性タイプの文字数クォータ (type)

1

16

enum リストで string 属性に許可されている値

1 10

enum リスト内の値の文字クォータ

1 16
フリーフォームテキストのフリーフォームテキスト応答の最大文字数 frameAttributes 0 1,000
フリーフォームテキストのフリーフォームテキスト応答の最大文字数 categoryAttributescategoryGlobalAttributes 0 80

例: 3D 点群ラベル付けジョブのラベルカテゴリ設定ファイル

次の表にあるタブを選択して、オブジェクト検出、オブジェクト追跡、セマンティックセグメンテーション、調整、検証ラベル付けジョブの 3D 点群ラベルカテゴリ設定ファイルの例を表示します。

3D Point Cloud Object Tracking and Object Detection

以下は、3D 点群オブジェクト検出またはオブジェクト追跡のラベル付けジョブのラベルカテゴリ属性を含むラベルカテゴリ設定ファイルの例です。この例には、ラベル付けジョブに送信されたすべての点群に追加される 2 つのフレーム属性が含まれています。Car ラベルには 4 つのラベルカテゴリ属性、XYZ、グローバル属性の W が含まれます。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "description":"describe the scene", "type":"string", "enum":["clear","blurry"], "isRequired":true }, ], "categoryGlobalAttributes": [ { "name":"W", "description":"label-attributes-for-all-labels", "type":"string", "enum": ["foo", "buzz", "biz"] } ], "labels": [ { "label": "Car", "categoryAttributes": [ { "name":"X", "description":"enter a number", "type":"number", }, { "name":"Y", "description":"select an option", "type":"string", "enum":["y1", "y2"] }, { "name":"Z", "description":"submit a free-form response", "type":"string", } ] }, { "label": "Pedestrian", "categoryAttributes": [...] } ], "instructions": {"shortInstruction":"Draw a tight Cuboid", "fullInstruction":"<html markup>"} }
3D Point Cloud Semantic Segmentation

以下は、3D 点群セマンティックセグメンテーションのラベル付けジョブのラベルカテゴリ構成ファイルの例です。

ラベルカテゴリ属性は、3D 点群セマンティックセグメンテーションタスクタイプについてサポートされていません。フレーム属性がサポートされています。セマンティックセグメンテーションラベル付けジョブにラベルカテゴリ属性を指定した場合、それらは無視されます。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "description":"describe the scene", "type":"string", "enum":["clear","blurry"] }, ], "labels": [ { "label": "Car", }, { "label": "Pedestrian", }, { "label": "Cyclist", } ], "instructions": {"shortInstruction":"Select the appropriate label and paint all objects in the point cloud that it applies to the same color", "fullInstruction":"<html markup>"} }

次の表にあるタブを選択して、3D 点群の検証または調整ラベル付けジョブのラベルカテゴリ設定ファイルの例を表示します。

3D Point Cloud Adjustment

次に、3D 点群オブジェクト検出またはオブジェクト追跡調整ラベル付けジョブのラベル付けジョブのラベルカテゴリ設定ファイルの例を示します。3D 点群セマンティックセグメンテーション調整ラベル付けジョブの場合、categoryGlobalAttributescategoryAttributes はサポートされていません。

auditLabelAttributeName を含めて、調整ラベル付けジョブの作成に使用する、以前のラベル付けジョブのラベル属性名を指定する必要があります。必要に応じて、editsAllowed パラメータを使用して、ラベルまたはフレーム属性を編集できるかどうかを指定できます。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "editsAllowed":"none", "description":"describe the scene", "type":"string", "enum":["clear","blurry"] }, ], "categoryGlobalAttributes": [ { "name":"W", "editsAllowed":"any", "description":"label-attributes-for-all-labels", "type":"string", "enum": ["foo", "buzz", "biz"] } ], "labels": [ { "label": "Car", "editsAllowed":"any", "categoryAttributes": [ { "name":"X", "description":"enter a number", "type":"number" }, { "name":"Y", "description":"select an option", "type":"string", "enum":["y1", "y2"], "editsAllowed":"any" }, { "name":"Z", "description":"submit a free-form response", "type":"string", "editsAllowed":"none" } ] }, { "label": "Pedestrian", "categoryAttributes": [...] } ], "instructions": {"shortInstruction":"Draw a tight Cuboid", "fullInstruction":"<html markup>"}, // include auditLabelAttributeName for label adjustment jobs "auditLabelAttributeName": "myPrevJobLabelAttributeName" }
3D Point Cloud Verification

次に、3D 点群オブジェクト検出またはオブジェクト追跡検証のラベル付けジョブに使用するラベルカテゴリ設定ファイルの例を示します。3D 点群セマンティックセグメンテーション検証ラベル付けジョブの場合、categoryGlobalAttributescategoryAttributes はサポートされていません。

auditLabelAttributeName を含めて、検証ラベル付けジョブの作成に使用する、以前のラベル付けジョブのラベル属性名を指定する必要があります。さらに、editsAllowed パラメータを使用して、ラベルを編集できないように指定します。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "editsAllowed":"any", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "editsAllowed":"any", "description":"describe the scene", "type":"string", "enum":["clear","blurry"] }, ], "categoryGlobalAttributes": [ { "name":"W", "editsAllowed":"none", "description":"label-attributes-for-all-labels", "type":"string", "enum": ["foo", "buzz", "biz"] } ], "labels": [ { "label": "Car", "editsAllowed":"none", "categoryAttributes": [ { "name":"X", "description":"enter a number", "type":"number", "editsAllowed":"none" }, { "name":"Y", "description":"select an option", "type":"string", "enum":["y1", "y2"], "editsAllowed":"any" }, { "name":"Z", "description":"submit a free-form response", "type":"string", "editsAllowed":"none" } ] }, { "label": "Pedestrian", "editsAllowed":"none", "categoryAttributes": [...] } ], "instructions": {"shortInstruction":"Draw a tight Cuboid", "fullInstruction":"<html markup>"}, // include auditLabelAttributeName for label verification jobs "auditLabelAttributeName": "myPrevJobLabelAttributeName" }

例: 動画フレームラベル付けジョブのラベルカテゴリ設定ファイル

使用するワーカーとタスクタイプで使用できる注釈ツールは、annotationType に指定した値によって異なります。例えば、ワーカーが特徴点を使用して、複数のフレームにわたって特定のオブジェクトのポーズの変化を追跡できるようにするには、annotationTypeKeypoint を指定します。注釈タイプを指定しない場合、デフォルトでは BoundingBox が使用されます。

次に、ラベルカテゴリ属性を持つ動画フレームの特徴点ラベルカテゴリ設定ファイルの例を示します。この例では、ラベル付けジョブに送信されるすべてのフレームに追加される 2 つのフレーム属性が含まれています。Car ラベルには 4 つのラベルカテゴリ属性、XYZ、グローバル属性の W が含まれます。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "description":"describe the scene", "type":"string", "enum":["clear","blurry"] }, ], "categoryGlobalAttributes": [ { "name":"W", "description":"label-attributes-for-all-labels", "type":"string", "enum": ["foo", "buz", "buz2"] } ], "labels": [ { "label": "Car", "categoryAttributes": [ { "name":"X", "description":"enter a number", "type":"number", }, { "name":"Y", "description":"select an option", "type":"string", "enum": ["y1", "y2"] }, { "name":"Z", "description":"submit a free-form response", "type":"string", } ] }, { "label": "Pedestrian", "categoryAttributes": [...] } ], "annotationType":"Keypoint", "instructions": {"shortInstruction":"add example short instructions here", "fullInstruction":"<html markup>"} }

次の表からタブを選択して、動画フレーム調整および検証ラベル付けジョブのラベルカテゴリ設定ファイルの例を表示します。

Video Frame Adjustment

次に、動画フレーム調整のラベル付けジョブに使用できるラベルカテゴリ設定ファイルの例を示します。

auditLabelAttributeName を含めて、検証ラベル付けジョブの作成に使用する、以前のラベル付けジョブのラベル属性名を指定する必要があります。必要に応じて、editsAllowed パラメータを使用し、ラベル、ラベルカテゴリ属性、またはフレーム属性を編集できるかどうかを指定します。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "editsAllowed":"none", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "description":"describe the scene", "type":"string", "enum":["clear","blurry"] }, ], "categoryGlobalAttributes": [ { "name":"W", "editsAllowed":"any", "description":"label-attributes-for-all-labels", "type":"string", "enum": ["foo", "buz", "buz2"] } ], "labels": [ { "label": "Car", "editsAllowed":"any", "categoryAttributes": [ { "name":"X", "description":"enter a number", "type":"number", "editsAllowed":"any" }, { "name":"Y", "description":"select an option", "type":"string", "enum": ["y1", "y2"], "editsAllowed":"any" }, { "name":"Z", "description":"submit a free-form response", "type":"string", "editsAllowed":"none" } ] }, { "label": "Pedestrian", "editsAllowed":"none", "categoryAttributes": [...] } ], "annotationType":"Keypoint", "instructions": {"shortInstruction":"add example short instructions here", "fullInstruction":"<html markup>"}, // include auditLabelAttributeName for label adjustment jobs "auditLabelAttributeName": "myPrevJobLabelAttributeName" }
Video Frame Verification

次に、動画フレームラベル付けジョブのラベルカテゴリ設定ファイルの例を示します。

auditLabelAttributeName を含めて、検証ラベル付けジョブの作成に使用する、以前のラベル付けジョブのラベル属性名を指定する必要があります。さらに、editsAllowed パラメータを使用して、ラベルを編集できないように指定します。

{ "documentVersion": "2020-03-01", "frameAttributes": [ { "name":"count players", "editsAllowed":"none", "description":"How many players to you see in the scene?", "type":"number" }, { "name":"select one", "editsAllowed":"any", "description":"describe the scene", "type":"string", "enum":["clear","blurry"] }, ], "categoryGlobalAttributes": [ { "name":"W", "editsAllowed":"none", "description":"label-attributes-for-all-labels", "type":"string", "enum": ["foo", "buz", "buz2"] } ], "labels": [ { "label": "Car", "editsAllowed":"none", "categoryAttributes": [ { "name":"X", "description":"enter a number", "type":"number", "editsAllowed":"any" }, { "name":"Y", "description":"select an option", "type":"string", "enum": ["y1", "y2"], "editsAllowed":"any" }, { "name":"Z", "description":"submit a free-form response", "type":"string", "editsAllowed":"none" } ] }, { "label": "Pedestrian", "editsAllowed":"none", "categoryAttributes": [...] } ], "annotationType":"Keypoint", "instructions": {"shortInstruction":"add example short instructions here", "fullInstruction":"<html markup>"}, // include auditLabelAttributeName for label adjustment jobs "auditLabelAttributeName": "myPrevJobLabelAttributeName" }

ワーカー向け指示書の作成

ラベル付けジョブのカスタム指示書を作成して、タスクの完了におけるワーカーの精度を向上します。ワーカーがワーカー UI で [指示書] メニューオプションを選択すると、指示書にアクセスできます。短い指示書は 255 文字未満、長い指示書は 2,048 文字未満である必要があります。

指示書は次の 2 種類あります。

  • 短い指示書 - これらの指示書は、ワーカーの UI メニューで [指示書] を選択すると、作業に対して表示されます。これらは、オブジェクトにラベル付けする適切な方法をワーカーに表示するため、簡単に参照できるようにする必要があります。

  • 詳細な指示書 - これらの指示書は、ワーカーがポップアップウィンドウの指示書で [詳しい指示書] を選択すると表示されます。オブジェクトにラベルを付ける際のエッジケースやその他の難しい状況を示す複数の例を含めた、タスク完了のための詳細な指示書を提供することをお勧めします。

3D 点群と動画フレームのラベル付けジョブでは、ワーカー向け指示書をラベルカテゴリ設定ファイルに追加できます。単一の文字列を使用して指示書を作成することも、HTML マークアップを追加して指示書の外観をカスタマイズしたり、画像を追加したりすることもできます。指示書に含める画像はすべて公開されているものであることを確認してください。また、Amazon S3 に指示書がある場合、ワーカーが閲覧できるように読み取りアクセス権を持っていることを確認してください。