Rekognition get_text_detection not returning Timestamp with milliseconds precision

0

When submitting a video to Rekognition, get_text_detection is always returning Timestamp with seconds precision instead of milliseconds. For example:

text_detection: {'Timestamp': 4000, 'TextDetection': {'DetectedText': 'ITV Lunchtime News', 'Type': 'LINE', 'Id': 0, 'Confidence': 99.68327331542969, 'Geometry': {'BoundingBox': {'Width': 0.1505126953125, 'Height': 0.033203125, 'Left': 0.35760498046875, 'Top': 0.0947265625}, 'Polygon': [{'X': 0.35760498046875, 'Y': 0.0947265625}, {'X': 0.50811767578125, 'Y': 0.0947265625}, {'X': 0.50811767578125, 'Y': 0.1279296875}, {'X': 0.35760498046875, 'Y': 0.1279296875}]}}}

Code snippets:

response = self.rekognition.start_text_detection(
            Video=self.param_video,
            NotificationChannel=self.param_channel,
            JobTag=self.job_tag,
            Filters=self.param_filters,
        )
        self.job_id = response["JobId"]
while not finished:
            response = self.rekognition.get_text_detection(
                JobId=self.job_id, MaxResults=max_results, NextToken=pagination_token
            )

            for text_detection in response["TextDetections"]:
                print(f'text_detection: {text_detection}')
            if "NextToken" in response:
                pagination_token = response["NextToken"]
            else:
                finished = True

Looks like a bug to me. But it's weird that I didn't find anyone reporting it before. So am I doing something wrong?

質問済み 2年前267ビュー
1回答
0

Hi,

Thank you for pointing this out.

Rekognition Video StartTextDetection apis do not analyze all the frames in the video and may choose to select frames to analyze based on internal algorithms. As a result, you may not see output for all frames.

We have also noticed that in some cases, the output timestamp may not represent a frame with a given PTS. We will work on making this more accurate. As a workaround, to map the output timestamp to a frame in the video, we recommend selecting the frame closest to the output timestamp from the video.

Thanks.

AWS
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ