AWS Rekognition

AWS Rekognition makes it easy to perform intelligent image/video analysis. You can use the API to quickly identify objects, people, text, scenes, and activities. It is based on the deep learning technology.

You can check out the service here

If you have an AWS account. You can use AWS Python SDK boto3 to call Rekognition API. Here is an example to compute image similarity between two images.

First install boto3. See install documentation

pip install boto3

Then run the following codes

import boto3
import pprint

client = boto3.client('rekognition',region_name='us-east-1')

with open('PATH_TO_FIRST_IMAGE.jpg','rb') as first_image:
  image1_bytes =

with open('PATH_TO_SECOND_IMAGE.jpg','rb') as second_image:
  image2_bytes =

response = client.compare_faces(
   SourceImage={ 'Bytes': image1_bytes },
   TargetImage={ 'Bytes': image2_bytes },

You should see the response as follows if the call succeeds.

Screen Shot 2018-05-20 at 11.40.45 PM

Join our AI for Mankind meetup group.

Screen Shot 2018-05-25 at 8.25.39 AM

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s