

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 创建 3D-2D 点云对象跟踪标注作业
<a name="sms-3d-2d-point-cloud-object-tracking-create-labeling-job"></a>

您可以使用 SageMaker API 操作创建 3D-2D 点云标注作业。[https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html)要为该任务类型创建标注作业，您需要具有以下内容：
+ 来自私有或供应商人力的工作团队。您无法将 Amazon Mechanical Turk 用于 3D 点云标注作业。要了解如何创建人力和工作团队，请参阅[人力](sms-workforce-management.md)。
+ 在 Amazon S3 控制台中，将 CORS 策略添加到包含输入数据的 S3 存储桶。在 S3 控制台中，要在包含输入图像的 S3 存储桶上设置所需的 CORS 标头，请按照 [CORS 权限要求](https://docs.amazonaws.cn/sagemaker/latest/dg/sms-cors-update.html)中的详细说明进行操作。
+ 此外，请确保您已查阅[分配 IAM 权限以使用 Ground Truth](sms-security-permission.md)并满足相应的要求。

要了解如何使用 API 创建标注作业，请参阅以下几节。

## 创建标注作业 (API)
<a name="sms-point-cloud-3d-2d-object-tracking-create-labeling-job-api"></a>

本节介绍使用 SageMaker API 操作创建 3D-2D 对象跟踪标签作业时需要了解的详细信息。`CreateLabelingJob`此 API 为所有人定义了此操作 Amazon SDKs。要查看此操作 SDKs 支持的特定语言列表，请查看的 “**另请参阅**” 部分。[https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html)

[创建标注作业 (API)](sms-create-labeling-job-api.md)概述了 `CreateLabelingJob` 操作。请按照这些说明进行操作，并在配置请求时执行以下操作：
+ 您必须为 `HumanTaskUiArn` 输入一个 ARN。使用 `arn:aws:sagemaker:{{<region>}}:394669845002:human-task-ui/PointCloudObjectTracking`。将 `{{<region>}}` 替换为您在其中创建标注作业的 Amazon 区域。

  不应具有 `UiTemplateS3Uri` 参数的条目。
+ [https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html#sagemaker-CreateLabelingJob-request-LabelAttributeName](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html#sagemaker-CreateLabelingJob-request-LabelAttributeName) 必须以 `-ref` 结尾。例如 `{{ot-labels}}-ref`。
+ 输入清单文件必须是点云帧序列清单文件。有关更多信息，请参阅 [创建点云序列输入清单](sms-point-cloud-multi-frame-input-data.md)。您还需要提供如上所述的标签类别配置文件。
+ 您需要为预注解和后标注 ( ARNs ACS) Lambda 函数提供预定义的。 ARNs 它们特定于您用于创建标签任务的 Amazon 区域。
  + 要查找注释前 Lambda ARN，请参考 [https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_HumanTaskConfig.html#sagemaker-Type-HumanTaskConfig-PreHumanTaskLambdaArn](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_HumanTaskConfig.html#sagemaker-Type-HumanTaskConfig-PreHumanTaskLambdaArn)。请使用您在其中创建标注作业的区域以查找以 `PRE-3DPointCloudObjectTracking` 结尾的正确 ARN。
  + 要查找注释后 Lambda ARN，请参考 [https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_AnnotationConsolidationConfig.html#sagemaker-Type-AnnotationConsolidationConfig-AnnotationConsolidationLambdaArn](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_AnnotationConsolidationConfig.html#sagemaker-Type-AnnotationConsolidationConfig-AnnotationConsolidationLambdaArn)。请使用您在其中创建标注作业的区域以查找以 `ACS-3DPointCloudObjectTracking` 结尾的正确 ARN。
+ `NumberOfHumanWorkersPerDataObject` 中指定的工作人员数应该为 `1`。
+ 3D 点云标注作业不支持自动数据标注。您不应在 `[LabelingJobAlgorithmsConfig](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html#sagemaker-CreateLabelingJob-request-LabelingJobAlgorithmsConfig)` 中指定参数值。
+ 3D-2D 对象跟踪标注作业可能需要几小时才能完成。您可以在 `TaskTimeLimitInSeconds` 中为这些标注作业指定更长的时间限制（最多 7 天或 604800 秒）。

**注意**  
成功创建 3D-2D 对象跟踪作业后，它会显示在控制台上的标注作业下方。作业的任务类型显示为**点云对象跟踪**。

## 输入数据格式
<a name="sms-point-cloud-3d-2d-object-tracking-input-data"></a>

您可以使用 SageMaker API 操作创建 3D-2D 对象跟踪作业。[https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_CreateLabelingJob.html)要为该任务类型创建标注作业，您需要具有以下内容：
+ 序列输入清单文件。要了解如何创建这种类型的清单文件，请参阅[创建点云序列输入清单](sms-point-cloud-multi-frame-input-data.md)。如果您是 Ground Truth 3D 点云标注模式的新用户，我们建议您查阅 [接受的原始 3D 数据格式](sms-point-cloud-raw-data-types.md)。
+ 您可以在标签类别配置文件中指定标签、标签类别和帧属性以及工作人员说明。有关更多信息，请参阅[创建包含标签类别和帧属性的标签类别配置文件](https://docs.amazonaws.cn/sagemaker/latest/dg/sms-label-cat-config-attributes.html)以了解如何创建此文件。以下示例显示了用于创建 3D-2D 对象跟踪作业的标签类别配置文件。

  ```
  {
      "document-version": "2020-03-01",
      "categoryGlobalAttributes": [
          {
              "name": "Occlusion",
              "description": "global attribute that applies to all label categories",
              "type": "string",
              "enum":[
                  "Partial",
                  "Full"
              ]
          }
      ],
      "labels":[
          {
              "label": "Car",
              "attributes": [
                  {
                      "name": "Type",
                      "type": "string",
                      "enum": [
                          "SUV",
                          "Sedan"
                      ]
                  } 
              ]
          },
          {
              "label": "Bus",
              "attributes": [
                  {
                      "name": "Size",
                      "type": "string",
                      "enum": [
                          "Large",
                          "Medium",
                          "Small"
                      ]
                  }
              ]
          }
      ],
      "instructions": {
          "shortIntroduction": "Draw a tight cuboid around objects after you select a category.",
          "fullIntroduction": "<p>Use this area to add more detailed worker instructions.</p>"
      },
      "annotationType": [
          {
              "type": "BoundingBox"
          },
          {
              "type": "Cuboid"
          }
      ]
  }
  ```
**注意**  
您需要在标签类别配置文件中提供 `BoundingBox` 和 `Cuboid` 作为 annotationType，以创建 3D-2D 对象跟踪作业。