

# Step 4: Getting started using the Amazon Rekognition console
<a name="getting-started-console"></a>

The Amazon Rekognition console allows you to manage resources related to Rekognition Custom Labels and the Custom Moderation feature. The console only provides demos of other Rekognition features. 

This section shows you how to use a subset of Amazon Rekognition's capabilities such as object and scene detection, facial analysis, and face comparison in a set of images. For more information, see [How Amazon Rekognition works](how-it-works.md). You can also use the Amazon Rekognition API or AWS CLI to detect objects and scenes, detect faces, and compare and search faces. For more information, see [Step 3: Getting started using the AWS CLI and AWS SDK API](get-started-exercise.md).

This section also shows you how to see aggregated Amazon CloudWatch metrics for Rekognition by using the Rekognition console.

**Topics**
+ [Set up console permissions](#rekognition-console-permissions)
+ [Exercise 1: Detect objects and scenes (Console)](detect-labels-console.md)
+ [Exercise 2: Analyze faces in an image (console)](detect-faces-console.md)
+ [Exercise 3: Compare faces in images (console)](compare-faces-console.md)
+ [Exercise 4: See aggregated metrics (console)](aggregated-metrics.md)

![\[Amazon Rekognition deep learning-based image analysis product page with "Try Demo" and "Download SDKs" buttons.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/amazon-rekognition-start-page.png)


## Set up console permissions
<a name="rekognition-console-permissions"></a>

 To use the Rekognition console you need to have the appropriate permissions for the role or account accessing the console. For some operations, Rekognition will automatically create an Amazon S3 bucket to store files handled during operation. If you want to store your training files in a bucket other than this console bucket, you will need additional permissions. 

### Allowing console access
<a name="rekognition-console-permissions-access"></a>

 To use the Rekognition console, you can use an IAM policy like the following one, which covers Amazon S3 and the Rekognition console. For information about assigning permissions, see Assigning permissions. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "RekognitionFullAccess",
            "Effect": "Allow",
            "Action": [
                "rekognition:*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RekognitionConsoleS3BucketSearchAccess",
            "Effect": "Allow",
            "Action": [
                "s3:ListAllMyBuckets",
                "s3:ListBucket",
                "s3:GetBucketAcl",
                "s3:GetBucketLocation"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RekognitionConsoleS3BucketFirstUseSetupAccess",
            "Effect": "Allow",
            "Action": [
                "s3:CreateBucket",
                "s3:PutBucketVersioning",
                "s3:PutLifecycleConfiguration",
                "s3:PutEncryptionConfiguration",
                "s3:PutBucketPublicAccessBlock",
                "s3:PutBucketCors",
                "s3:GetBucketCors"
            ],
            "Resource": "arn:aws:s3:::rekognition-custom-projects-*"
        },
        {
            "Sid": "RekognitionConsoleS3BucketAccess",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:GetBucketLocation",
                "s3:GetBucketVersioning"
            ],
            "Resource": "arn:aws:s3:::rekognition-custom-projects-*"
        },
        {
            "Sid": "RekognitionConsoleS3ObjectAccess",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:DeleteObject",
                "s3:GetObjectAcl",
                "s3:GetObjectTagging",
                "s3:GetObjectVersion",
                "s3:PutObject"
            ],
            "Resource": "arn:aws:s3:::rekognition-custom-projects-*/*"
        },
        {
            "Sid": "RekognitionConsoleManifestAccess",
            "Effect": "Allow",
            "Action": [
                "groundtruthlabeling:*"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RekognitionConsoleTagSelectorAccess",
            "Effect": "Allow",
            "Action": [
                "tag:GetTagKeys",
                "tag:GetTagValues"
            ],
            "Resource": "*"
        },
        {
            "Sid": "RekognitionConsoleKmsKeySelectorAccess",
            "Effect": "Allow",
            "Action": [
                "kms:ListAliases"
            ],
            "Resource": "*"
        }
    ]
}
```

------

### Accesssing external Amazon S3 buckets
<a name="rekognition-console-permissions-s3"></a>

 When you first open the Rekognition console in a new AWS Region, Rekognition creates a bucket (console bucket) that's used to store project files. Alternatively, you can use your own Amazon S3 bucket (external bucket) to upload the images or manifest file to the console. To use an external bucket, add the following policy block to the preceding policy. 

```
{
            "Sid": "s3ExternalBucketPolicies",
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketAcl",
                "s3:GetBucketLocation",
                "s3:GetObject",
                "s3:GetObjectAcl",
                "s3:GetObjectVersion",
                "s3:GetObjectTagging",
                "s3:ListBucket",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::amzn-s3-demo-bucket*"
            ]
}
```

### Assigning permissions
<a name="rekognition-console-permissions-assigning"></a>

To provide access, add permissions to your users, groups, or roles:
+ Users and groups in AWS IAM Identity Center (successor to AWS Single Sign-On):

  Create a permission set. Follow the instructions in [Create a permission set](https://docs.aws.amazon.com/singlesignon/latest/userguide/howtocreatepermissionset.html) in the *AWS IAM Identity Center (successor to AWS Single Sign-On) User Guide*.
+ Users managed in IAM through an identity provider:

  Create a role for identity federation. Follow the instructions in [Creating a role for a third-party identity provider (federation)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp.html) in the *IAM User Guide*.
+ IAM users:
  + Create a role that your user can assume. Follow the instructions in [Creating a role for an IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html) in the *IAM User Guide*.
  + (Not recommended) Attach a policy directly to a user or add a user to a user group. Follow the instructions in [Adding permissions to a user (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console) in the *IAM User Guide*.

# Exercise 1: Detect objects and scenes (Console)
<a name="detect-labels-console"></a>

This section shows how, at a very high level, Amazon Rekognition's objects and scenes detection capability works. When you specify an image as input, the service detects the objects and scenes in the image and returns them along with a percent confidence score for each object and scene.

For example, Amazon Rekognition detects the following objects and scenes in the sample image: skateboard, sport, person, auto, car and vehicle.

![\[Person doing a stunt on a skateboard in the middle of a city street between parked cars.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/detect-scenes.png)


Amazon Rekognition also returns a confidence score for each object detected in the sample image, as shown in the following sample response. 

![\[Graph displaying scores for labels like Skateboard, Sport, People, Person, Human, and Parking with high confidence values around 99%.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/labels-confidence-score.png)


To see all the confidence scores shown in the response, choose **Show more** in the **Labels \$1 Confidence** pane.

You can also look at the request to the API and the response from the API as a reference.

Request

```
{
   "contentString":{
      "Attributes":[
         "ALL"
      ],
      "Image":{
         "S3Object":{
            "Bucket":"console-sample-images",
            "Name":"skateboard.jpg"
         }
      }
   }
}
```

Response

```
{
   "Labels":[
      {
         "Confidence":99.25359344482422,
         "Name":"Skateboard"
      },
      {
         "Confidence":99.25359344482422,
         "Name":"Sport"
      },
      {
         "Confidence":99.24723052978516,
         "Name":"People"
      },
      {
         "Confidence":99.24723052978516,
         "Name":"Person"
      },
      {
         "Confidence":99.23908233642578,
         "Name":"Human"
      },
      {
         "Confidence":97.42484283447266,
         "Name":"Parking"
      },
      {
         "Confidence":97.42484283447266,
         "Name":"Parking Lot"
      },
      {
         "Confidence":91.53300476074219,
         "Name":"Automobile"
      },
      {
         "Confidence":91.53300476074219,
         "Name":"Car"
      },
      {
         "Confidence":91.53300476074219,
         "Name":"Vehicle"
      },
      {
         "Confidence":76.85114288330078,
         "Name":"Intersection"
      },
      {
         "Confidence":76.85114288330078,
         "Name":"Road"
      },
      {
         "Confidence":76.21503448486328,
         "Name":"Boardwalk"
      },
      {
         "Confidence":76.21503448486328,
         "Name":"Path"
      },
      {
         "Confidence":76.21503448486328,
         "Name":"Pavement"
      },
      {
         "Confidence":76.21503448486328,
         "Name":"Sidewalk"
      },
      {
         "Confidence":76.21503448486328,
         "Name":"Walkway"
      },
      {
         "Confidence":66.71541595458984,
         "Name":"Building"
      },
      {
         "Confidence":62.04711151123047,
         "Name":"Coupe"
      },
      {
         "Confidence":62.04711151123047,
         "Name":"Sports Car"
      },
      {
         "Confidence":61.98909378051758,
         "Name":"City"
      },
      {
         "Confidence":61.98909378051758,
         "Name":"Downtown"
      },
      {
         "Confidence":61.98909378051758,
         "Name":"Urban"
      },
      {
         "Confidence":60.978023529052734,
         "Name":"Neighborhood"
      },
      {
         "Confidence":60.978023529052734,
         "Name":"Town"
      },
      {
         "Confidence":59.22066116333008,
         "Name":"Sedan"
      },
      {
         "Confidence":56.48063278198242,
         "Name":"Street"
      },
      {
         "Confidence":54.235477447509766,
         "Name":"Housing"
      },
      {
         "Confidence":53.85226058959961,
         "Name":"Metropolis"
      },
      {
         "Confidence":52.001792907714844,
         "Name":"Office Building"
      },
      {
         "Confidence":51.325313568115234,
         "Name":"Suv"
      },
      {
         "Confidence":51.26075744628906,
         "Name":"Apartment Building"
      },
      {
         "Confidence":51.26075744628906,
         "Name":"High Rise"
      },
      {
         "Confidence":50.68067932128906,
         "Name":"Pedestrian"
      },
      {
         "Confidence":50.59548568725586,
         "Name":"Freeway"
      },
      {
         "Confidence":50.568580627441406,
         "Name":"Bumper"
      }
   ]
}
```

For more information, see [How Amazon Rekognition works](how-it-works.md).

## Detect objects and scenes in an image you provide
<a name="detect-label-own-image"></a>

You can upload an image that you own or provide the URL to an image as input in the Amazon Rekognition console. Amazon Rekognition returns the object and scenes, confidence scores for each object, and scene it detects in the image you provide.

**Note**  
The image must be less than 5MB in size and must be of JPEG or PNG format.

**To detect objects and scenes in an image you provide**

1. Open the Amazon Rekognition console at [https://console.aws.amazon.com/rekognition/](https://console.aws.amazon.com/rekognition/).

1. Choose **Label detection**.

1. Do one of the following: 
   + Upload an image – Choose **Upload**, go to the location where you stored your image, and then select the image. 
   + Use a URL – Type the URL in the text box, and then choose **Go**.

1. View the confidence score of each label detected in the **Labels \$1 Confidence** pane.

For more image analysis options, see [Working with images](images.md).

## Detect objects and people in a video you provide
<a name="detect-label-video-console"></a>

You can upload a video that you provide as input in the Amazon Rekognition console. Amazon Rekognition returns the people, objects, and labels detected in the video.

**Note**  
The demo video must not be more than a minute long or larger than 30 MB. It must be in MP4 file format and encoded using the H.264 codec.

**To detect objects and people in a video you provide**

1. Open the Amazon Rekognition console at [https://console.aws.amazon.com/rekognition/](https://console.aws.amazon.com/rekognition/).

1. Choose **Stored Video Analysis** from the navigation bar.

1. Under **Choose a sample or upload your own**, select **Your own video** from the drop-down menu.

1. Drag and drop your video or select your video from the location where you've stored it.

 For more video analysis options, see [Working with stored video analysis operations](video.md) or [Working with streaming video events](streaming-video.md).

# Exercise 2: Analyze faces in an image (console)
<a name="detect-faces-console"></a>

This section shows you how to use the Amazon Rekognition console to detect faces and analyze facial attributes in an image. When you provide an image that contains a face as input, the service detects the face in the image, analyzes the facial attributes of the face, and then returns a percent confidence score for the face and the facial attributes detected in the image. For more information, see [How Amazon Rekognition works](how-it-works.md).

For example, if you choose the following sample image as input, Amazon Rekognition detects it as a face and returns confidence scores for the face and the facial attributes detected.

![\[Smiling woman wearing sunglasses driving a yellow vintage car with open road ahead.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/sample-detect-faces.png)


The following shows the sample response.

![\[Smiling young woman wearing sunglasses and looking happy, with confidence values for labels.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/detect-faces-confidence-score.png)


If there are multiple faces in the input image, Rekognition detects up to 100 faces in the image. Each face detected is marked with a square. When you click the area marked with a square on a face, Rekognition displays the confidence score of that face and its attributes detected in the **Faces \$1 Confidence** pane. 

## Analyze faces in an image you provide
<a name="detect-faces-own-image"></a>

You can upload your own image or provide the URL to the image in the Amazon Rekognition console.

**Note**  
The image must be less than 5MB in size and must be of JPEG or PNG format.

**To analyze a face in an image you provide**

1. Open the Amazon Rekognition console at [https://console.aws.amazon.com/rekognition/](https://console.aws.amazon.com/rekognition/).

1. Choose **Facial analysis**.

1. Do one of the following: 
   + Upload an image – Choose **Upload**, go to the location where you stored your image, and then select the image. 
   + Use a URL – Type the URL in the text box, and then choose **Go**.

1. View the confidence score of one the faces detected and its facial attributes in the **Faces \$1 Confidence** pane.

1. If there are multiple faces in the image, choose one of the other faces to see its attributes and scores.

# Exercise 3: Compare faces in images (console)
<a name="compare-faces-console"></a>

This section shows you how to use the Amazon Rekognition console to compare faces within a set of images with multiple faces in them. When you specify a **Reference face** (source) and a **Comparison faces** (target) image, Rekognition compares the largest face in the source image (that is, the reference face) with up to 100 faces detected in the target image (that is, the comparison faces), and then finds how closely the face in the source matches the faces in the target image. The similarity score for each comparison is displayed in the **Results** pane.

If the target image contains multiple faces, Rekognition matches the face in the source image with up to 100 faces detected in target image, and then assigns a similarity score to each match. 

If the source image contains multiple faces, the service detects the largest face in the source image and uses it to compare with each face detected in the target image. 

For more information, see [Comparing faces in images](faces-comparefaces.md).

For example, with the sample image shown on the left as a source image and the sample image on the right as a target image, Rekognition detects the face in the source image, compares it with each face detected in the target image, and displays a similarity score for each pair.

![\[Young girls laughing and embracing each other, with one girl in the center and a comparison showing same faces detected.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/sample-compare-faces.png)


The following shows the faces detected in the target image and the similarity score for each face.

![\[Three sets of face images with similarity scores: 92% similarity for the first pair, 0% for the second and third pairs.\]](http://docs.aws.amazon.com/rekognition/latest/dg/images/sample-compare-faces-score.png)


## Compare faces in an image you provide
<a name="compare-faces-own-image"></a>

You can upload your own source and target images for Rekognition to compare the faces in the images or you can specify a URL for the location of the images.

**Note**  
The image must be less than 5MB in size and must be of JPEG or PNG format.

**To compare faces in your images**

1. Open the Amazon Rekognition console at [https://console.aws.amazon.com/rekognition/](https://console.aws.amazon.com/rekognition/).

1. Choose **Face comparison**.

1. For your source image, do one of the following: 
   + Upload an image – Choose **Upload** on the left, go to the location where you stored your source image, and then select the image. 
   + Use a URL – Type the URL of your source image in the text box, and then choose **Go**.

1. For your target image, do one of the following: 
   + Upload an image – Choose **Upload** on the right, go to the location where you stored your source image, and then select the image. 
   + Use a URL – Type the URL of your source image in the text box, and then choose **Go**.

1. Rekognition matches the largest face in your source image with up to 100 faces in the target image and then displays the similarity score for each pair in the **Results** pane.

# Exercise 4: See aggregated metrics (console)
<a name="aggregated-metrics"></a>

The Amazon Rekognition metrics pane shows activity graphs for an aggregate of individual Rekognition metrics over a specified period of time. For example, the `SuccessfulRequestCount` aggregated metric shows the total number of successful requests to all Rekognition API operations over the last seven days. 

The following table lists the graphs displayed in the Rekognition metrics pane and the corresponding Rekognition metric. For more information, see [CloudWatch metrics for Rekognition](rekognition-monitoring.md#cloudwatch-metricsdim).


| Graph | Aggregated Metric | 
| --- | --- | 
|  Successful calls  |  SuccessfulRequestCount  | 
|  Client errors  |  UserErrorCount  | 
|  Server errors  |  ServerErrorCount  | 
|  Throttled  |  ThrottledCount  | 
|  Detected labels  |  DetectedLabelCount  | 
|  Detected faces  |  DetectedFaceCount  | 

Each graph shows aggregated metric data collected over a specified period of time. A total count of aggregated metric data for the time period is also displayed. To see metrics for individual API calls, choose the link beneath each graph.

To allow users access to the Rekognition metrics pane, ensure that the user has appropriate CloudWatch and Rekognition permissions. For example, a user with `AmazonRekognitionReadOnlyAccess` and `CloudWatchReadOnlyAccess` managed policy permissions can see the metrics pane. If a user does not have the required permissions, when the user opens the metrics pane, no graphs appear. For more information, see [Identity and access management for Amazon Rekognition](security-iam.md).

For more information about monitoring Rekognition with CloudWatch see [Monitoring Rekognition with Amazon CloudWatch](rekognition-monitoring.md).

**To see aggregated metrics (console)**

1. Open the Amazon Rekognition console at [https://console.aws.amazon.com/rekognition/](https://console.aws.amazon.com/rekognition/).

1. In the navigation pane, choose **Metrics**.

1. In the dropdown, select the period of time you want metrics for.

1. To update the graphs, choose the **Refresh** button.

1. To see detailed CloudWatch metrics for a specific aggregated metric, choose **See details on CloudWatch** beneath the metric graph.