# Quickstart - Identify Face

> The purpose of this guide is to help you create a working sample of the [Identify Face](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-identify-face#identify-face) activity. This working sample enables you to quickly verify the connection to your AWS account and get familiar with the activity's input/output datatypes.

## Overview

The purpose of this guide is to help you create a working sample of the [Identify Face](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-identify-face#identify-face) activity. This working sample enables you to quickly verify the connection to your AWS account and get familiar with the activity's input/output datatypes.

By completing the steps in this guide, you'll have an automation sequence that does the following:

1. Establishes a connection to your AWS account and Amazon Rekognition services via the [Amazon Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-amazon-scope#amazon-scope) activity.
2. Creates a new collection to store information about the faces detected in an image via the [Create Collection](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-create-collection#create-collection) activity.
3. Detects faces in an image and adds them to your specified collection via the [Add Face](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-add-faces#add-face) activity.
4. Detects the largest face in your input image and searches the specified collection (**Collection**) for matching faces; returning an array of identified faces via the [Identify Face](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-identify-face#identify-face) activity. 5.Tests the Amazon Rekognition activities' input/output properties via the [For Each](https://docs.uipath.com/activities/docs/for-each) and [Write Line](https://docs.uipath.com/activities/docs/write-line) activities.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-22995-562c7c23-db3f3c47.webp)

## Prerequisites

Before you begin, complete the applicable prerequisites below.

If you've completed the prerequisites for a different Amazon Rekognition [Quickstart](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-quickstarts) guide, you're all set and can go straight to the **Steps** section below.

1. Complete the Amazon Rekognition [Setup](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-setup#setup) steps.
2. Create a new automation project.
   1. Open UiPath Studio.
   2. Under **New Project**, click **Process** (this opens a **New Blank Process** window).
   3. Enter a project **Name**, **Location**, and **Description**.
   4. Click **Create**.

      ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-22859-60ad26ab-2f6dd8e4.webp)
3. Install the **UiPath.Amazon.Scope.Activities** and **UiPath.Amazon.Rekognition.Activities** packages.
   1. In the **Design** ribbon, click **Manage Packages** (this opens the **Manage Packages** window).
   2. Under **All Packages**, click **Go!**
   3. In the **Search** bar, enter *Amazon*.
   4. Click, install and accept the license for both the **UiPath.Amazon.Scope.Activities** and **UiPath.Amazon.Rekognition.Activities**.
      * For more information about Uipath Studio packages, see [Managing Packages](https://docs.uipath.com/studio/docs/managing-activities-packages) in the Studio Guide.

        ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-24511-ed4ba018-b4d3e230.webp)

## Steps

Build Your Project

To use the **Identify Face** activity:

1. Add the [Amazon Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-amazon-scope#amazon-scope) activity to your project.
2. If you don't have an existing collection that contains the faces that you want to identify, add the [Create Collection](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-create-collection#create-collection) activity after the **Amazon Scope** activity, otherwise, proceed to step 3.
3. If you don't have the faces that you want to identify stored in your specified collection, add the [Add Face](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-add-faces#add-face) activity after the **Amazon Scope** or **Create Collection** (whichever is applicable) otherwise, proceed to step 4.
4. Add the [Identify Face](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-identify-face#identify-face) activity after the **Add Face** activity (if applicable).
5. Enter the **CollectionName** that you want to use to store your faces.
   * Recommendation: use the same `String` variable for both the **Create Collection** and **Add Faces** activities to ensure consistency.
6. Enter the **ImagePath** or **ImageURL** of the image that contains the faces you want to add to your collection.
   * Recommendation: create a `String` variable for your image location so that you can reuse it in other activities (e.g., **Compare Faces**).
     + Because the goal of this project is to identify the same face in different pictures, this variable should not be the same as the **Add Face** activity `String` variable (if applicable).
     + In the example image below, you'll see there are two variables. The *imageOne* variable is used in the **Add Face** activity and the *imageTwo* variable is used in the **Identify Face** activity.
7. Create and enter a `Face[]` variable for your **Faces** value.
   * When creating your variable, select the *UiPath.Amazon.Rekognition.Models.Face[]* variable type.
   * This variable should be different from the **Add Face** activity `Face[]` variable (if applicable).
     + In the example image below, you'll see there are two variables. The *faceOne* variable is used in the **Add Face** activity and the *faceTwo* variable is used in the **Identify Face** activity.

       ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-24984-01dae7f0-79881941.webp)

Test Your Project

1. To test the **Identify Face** activity, add a [For Each](https://docs.uipath.com/activities/docs/for-each) with a [Write Line](https://docs.uipath.com/activities/docs/write-line) activity, after the **Add Face** activity (if applicable) and the **Identify Face** activity.
2. In the **For Each** activity after the **Add Face** activity:
   1. In the **TypeArgument** property, select *UiPath.Amazon.Rekognition.Models.Face*.
   2. In the **Values** property, enter the `Face[]` variable you created for the **Add Face** activity (e.g., *facesOne*).
   3. In the **Text** property, enter *item.ImageId*.
      * This returns the **ImageID** value that you assigned via the **Add Face** activity.
3. In the **For Each** activity after the **Identify Face** activity:
   1. In the **TypeArgument** property, select *UiPath.Amazon.Rekognition.Models.Face*.
   2. In the **Values** property, enter the `Face[]` variable you created for the **Identify Face** activity in step 3 above (e.g., *facesTwo*).
   3. In the **Text** property enter *item.ImageID+ " : " +item.FaceID*.
      * This returns the **ImageID** value that you assigned via the **Add Face** activity, as well as, the FaceID that Amazon Rekognition assigned.
      * If you did not previously use the **Add Face** activity and added a face via the [AWS CLI or AWS SDK API](https://docs.aws.amazon.com/rekognition/latest/dg/get-started-exercise.html) or [AWS Console](https://docs.aws.amazon.com/rekognition/latest/dg/getting-started-console.html), the **ImageID** value is the same as the [ExternalImageID](https://docs.aws.amazon.com/rekognition/latest/dg/API_Face.html#rekognition-Type-Face-ExternalImageId) datatype in the Amazon Rekognition activities.
4. Click **Run** and verify the **Output** window includes two output messages:
   1. The **ImageID** assigned to each face from the **Add Face** activity.
      * In the example image below, this value is returned three times because there are three faces in the provided input image)
   2. The **ImageID** and the **FaceID** of the face identified in the picture.
      * In the example image below, only one **ImageID** and **FaceID** value is returned (not three); this is because the **Identify Face** activity can only identify the largest face in the image.

        ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-23035-06004c85-85d4cf6f.webp)

You're done!

When you're ready, try the other [Quickstart](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-quickstarts) guides to get more familiar with the different Amazon Rekognition activities.

To learn more about the other Amazon Rekognition activities, see the [Activities](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-activities#activities) page for a complete activity list and links to the activity detail pages.
