简体   繁体   中英

Amazon Rekognition Custom Labels

currently trying to process a number of images simultaneously using custom labels via 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. 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. 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.

You can have your API subscribed to this S3 topic which takes in the object name and bucket name. And then within the API, you have the logic to use custom labels and store results in a Database like 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.

Please refer this blog for the solution: 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 . 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. The solution is developed as a AWS Serverless Application Model. So it can be deployed using sam with the following steps:

  1. Install the 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. a. #Step 1 - Build your application i. cd sam-app ii. sam build

b. #Step 2 - Deploy your application i. sam deploy --guided

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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