【问题标题】:Extracting text from Video using AWS Rekognition使用 AWS Rekognition 从视频中提取文本
【发布时间】:2019-08-04 04:54:43
【问题描述】:

我项目的一个目标是使用 AWS Rekognition 从流式视频中检测文本

我一直在尝试搜索 AWS 文档。 AWS 似乎允许开发人员仅从存储的图像中提取文本

请参阅此 AWS 文档 - detect text in a Image AWS 文档提供了以下代码来检测 Image 中的文本。这段代码基本上有detect_text API,它将来自 S3 的存储图像作为输入,并从图像中输出检测到的文本。

我的问题是 -- 是否有任何方法可以使用 AWs Rekognition 从流式视频中提取文本?或者我可以说目前无法使用 AWS Rekognition 从流式视频中提取文本吗?

让我知道解决此目标的任何方法。

import boto3

if __name__ == "__main__":

    bucket='bucket'
    photo='text.png'

    client=boto3.client('rekognition')


    response=client.detect_text(Image={'S3Object':{'Bucket':bucket,'Name':photo}})

    textDetections=response['TextDetections']
    print ('Detected text')
    for text in textDetections:
            print ('Detected text:' + text['DetectedText'])
            print ('Confidence: ' + "{:.2f}".format(text['Confidence']) + "%")
            print ('Id: {}'.format(text['Id']))
            if 'ParentId' in text:
                print ('Parent Id: {}'.format(text['ParentId']))
            print ('Type:' + text['Type'])
            print

【问题讨论】:

    标签: amazon-web-services amazon-s3 lambda amazon-kinesis amazon-rekognition


    【解决方案1】:

    文本检测仅适用于 JPG 和 PNG 图像。一种解决方案是从视频中提取帧,然后将它们传递给 Rekognition 进行处理。

    以下是实现此目的的端到端示例,它结合了 Kinesis、Lambda 和 Rekognition:https://github.com/aws-samples/amazon-rekognition-video-analyzer

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-15
      • 2012-07-10
      相关资源
      最近更新 更多