AWS Rekognition: Add Feature Vector instead of PNG File - amazon-web-services

According to the AWS Rekognition SDK documentation,
IndexFaces SDK PHP Documentation
IndexFaces receives a face Image in PGN or JPEG and then obtains the "feature vector" of that Image, then add the feature vector to the database for later face matching.
Now suppose I want to add the same person to different new collections. Is it possible to obtain the feature vector once, and add that feature vector directly to the collections, instead of re-processing the image over and over again ?
Thanks in advance

Related

AWS Rekognition Custom Labels Training "The manifest file contains too many invalid data objects" error

I'm trying to do a quick PoC on the AWS Rekognition custom labels feature. I'd like to try using it for object detection.
I've had a couple of attempts at setting it up using only tools in the AWS Console. I'm using images imported from the Rekognition bucket in S3, then I added bounding boxes using the tools in the Rekognition console.
All of my images are marked up with bounding boxes, no whole image labels have been used. I have 9 labels, all of which appear in at least 1 drawing.
I've ensured my images are less than 4096x4096 in size (which is mentioned on this AWS forums thread as a possible cause of this issue.
When I attempt to train my model I get the "The manifest file contains too many invalid data objects" error.
What could be wrong here? An error message complaining about the format of a file I didn't create manually, that I can't see or edit isn't exactly intuitive.

AWS Rekognition: Add extra faces of same person

I can manage to add an image to AWS Rekognition Collection using the IndexFacesRequest.
However, to improve accuracy I would like to add more images of the same user. How do I let the request know it is the same user?
Rekognition does not allow you to provide multiple face images for a single face ID. But you can upload multiple faces of the same person and give them the same ExternalImageId. That's the ID that you typically use to correlate a face match to your person database. When your app later presents a face for matching, Rekognition will return zero or more face matches.

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

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 matches.
Im using Flutter as a platform hence there is no support for AWS SDK so will need to make REST API calls.
However the AWS docs don't provide much information for REST support.
The APIs are documented. For example to detect faces in an image and add them to a collection, see IndexFaces.
I'd personally recommend getting comfortable with Rekognition via the awscli (or Python/boto3) briefly before you move to the Rest API.
On the name tagging front, you assign an 'external ID' to faces when adding them to a collection. That external ID is the correlator that you supply and that Rekognition stores. Later, when you ask Rekognition if a given face matches one already in a collection, Rekognition will return you the external ID. That can then be used as a lookup into some database that you have to identify the person's name, date of birth, or whatever.

AWS Rekognition Service: Improve facial recognition accuracy

I'm finding the right way to use AWS Rekognition service.
My problem is How to verify a person image on multi collections, I'm reading Build Your Own Face Recognition Service Using Amazon Rekognition | AWS Machine Learning Blog from Amazon but cannot find the implementation document for it. My point is Face verification title.
Update 1:
My target is: Using AWS Rekognition to get person's info by their face.
My problem is: How to make AWS Rekognition improves its accuracy when recognizing a face.
What I tried:
Upload multi captured portraits of a person with same ExternalImageID but I'm not sure it works or not.
Finding a way to create Collection for each person, then upload person's portraits to their Collection but I don't how to search a face through multiple Collections.
I'm trying use S3 for storage people's images then using Lambda function to do something that I've not got yet.
Update 2:
What is your input material: Input materials are some people's portrait photo with ExternalImageID is their name (eg: my portrait photo will have ExternalImageID is "Long").
What are you trying to do: I'm trying to get ExternalImageID when I send a portrait photo of a registered person. (eg: with my other portrait photo, AWS has to response ExternalImageID is "Long").
Do you have it working, but it is not recognizing some people? Yes, it's work but sometimes it cannot recognize exactly people.
Please tell us your use-case / scenario and what you are trying to accomplish:
Create an AWS Rekognition collection with sample name (eg facetest).
Register some people with their name is ExternalImageID.
Submit an image to AWS Rekognition API to get ExternalImageID - his name.
Okay, so basically you have it working but it doesn't always recognise the person. I'll assume it does not even list the person in the response, even with a low percentage.
I would recommend adding multiple images of the same person to the Face Collection, specifying the same ExternalImageId for each image. (Use one Face Collection with all people in it, including multiple images of the same person.)
Please note that "If you provide the same image, specify the same collection, and use the same external ID in the IndexFaces operation, Amazon Rekognition doesn't save duplicate face metadata." However, adding different images with the same ExternalImageId should be fine.

Resize Google Cloud images via request URL?

I need a CDN of images where I can resize the image from URL parameter. So for instance if I wanted a 400px wide version I would use www.cdn.com/image-400 and if I wanted a 200px version it would be www.cdn.com/image-200
From looking at this blog post it seems Google Cloud can do this:
https://medium.com/google-cloud/uploading-resizing-and-serving-images-with-google-cloud-platform-ca9631a2c556
Im having trouble understanding the article however and i wonder if its out of date. One of links to Google's documentation says you should use instead use Google Cloud Storage https://cloud.google.com/appengine/docs/standard/python/blobstore/
I came across these 2 SO questions but they seem to give opposite answers:
Get resized images from Google cloud storage
Resize image in Google Cloud Storage
Can Google Cloud resize images based on the url? If so, then how can you do this? I have a bucket set up in Google Cloud Storage, can you use images from a bucket like this?
First of all yes, it is possible, but as the first SO answer you shared it is not directly implemented and as you noticed the process it is not as straightforward as adding =sxx to an URL of a bucket.
Therefore writing https://storage.googleapis.com/bucketname/file.jpg=sxx does NOT work.
In order to create a URL capable to support this features you have to make use of Images API for Java, in particular the getServingUrl() method (there is also the GO or Python version of it) that will generate a new URL with the very same shape of the URL contained in the article you shared.
Once you retrieved the URL making use of the API you will be able to get the resized images, quoting directly from the official documentation you will be able to add:
=sxx where xx is an integer from 0–2560 representing the length, in pixels, of the image's longest side. For example, adding =s32 resizes the image so its longest dimension is 32 pixels.
=sxx-c where xx is an integer fro
m 0–2560 representing the cropped image size in pixels, and -c tells the system to crop the image.