File size: 2,833 Bytes
edb3846
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
**To compare faces in two images**

The following ``compare-faces`` command 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"}}'

Output::

    {
        "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, 
                            "Type": "eyeRight"
                        }, 
                        {
                            "Y": 0.3514654338359833, 
                            "X": 0.6241428852081299, 
                            "Type": "mouthLeft"
                        }, 
                        {
                            "Y": 0.35258132219314575, 
                            "X": 0.6713621020317078, 
                            "Type": "mouthRight"
                        }, 
                        {
                            "Y": 0.3140771687030792, 
                            "X": 0.6428444981575012, 
                            "Type": "nose"
                        }
                    ]
                }, 
                "Similarity": 100.0
            }
        ], 
        "SourceImageFace": {
            "BoundingBox": {
                "Width": 0.12368916720151901, 
                "Top": 0.16007372736930847, 
                "Left": 0.5901257991790771, 
                "Height": 0.25140416622161865
            }, 
            "Confidence": 100.0
        }
    }

For more information, see `Comparing Faces in Images <https://docs.aws.amazon.com/rekognition/latest/dg/faces-comparefaces.html>`__ in the *Amazon Rekognition Developer Guide*.