Slide 23
Slide 23 text
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
with open('face.jpeg', 'rb') as image:
response = client.search_faces_by_image(
CollectionId='InnovateFaceCollection',
Image={'Bytes': image.read()}
)
print(response['FaceMatches'][0])
{'Similarity': 99.86331176757812,
'Face': {'FaceId': 'b4340821-c006-40c8-aa9a-553650577ff9’,
'BoundingBox': {'Width': 0.5504249930381775, 'Height': 0.5131639838218689, 'Left':
0.21713200211524963, 'Top': 0.25286099314689636},
'ImageId': 'ebf11b5e-8233-30c3-bcba-a1bd68969459’,
'ExternalImageId': 'Yoshitaka’,
'Confidence': 99.99979400634766}}
AWS SDK for Python (boto3) で顔の検索