Passer au contenu

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?

  • Is this Issue Closed now ? I'm getting same issue for all API's mentioned below -

    1. start_text_detection
    2. start_label_detection
    3. start_face_detection

    It only works if video convert to 1 fps

demandé il y a 4 ans507 vues

1 réponse
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

répondu il y a 4 ans

  • Is this Issue Closed now ? I'm getting same issue for all API's mentioned below -

    1. start_text_detection
    2. start_label_detection
    3. start_face_detection It only works if I convert my video to 1 fps, In this case only it covers all frames in video

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.