Detect, Analyze, and Compare Faces with HAQM Rekognition
Introduction
Implementation
Enter the HAQM Rekognition console
1. Open the console
Open the AWS Management Console, so you can keep this step-by-step guide open. When the screen loads, enter your user name and password to get started. Then type Rekognition in the search bar and select Rekognition to open the service console.

Analyze faces
In this step, you will use the facial analysis feature in HAQM Rekognition to see the detailed JSON response you can receive from analyzing one image.
1. Select Facial analysis
To start, select Facial analysis in the panel navigation on the left. This feature allows you to analyze faces in an image and receive a JSON response.

2. Save the first sample image
Open and save the first sample image for this tutorial here.

3. Upload sample image
Click the orange Upload button and select the sample image you just saved.

4. Review the quick results
Notice that under the Results dropdown, you can click through and see quick results for each face that was detected.

5. Open the Response dropdown
Click on the Response dropdown to see the JSON results.

6. View the JSON results
Notice that under the emotions results, there are numerous detected emotions. Happy has a 99.98% confidence rating.
As a developer, detecting emotions in images and videos makes it possible to quickly catalog a digital library by emotion. Another use case for detecting emotions is to amplify ad targeting so users receive a personalized experience tailored to the current emotion.

Compare faces
In this step, you will use the face comparison feature to see the detailed JSON response from comparing two different images that don't match.
1. Select Face comparison
Select Face comparison in the panel navigation on the left.

2. Save second sample image
Open and save the second sample image for this tutorial here.

3. Upload the reference face image
Click on the orange Upload button for the reference face and select the image you just saved.

4. Select first reference image
Click on the orange Upload button for the comparison face and select our first sample image we used in step 2.

5. Review the Results
Notice that in Results dropdown you can see that our reference wasn’t a match for any of the detected faces in our comparison faces image.

6. Review the JSON results
Click on the Response dropdown to see the JSON results. Notice that the “Similarity” score for each of the detected faces never exceeds 1. The similarity score ranges from 1-100 and the threshold can be adjusted when using the API.
As a developer, comparing faces at scale can be used in applications to track persons of interest, create a face-based employee verification system, or provide a VIP experience to guests staying at a hospitality venue.

Compare faces (again)
In this step, you will use the face comparison feature to see the detailed JSON response from comparing two different images that have a match.
1. Save the sample image
Open and save the third and final sample image for this tutorial here.

2. Upload the image
Click on the orange Upload button for the reference face and select the image you just saved.

3. Review the Results
Notice that the reference face that was compared to our other photo detected a 99% similarity score and detected that all other faces were not a match.

4. Review the JSON results
Click on the Response dropdown to see the details of each comparison.

Conclusion
You have learned how to use the console to analyze and compare faces. You can also perform this feature using the API so you can operate at scale. Use HAQM Rekognition when you need to perform facial analysis at scale without worrying about infrastructure or training a model for identifying persons of interest, cataloging a digital library, creating a face-based employee verification system, or performing sentiment analysis.
Next steps
Did you find what you were looking for today?
Let us know so we can improve the quality of the content on our pages