CmdID / aws / aws rekognition
aws rekognition compare-faces
Compares a face in the source input image with each of the 100 largest faces detected in the target input image. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To compare faces in two images
The following compare-faces example compares faces in two images stored in an Amazon S3 bucket.
aws rekognition compare-faces --source-image '{"S3Object":{"Bucket":"MyImageS3Bucket","Name":"source.jpg"}}' --target-image '{"S3Object":{"Bucket":"MyImageS3Bucket","Name":"target.jpg"}}'Identify--source-imageThe input image as base64-encoded bytes or an S3 object.--target-imageThe target image as base64-encoded bytes or an S3 object.Its output, shortened
{
"UnmatchedFaces": [],
"FaceMatches": [
{
"Face": {
"BoundingBox": {
"Width": 0.12368916720151901,
"Top": 0.16007372736930847,
"Left": 0.5901257991790771,
"Height": 0.25140416622161865
},
"Confidence": 100.0,
"Pose": {
"Yaw": -3.7351467609405518,
"Roll": -0.10309021919965744,
"Pitch": 0.8637830018997192
},
"Quality": {
"Sharpness": 95.51618957519531,
"Brightness": 65.29893493652344
},
"Landmarks": [
{
"Y": 0.26721030473709106,
"X": 0.6204193830490112,
"Type": "eyeLeft"
},
{
"Y": 0.26831310987472534,
"X": 0.6776827573776245,
… 32 more linesFor more information, see Comparing Faces in Images in the Amazon Rekognition Developer Guide.
Options
--quality-filterA filter that specifies a quality bar for how much filtering is done to identify faces.--similarity-thresholdThe minimum level of confidence in the face matches that a match must meet to be included in the FaceMatches array.--source-imageThe input image as base64-encoded bytes or an S3 object.--target-imageThe target image as base64-encoded bytes or an S3 object.