本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
带有标签类别和框架属性参考的标注类别配置文件
使用 Amazon SageMaker API 操作创建 3D 点云或视频帧标注任务时CreateLabelingJob,您可以使用标签类别配置文件来指定标签和工作指令。您也可以选择在标签类别属性文件中提供以下内容:
-
您可以为视频帧和 3D 点云对象跟踪和对象检测任务类型提供标签类别属性。工作人员可以使用一个或多个属性来提供有关对象的更多信息。例如,您可能希望使用 occluded 属性,以使工作人员确定对象何时被部分遮挡。您可以使用
categoryAttributes参数为单个标签指定标签类别属性,或者使用categoryGlobalAttributes参数为所有标签指定标签类别属性。 -
您可以使用
frameAttributes为视频帧和 3D 点云对象跟踪和对象检测任务类型提供帧属性。创建帧属性时,该属性会出现在工作人员任务中的每个帧或点云上。在视频帧标注作业中,这些属性是工作人员分配给整个视频帧的属性。对于 3D 点云标注作业,这些属性应用于单个点云。使用帧属性可让工作人员提供特定帧或点云中场景的更多信息。 -
对于视频帧标注作业,可以使用标签类别配置文件指定发送给工作人员的任务类型(边界框、折线、多边形或关键点)。
工作人员可以选择性地为标签类别属性和帧属性指定值。
重要
只有在运行审核作业以验证或调整标签时,您才应在 auditLabelAttributeName 中提供标签属性名称。使用此参数输入标注作业中LabelAttributeName使用的,该作业生成了您希望工作人员调整的注释。在控制台中创建标签任务时,如果您未指定标签属性名称,则您的任务名称将用作 LabelAttributeName。
以下主题显示了不同类型标注作业的标签类别配置文件示例。它们还解释了类别配置文件的架构和配额。
示例:3D 点云标注作业的标签类别配置文件
以下主题显示了对象检测、对象跟踪、语义分割、调整和验证标注作业的 3D 点云标签类别配置文件的示例。
示例:3D 点云对象跟踪和对象检测
下面是一个标签类别配置文件示例,其中包含 3D 点云对象检测或对象跟踪标注作业的标签类别属性。此示例包括两个帧属性,这些属性将添加到提交给标注作业的所有点云中。Car 标签将包括四个标签类别属性 – X、Y、Z 和全局属性 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 点云语义分割
下面是 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 点云对象检测或对象跟踪调整标注作业的标签类别配置文件示例。对于 3D 点云语义分割调整标注作业,不支持 categoryGlobalAttributes 和 categoryAttributes。
必须包括 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 点云验证
以下是可用于 3D 点云对象检测或对象跟踪验证标注作业的标签类别配置文件示例。对于 3D 点云语义分割验证标注作业,不支持 categoryGlobalAttributes 和 categoryAttributes。
必须包括 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 指定的值。例如,如果希望工作人员使用关键点来跟踪多个帧中特定对象姿势的变化,则应该为 annotationType 指定 Keypoint。如果未指定注释类型,则默认情况下将使用 BoundingBox。
以下主题显示了视频帧类别配置文件的示例。
示例:视频帧关键点
下面是一个带有标签类别属性的视频帧关键点标签类别配置文件示例。此示例包括两个帧属性,这两个属性将添加到提交给标注作业的所有帧中。Car 标签将包括四个标签类别属性 – X、Y、Z 和全局属性 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>"} }
示例:视频帧调整
以下是可用于视频帧调整标注作业的标签类别配置文件示例。
必须包括 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" }
示例:视频帧验证
以下是视频帧标注作业的标签类别配置文件示例。
必须包括 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" }
标签类别配置文件架构
下表列出了您可以或必须在标签类别配置文件中包含的元素。
注意
仅视频帧标注作业支持 annotationType 参数。
|
参数 |
必需 |
接受的值 |
描述 |
|---|---|---|---|
frameAttributes |
否 |
JSON 对象列表。 每个 JSON 对象中的必需参数:
如果 每个 JSON 对象中的可选参数:
|
使用此参数可创建一个帧属性,该属性应用于标注作业中的所有帧或 3D 点云。 有关更多信息,请参阅本节中的第三个表。 |
categoryGlobalAttributes |
否 |
JSON 对象列表。 每个 JSON 对象中的必需参数:
如果 每个 JSON 对象中的可选参数:
|
使用此参数可以创建应用于在 |
labels |
是 |
最多包含 30 个 JSON 对象的列表 每个 JSON 对象中的必需参数:
每个 JSON 对象中的可选参数:
|
使用此参数可以指定标签或类。为每个类添加一个 要将标签类别属性添加到一个标签中,请将 使用 有关更多信息,请参阅下表。 |
annotationType(仅视频帧标注作业支持) |
否 |
字符串 接受的参数:
默认值:
|
使用此项可以指定视频帧标注作业的任务类型。例如,对于多边形视频帧对象检测任务,请选择 如果在创建视频帧标注作业时未指定 |
instructions |
否 |
JSON 对象 每个 JSON 对象中的必需参数:
|
使用此参数可以添加有助于工作人员完成任务的工作人员说明。有关工作人员说明的更多信息,请参阅工作人员说明。 短说明必须少于 255 个字符,长说明必须少于 2048 个字符。 有关更多信息,请参阅 创建说明页。 |
auditLabelAttributeName |
调整和验证任务类型所必需的 |
字符串 |
输入要调整标注的标注作业中LabelAttributeName使用的。 仅当您正在为视频帧和 3D 点云对象检测、对象跟踪或 3D 点云语义分割创建调整作业时,才使用此参数。 |
标签对象架构
下表描述了创建 Labels 列表时可以使用和必须使用的参数。每个参数都应包含在 JSON 对象中。
| 参数 | 必需 | 接受的值 | Description |
|---|---|---|---|
label |
是 |
字符串 |
向工作人员显示的标签类别的名称。每个标签类别名称必须唯一。 |
categoryAttributes |
否 |
JSON 对象列表。 每个 JSON 对象中的必需参数:
如果 每个 JSON 对象中的可选参数:
|
使用此参数可以将标签类别属性添加到在 要向标签添加一个或多个标签类别属性,请将 |
editsAllowed |
否 |
字符串 支持的值:
或
|
指定工作人员是否可以编辑标签。 对于视频帧或 3D 点云调整标注作业,请将此参数添加到 对于 3D 点云和视频帧验证标注作业,请将此参数与值 |
框架属性和 categoryGlobalAttributes 架构
下表描述了使用 frameAttributes 创建帧属性时以及使用 categoryGlobalAttributes 和 categoryAttributes 参数创建标签类别属性时可以使用和必须使用的参数。
|
参数 |
必需 |
接受的值 |
Description |
|---|---|---|---|
name |
是 |
字符串 |
使用此参数可以为标签类别或帧属性分配名称。这是工作人员看到的属性名称。 标签类别配置文件中的每个标签类别属性名称必须是唯一的。全局标签类别属性和特定于标签的标签类别属性不能具有相同的名称。 |
type |
是 |
字符串 必需的值:
|
使用此参数可以定义标签类别或帧属性类型。 如果为 如果为 如果为 |
enum |
否 |
字符串列表 |
使用此参数可以定义工作人员可为此标签类别或帧属性选择的选项。工作人员可以选择在 必须为 |
description |
|
字符串 |
使用此参数可以添加标签类别或帧属性的描述。您可以使用此字段向工作人员提供有关属性的更多信息。 只有帧属性才需要此字段。 |
minimum 和 maximum |
如果属性 type 为 "number",则是必需的 |
整数 |
使用这些参数可以指定工作人员可为数值标签类别或帧属性输入的最小值和最大值(包括)。 必须为 |
editsAllowed |
否 |
字符串 必需的值:
或
|
指定工作人员是否可以编辑标签类别或帧属性。 对于视频帧或 3D 点云调整和验证标注作业,请将此参数添加到标签类别和帧属性 JSON 对象中,以指定工作人员是否可以编辑属性。 |
isRequired |
否 |
布尔值 |
指定是否需要工作人员对属性进行注释。在对所有必需的属性进行注释之前,工作人员无法提交作业。 |
标签和标签类别属性限额
您最多可以为每个类指定 10 个标签类别属性。这 10 个属性限额包括全局标签类别属性。例如,如果您创建 4 个全局标签类别属性,然后将三个标签类别属性分配给标签 X,则该标签总共具有 4+3=7 个标签类别属性。有关所有标签类别和标签类别属性限制,请参阅下表。
|
类型 |
最小值 |
最大值 |
|---|---|---|
|
标签 ( |
1 |
30 |
|
标签名称字符限额 |
1 |
16 |
|
每个标签的标签类别属性( |
0 |
10 |
|
每个标签的自由格式文本条目标签类别属性( |
0 | 5 |
|
帧属性 |
0 |
10 |
|
|
0 | 5 |
|
属性名称字符限额 ( |
1 |
16 |
|
属性描述字符限额 ( |
0 |
128 |
|
属性类型字符限额 ( |
1 |
16 |
|
|
1 | 10 |
|
|
1 | 16 |
自由格式文本 frameAttributes 的自由格式文本响应中的最大字符数 |
0 | 1000 |
自由格式文本 categoryAttributes 和 categoryGlobalAttributes 的自由格式文本响应中的最大字符数 |
0 | 80 |