Amazon Rekognition Video 的 MaxLabels 不起作用

MaxLabels for Amazon Rekognition Video not working

MaxLabels 参数适用于 Amazon Rekognition 图像,但不适用于视频。我有这个 PHP 我使用的有效载荷:


            'ClientRequestToken' => (string)Str::uuid(),
            'JobTag' => VideoOperations::REKOGNITION_LABEL_DETECTION,
            'NotificationChannel' => [
                'RoleArn' => config('rekognition.notification_channel.role_arn'),
                'SNSTopicArn' => config('rekognition.notification_channel.sns_arn'),
            ],
            'MinConfidence' => config('rekognition.min_confidence'),
            'MaxLabels' => config('rekognition.max_labels'),
            'Video' => [
                'S3Object' => [
                    'Bucket' => config('rekognition.bucket'),
                    'Name' => $video->filename
                ],
            ]


我查看了官方 github AWSDocs Rekognition 示例,但找不到 MaxLabels 在 Video Rekognition 上的实现。

不支持吗? https://github.com/awsdocs/amazon-rekognition-developer-guide/search?q=MaxLabels

您好,AWS 对此做出了回答 link.

Dear customer,

目前,视频标签检测不支持“MaxLabels”,即 StartLabelDetection 和 GetLabelDetection API。

在 GetLabelDetection API 中,“MaxResults”可用于指定每个分页 API 调用的最大结果数 return。但是,视频中的“MaxResults”与图像中的“MaxLabels”不同。请在 https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetLabelDetection.html#API_GetLabelDetection_RequestSyntax. Please see details of image DetectLabels "MaxLabels" in https://docs.aws.amazon.com/rekognition/latest/APIReference/API_DetectLabels.html#API_DetectLabels_RequestSyntax.

中查看视频 GetLabelDetection“MaxResults”的详细信息

感谢您使用 Rekognition Video。