version:
0.0.2
Amazon Rekognition Integration
To install, run:
syncano-cli add aws-photo-rekognition1
Name | Required | Description | Info |
---|---|---|---|
AWS_ACCESS_KEY_ID | true | AWS Access Key | To find the key, log into your AWS account to get it |
AWS_SECRET_ACCESS_KEY | true | AWS Access Secret Key | To find the key, log into your AWS account to get it |
region | true | Region | On your AWS Console, search for Rekognition to check supported regions and select one (e.g, us-east-1 ) |
Compares a face in the source image with each face detected in the target input image
name | type | description | example |
---|---|---|---|
sourceBucketName | string | Name of the source S3 bucket (Optional) | callen-images |
sourceImage | string | a path to the image | an image in S3 bucket image |
targetBucketName | string | Name of the target S3 bucket (Optional) | callen-images |
targetImage | string | a path to the image | an image in S3 bucket image |
similarityThreshold | string | The minimum level of confidence in the face matches that a match must meet. (Optional) | 20 |
mimetype: application/json
{
"message": "Comparison result."
"data": {}
}
{
"statusCode": 400,
"code": "InvalidParameterType",
"message": "Expected params.SimilarityThreshold to be a number"
}
Create AWS Rekognition collection
name | type | description | example |
---|---|---|---|
collectionId | string | ID for the collection that you are creating. | callen-images |
mimetype: application/json
{
"statusCode": 200,
"message": "Collection Created."
}
{
"statusCode": 400,
"code": "ResourceAlreadyExistsException",
"message": "The collection id: callen-images already exists"
}
Delete AWS Rekognition collection using the collectionId.
name | type | description | example |
---|---|---|---|
collectionId | string | ID of the collection to delete. | callen-images |
mimetype: application/json
{
"statusCode": 200,
"message": "Collection Deleted."
}
{
"statusCode": 400,
"code": "ResourceNotFoundException",
"message": "The collection id: calle does not exist"
}
Detect Labels in uploaded images.
name | type | description | example |
---|---|---|---|
collectionId | string | Collection from which to remove the specific faces. | callen-images |
faceId | string | Face IDs to delete. | 629e696f-0456-5bd5-aa49-50847570a653 |
mimetype: application/json
{
"message": "Faces Detected",
"DeletedFaces":[ "11111111-2222-3333-4444-555555555555"]
}
{
"statusCode": 400,
"code": "ValidationException",
"message": "1 validation error detected: Value '[]' at 'faceIds' failed to satisfy constraint"
}
Detect faces in uploaded images.
name | type | description | example |
---|---|---|---|
bucketName | string | Name of the S3 bucket (Optional). | callen-images |
image | string | a path to the image | an image in S3 bucket image |
attr | string | The facial attributes you want to be returned (Optional) | DEFAULT |
mimetype: application/json
{
"message": "Faces Detected"
"data": {
"FaceDetails": []
}
}
{
"statusCode": 400,
"code": "InvalidParameterException",
"message": "Request has Invalid Parameters"
}
Detect Labels in uploaded images.
name | type | description | example |
---|---|---|---|
bucketName | string | Name of the S3 bucket (Optional). | callen-images |
image | string | a path to the image | an image in S3 bucket image |
maxsLabels | string | Maximum number of labels you want the service to return in the response (Optional) | 4 |
minConfidence | string | Specify the minimum confidence level for the labels to return (Optional) | 23.6 |
mimetype: application/json
{
"message": "Labels Detected",
"data": {
"Labels": []
}
}
{
"statusCode": 400,
"code": "InvalidParameterException",
"message": "Requested image should either contain bytes or s3 object."
}
Detects explicit or suggestive adult content in a specified JPEG or PNG format image.
name | type | description | example |
---|---|---|---|
bucketName | string | Name of the S3 bucket (Optional). | callen-images |
image | string | a path to the image | an image in S3 bucket image |
minConfidence | string | Specify the minimum confidence level for the labels to return (Optional) | 23.6 |
mimetype: application/json
{
"message": "Moderation Labels Detected."
"data": {
"ModerationLabels": []
}
}
{
"statusCode": 400,
"code": "InvalidParameterException",
"message": "Requested image should either contain bytes or s3 object."
}
Gets the name and additional information about a celebrity based on his or her Rekognition ID.
name | type | description | example |
---|---|---|---|
celebrityId | string | ID for the celebrity. You can get the celebrity ID from a call to the RecognizeCelebrities operation | 3Ir0du6 |
mimetype: application/json
{
"message": "Celebrity Information"
"data": {}
}
{
"code": "MissingRequiredParameter",
"message": "Missing required key 'Id' in params"
}
Detects faces in the input image and adds them to the specified collection.
name | type | description | example |
---|---|---|---|
collectionId | string | The ID of an existing collection to which you want to add the faces that are detected in the input images. | callen-images |
bucketName | string | Name of the S3 bucket (Optional). | callen-images |
image | string | a path to the image | name of an image in S3 bucket image |
detectionAttributes | string | The facial attributes you want to be returned (Optional) | DEFAULT |
externalImageId | string | ID you want to assign to all the faces detected in the image. | indexed images |
mimetype: application/json
{
"message": "Faces detected for indexing."
"data": {
"FaceRecords": []
}
}
{
"statusCode": 400,
"code": "InvalidParameterException",
"message": "Requested image should either contain bytes or s3 object."
}
Returns list of collection IDs in your account.
name | type | description | example |
---|---|---|---|
maxResults | string | Maximum number of collection IDs to return. (Optional) | 5 |
nextTokens | string | Pagination token from the previous response. (Optional) | token |
mimetype: application/json
{
"message": "Faces Detected"
"data": {
"CollectionIds": []
}
}
{
"statusCode": 400,
"code": "InvalidPaginationTokenException",
"message": null
}
Returns metadata for faces in the specified collection.
name | type | description | example |
---|---|---|---|
collectionId | string | ID of the collection from which to list the faces. | callen-images |
maxResults | string | Maximum number of collection IDs to return.(Optional) | 5 |
nextTokens | string | Pagination token from the previous response. (Optional) | token |
mimetype: application/json
{
"message": "Faces Detected",
"data": {
"Faces": []
}
}
{
"statusCode": 400,
"code": "MissingRequiredParameter",
"message": "Missing required key 'CollectionId' in params"
}
Returns an array of celebrities recognized in the input image.
name | type | description | example |
---|---|---|---|
bucketName | string | Name of the S3 bucket (Optional). | callen-images |
image | string | a path to the image | name of an image in S3 bucket image |
mimetype: application/json
{
"message": "Recognized Celebrity Information"
"data": {
"CelebrityFaces": []
}
}
{
"statusCode": 400,
"code": "InvalidParameterException",
"message": "Requested image should either contain bytes or s3 object."
}
Searches for matching faces in the collection the face belongs to.
name | type | description | example |
---|---|---|---|
collectionId | string | ID of the collection the face belongs to. | callen-images |
faceId | string | ID of a face to find matches for in the collection. | 629e696f-0456-5bd5-aa49-50847570a653 |
faceMatchThreshold | string | Specify the minimum confidence in the face match to return. (Optional) | 1.50 |
MaxFaces | string | Maximum number of faces to return. (Optional) | 10 |
mimetype: application/json
{
"message": "Faces Found."
"data": {}
}
{
"statusCode": 400,
"code": "MissingRequiredParameter",
"message": "Missing required key 'FaceId' in params"
}
Detects the largest face in the image, and then searches the specified collection for matching faces.
name | type | description | example |
---|---|---|---|
bucketName | string | Name of the S3 bucket (Optional). | callen-images |
image | string | a path to the image | name of an image in S3 bucket image |
collectionId | string | ID of the collection to search. | callen-images |
faceMatchThreshold | string | Specify the minimum confidence in the face match to return. (Optional) | 1.50 |
MaxFaces | string | Maximum number of faces to return. (Optional) | 10 |
mimetype: application/json
{
"message": "Faces Detected"
"data": {}
}
{
"statusCode": 400,
"code": "InvalidParameterException",
"message": "Requested image should either contain bytes or s3 object."
}
- Fork this repository
- Clone from your fork
- Make your contributions (Make sure your work is well tested)
- Create Pull request from the fork to this repo
- Create a
.envrc
on parent folder - Copy contents of
.envrc.default
file to newly created.envrc
file and assign appropriate values to the listed variables.
- Test are written in the
test
directory - Use the command
npm test
to run test