Search code examples
pythonamazon-web-servicesimage-uploadingface-recognitionauto

How can I add face to collection auto using python ( AWS Rekognition )?


I try to build Face-Rekognition using AWS. So, i want to upload file to S3 Bucket only and it uploads from S3 to Collection auto using Python. Pls help me, thank you!


Solution

  • You can create an Amazon S3 Event that triggers an AWS Lambda function when a new object is uploaded to an Amazon S3 bucket.

    The AWS Lambda function can make an index_faces() call to AWS Rekognition to detect faces in the input image and add them to the specified collection.

    You should first create the Face Collection where the faces will be added. It is also useful to provide an ExternalImageID with each image so that the face can be associated with an identifier within your application. This ID will then be returned with future face-search results.