简体   繁体   English

Amazon Rekognition 自定义标签

[英]Amazon Rekognition Custom Labels

currently trying to process a number of images simultaneously using custom labels via postman.目前正在尝试通过 postman 使用自定义标签同时处理多个图像。 I'm a business client with AWS and have been on hold for over 30 minutes to speak with an engineer but because AWS customer sucks I'm asking the community if they can help.我是 AWS 的商业客户,与工程师交谈已超过 30 分钟,但由于 AWS 客户很糟糕,我询问社区是否可以提供帮助。 Rather than analyze an image one at a time, is there away to analyze images all at once?不是一次分析一张图像,而是一次分析所有图像? Any help would be great, really need it at this time.任何帮助都会很棒,此时真的需要它。

Nick缺口

I don't think there is a direct API or SDK by AWS for asynchronous image processing with custom labels.我认为 AWS 没有直接的 API 或 SDK 用于使用自定义标签进行异步图像处理。 But the right workaround here can be introducing an event-based architecture yourself.但这里正确的解决方法是自己引入基于事件的架构。

You can upload images in batch to S3 and configure S3 events to send the event notification to an SNS topic.您可以将图片批量上传到 S3 并配置 S3 事件以将事件通知发送到 SNS 主题。

You can have your API subscribed to this S3 topic which takes in the object name and bucket name.您可以让您的 API 订阅此 S3 主题,该主题包含 object 名称和存储桶名称。 And then within the API, you have the logic to use custom labels and store results in a Database like DynamoDB.然后在 API 中,您可以使用custom labels并将结果存储在 DynamoDB 等数据库中。 This way, you can process images asynchronously.这样,您可以异步处理图像。

Just make sure you have the right inference hours configured so you don't flood your systems thus making them unavailable只需确保您配置了正确的推理时间,这样您就不会淹没您的系统,从而使它们不可用

Hope this process solves your problem希望这个过程能解决你的问题

You can achieve this by using a batch processing solution published by AWS.您可以使用 AWS 发布的批处理解决方案来实现这一点。

Please refer this blog for the solution: https://aws.amazon.com/blogs/machine-learning/batch-image-processing-with-amazon-rekognition-custom-labels/请参阅此博客以获取解决方案: https://aws.amazon.com/blogs/machine-learning/batch-image-processing-with-amazon-rekognition-custom-labels/

Also, the solution can be deployed from github where it is published as a AWS Sample: https://github.com/aws-samples/amazon-rekognition-custom-labels-batch-processing .此外,该解决方案可以从 github 部署,它作为 AWS 示例发布: https://github.com/aws-samples/amazon-rekognition-custom-labels-batch-processing If you are in a region for which the deployment button is not provided, please raise a issue.如果您所在的地区没有提供部署按钮,请提出问题。

Alternatively, you can deploy this solution using SAM.或者,您可以使用 SAM 部署此解决方案。 The solution is developed as a AWS Serverless Application Model.该解决方案被开发为 AWS 无服务器应用程序 Model。 So it can be deployed using sam with the following steps:因此可以使用 sam 进行部署,步骤如下:

  1. Install the sam cli - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html安装 sam cli - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html
  2. Download the code repository on your local machine在本地机器上下载代码库
  3. from within the folder execute the following steps.从文件夹中执行以下步骤。 The folder name is referrenced as sam-app in the below example.在下面的示例中,文件夹名称被称为 sam-app。 a.一个。 #Step 1 - Build your application i. #Step 1 - 构建您的应用程序 i。 cd sam-app ii. cd sam-app ii。 sam build山姆构建

b.湾。 #Step 2 - Deploy your application i. #Step 2 - 部署您的应用程序 i。 sam deploy --guided山姆部署——引导

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM