Module Smaws_Client_Rekognition.GetLabelDetection

Gets the label detection results of a Amazon Rekognition Video analysis started by StartLabelDetection.

The label detection operation is started by a call to StartLabelDetection which returns a job identifier (JobId). When the label detection operation finishes, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartlabelDetection.

To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetLabelDetection and pass the job identifier (JobId) from the initial call to StartLabelDetection.

GetLabelDetection returns an array of detected labels (Labels) sorted by the time the labels were detected. You can also sort by the label name by specifying NAME for the SortBy input parameter. If there is no NAME specified, the default sort is by timestamp.

You can select how results are aggregated by using the AggregateBy input parameter. The default aggregation method is TIMESTAMPS. You can also aggregate by SEGMENTS, which aggregates all instances of labels detected in a given segment.

The returned Labels array may include the following attributes:

Timestamp and Bounding box information are returned for detected Instances, only if aggregation is done by TIMESTAMPS. If aggregating by SEGMENTS, information about detected instances isn’t returned.

The version of the label model used for the detection is also returned.

Note DominantColors isn't returned for Instances, although it is shown as part of the response in the sample seen below.

Use MaxResults parameter to limit the number of labels returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetlabelDetection and populate the NextToken request parameter with the token value returned from the previous call to GetLabelDetection.

If you are retrieving results while using the Amazon Simple Notification Service, note that you will receive an "ERROR" notification if the job encounters an issue.

val error_to_string : [ Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `InternalServerError of Types.internal_server_error | `InvalidPaginationTokenException of Types.invalid_pagination_token_exception | `InvalidParameterException of Types.invalid_parameter_exception | `ProvisionedThroughputExceededException of Types.provisioned_throughput_exceeded_exception | `ResourceNotFoundException of Types.resource_not_found_exception | `ThrottlingException of Types.throttling_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.get_label_detection_request -> (Types.get_label_detection_response, [> Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `InternalServerError of Types.internal_server_error | `InvalidPaginationTokenException of Types.invalid_pagination_token_exception | `InvalidParameterException of Types.invalid_parameter_exception | `ProvisionedThroughputExceededException of Types.provisioned_throughput_exceeded_exception | `ResourceNotFoundException of Types.resource_not_found_exception | `ThrottlingException of Types.throttling_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.get_label_detection_request -> (Types.get_label_detection_response Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `InternalServerError of Types.internal_server_error | `InvalidPaginationTokenException of Types.invalid_pagination_token_exception | `InvalidParameterException of Types.invalid_parameter_exception | `ProvisionedThroughputExceededException of Types.provisioned_throughput_exceeded_exception | `ResourceNotFoundException of Types.resource_not_found_exception | `ThrottlingException of Types.throttling_exception ] * Smaws_Lib.Response.metadata) Stdlib.result