amazon-rekognition

Send multiple frame to AWS rekognition

左心房为你撑大大i 提交于 2019-12-12 20:03:47
问题 I'm trying to send pictures to the aws rekognition from my webcam to detect the activity of the person sitting in front of it using python. To do so I take a picture every 5 seconds and I send it to the aws. But when I do so it seems that he's always sending back information about the first frame that I sent cap = cv2.VideoCapture(0) while 1: ret, img = cap.read() client=boto3.client('rekognition') print("hello") ret, fileImg=cv2.imencode('.png',img) response = client.detect_labels(Image={

Can amazon lex chatbot accept image as input ?

巧了我就是萌 提交于 2019-12-12 09:28:13
问题 I want to build a deep learning chatbot application which accepts image as input. I have built a lambda function integrating AWS rekognition that accepts image.Now, i want to extend this lambda function, and connect it to Amazon Lex bot , where user can upload the image for analysis. 回答1: AWS Lex Chatbot can't accept image but Its possible by Integrate your Amazon Lex Bot with Amazon API Gateway . Your application API call to the HTTPS endpoint hosted by AWS API Gateway. API Gateway deal With

Need to compare a given face input image across an already stored labelled collection using AWS

ⅰ亾dé卋堺 提交于 2019-12-11 16:45:29
问题 I have a collection of profile images from customers I need to be able to pass a selfie of the person and scan it across the collection of images and pull up the customer information. Need to do the following using AWS Rekognition - Create a collection - Done Add Images to the collection - Whats the REST API syntax for this While adding the images to the collection also tag it with the customer name. Take a selfie portrait and search across the collection and return the tag information which

Parsing rekognition get_face_search results

坚强是说给别人听的谎言 提交于 2019-12-11 16:42:34
问题 I am trying to parse out Face Matches from the results of the get_face_search() AWS Rekognition API. It outputs an array of Persons, within that array is another array of FaceMatches for a given person and timestamp. I want to take information from the FaceMatches array and be able to loop through the array of Face Matches. I have done something similar before for single arrays and looped successfully, but I am missing something trivial here perhaps. Here is output from API: Response: {

AWS Image getBytes returning null

我的未来我决定 提交于 2019-12-11 14:55:02
问题 I am trying to convert and AWS Rekognition Image to java BufferedImage . In order to do this I need the byte array from the AWS Image. However, when I call the getBytes method it returns null instead of returning ByteBuffer . My code is as below: //Load an Rekognition Image object from S3 Image inputImage = new Image() .withS3Object(new com.amazonaws.services.rekognition.model.S3Object().withName(key).withBucket(bucket)); DetectFacesRequest request = new DetectFacesRequest().withImage

Error when trying to read AWS SNS message

心不动则不痛 提交于 2019-12-08 06:31:42
问题 I need to return the message sent by Rekognition to SNS but I get this error in CloudWatch: 'Records': KeyError Traceback (most recent call last): File "/var/task/AnalyzeVideo/lambda_function.py", line 34, in lambda_handler message = event["Records"][0]["Sns"]["Message"] KeyError: 'Records' Code: def detect_labels(bucket, key): response = rekognition.start_label_detection( Video = { "S3Object": { "Bucket": BUCKET, "Name": KEY } }, NotificationChannel = { "SNSTopicArn": TOPIC_ARN, "RoleArn":

Error when trying to read AWS SNS message

一曲冷凌霜 提交于 2019-12-07 02:10:27
I need to return the message sent by Rekognition to SNS but I get this error in CloudWatch: 'Records': KeyError Traceback (most recent call last): File "/var/task/AnalyzeVideo/lambda_function.py", line 34, in lambda_handler message = event["Records"][0]["Sns"]["Message"] KeyError: 'Records' Code: def detect_labels(bucket, key): response = rekognition.start_label_detection( Video = { "S3Object": { "Bucket": BUCKET, "Name": KEY } }, NotificationChannel = { "SNSTopicArn": TOPIC_ARN, "RoleArn": ROLE_ARN } ) return response def lambda_handler(event, context): reko_response = detect_labels(BUCKET,

AWS Rekognition JavaScript SDK using Bytes

非 Y 不嫁゛ 提交于 2019-12-06 02:58:45
问题 The AWS Rekognition Javascript API states that for rekognition.compareFaces(params,...) method, the SourceImage and TargetImage can take Bytes or S3Object . I want to use the Bytes which can be "Bytes — (Buffer, Typed Array, Blob, String )" Blob of image bytes up to 5 MBs. When I pass the Base64 encoded string of the images, the JS SDK is re-encoding again (i.e double encoded). Hence server responding with error saying {"__type":"InvalidImageFormatException","Message":"Invalid image encoding"

AWS Rekognition JavaScript SDK using Bytes

巧了我就是萌 提交于 2019-12-04 08:10:59
The AWS Rekognition Javascript API states that for rekognition.compareFaces(params,...) method, the SourceImage and TargetImage can take Bytes or S3Object . I want to use the Bytes which can be "Bytes — (Buffer, Typed Array, Blob, String )" Blob of image bytes up to 5 MBs. When I pass the Base64 encoded string of the images, the JS SDK is re-encoding again (i.e double encoded). Hence server responding with error saying {"__type":"InvalidImageFormatException","Message":"Invalid image encoding"} Did anyone manage to use the compareFaces JS SDK API using base64 encoded images (not S3Object )? or

Add whole S3 images bucket to Amazon Rekognition collection

▼魔方 西西 提交于 2019-12-02 15:05:21
问题 In AWS CLI, I can add to a collection only a single image at a time. Is there any way to add the whole S3 bucket to a collection? 回答1: The IndexFaces() API call accepts only one image at a time , but can index up to 100 faces from that image. If you wish to add faces from multiple images (eg a whole bucket or folder), you would need to call IndexFaces() multiple times (once per image). This would involve a call to Amazon S3 to list the files, then a loop to call IndexFaces() . It would be