This article demonstrates the easy facial comparison of two images using Amazon Rekognition.
What you'll need:
Skill level: Intermediate
Time required: 5 minutes
- Scheduler by Quickwork as a trigger--for triggering the journey
- Amazon Rekognition: Action
- Images containing faces in Amazon S3 bucket
Configuring the trigger
- Under the Trigger section, choose the Scheduler by Quickwork app from the drop-down menu in the Apps field present right below the New Trigger button.
- Select the trigger event, New scheduled event, from the drop-down menu in the Triggers field.
- Set the Interval as per your choice based on how often you want the journey to be executed.
- Set the date and time of your choice in the Start At field and keep the Custom Payload field empty:
Configuring Amazon Rekognition action
- Under the Steps section, click on the Simple Action button and choose the Amazon Rekognition service from the drop-down menu in the Apps field.
- Select the Compare face action from the drop-down menu in the Actions field.
- Click the Link an account button to establish a new connection with the Amazon Rekognition service. You can also connect an existing account if you have one.
- The input fields will open. In the Source image URL field, specify the URL of an image containing a face that you want to compare with. E.g., https://thumbs.dreamstime.com/b/young-happy-man-thumbs-up-sign-casuals-isolated-white-background-38152994.jpg.
- Similarly, in the Target image URL field, specify the URL of an image containing a face that you want to get compared. E.g., https://airbnboverlast.nl/wp-content/uploads/2016/06/happy-man.jpg:
Note: Both, the faces of publicly available images and images stored in the S3 bucket can be compared. The public image URL must end with .png or .jpeg extension. If the public image URL is too lengthy, better upload it in your S3 bucket and then specify its S3 URL.
Executing the journey
Save the changes done and click the Start Journey button. You'll be taken to the History tab automatically. Click on the record that just got created. In the Steps section, click the Amazon Rekognition action bar to expand and check the Output block to see the output:
The similarity threshold is within the range of 0 to 100. As per the response received, the source image containing a face is completely different than the face present in the target image.