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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠