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 a trigger
- Under the Trigger section, choose the Scheduler by Quickwork app from the drop-down menu in the App field.
- Select the trigger event, New scheduled event, from the drop-down menu in the Trigger Event field.
- Set the Interval for One day as we need to fetch the breaking news on a daily basis.
- 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, choose the Amazon Rekognition service from the drop-down menu in the App field.
- Select the Compare face action from the drop-down menu in the Action field.
- Click the Link an account button to establish a new connection with 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://images.unsplash.com/photo-1533227268428-f9ed0900fb3b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80.
- 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 in a journey and click the Start Journey button. You'll be taken to the History tab automatically. Click on the journey ID that just got executed. In the Steps section, click the Amazon Rekognition action bar to expand and switch to the Output tab 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.