# Detect Labels

> `UiPath.AmazonRekognition.Activities.DetectLabels`

`UiPath.AmazonRekognition.Activities.DetectLabels`

The **Detect Labels** activity uses the Amazon Rekognition [DetectLabels](https://docs.aws.amazon.com/rekognition/latest/dg/API_DetectLabels.html) API to detect instances of real-world objects within an input image (**ImagePath** or **ImageURL**). This includes objects like flower, tree, and table; events like wedding, graduation, and birthday party; and concepts like landscape, evening, and nature.

The output of the **Detect Labels** activity is an array of objects (i.e., `Labels`) that were detected in the image, as well as, the level of confidence that those objects are present.

## Summary

### Dependencies

| Dependency | Details |
| --- | --- |
| Packages | UiPath.Amazon.Rekognition.Activities |
| Activities | [Amazon Scope](https://docs.uipath.com/activities/other/latest/legacy-integrations/amazon-rekognition-amazon-scope#amazon-scope) |

### Attributes

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Attribute  
     Details  
  
 
 
  
     Inputs (Variables)  
    <code>String</code>
      
         Applies to property: ImagePath or ImageURL 
      
<code>Double</code>
      
         Applies to property: Confidence 
      
<code>Int32</code>
      
         Applies to property: MaxResults 
      

  
  
     Outputs (Variables)  
    <code>Labels[]</code> Applies to property: Labels 
  
  
     API used  
     Amazon Rekognition - DetectLabels 
  
  
     Examples  
    Quickstart 
  
 

## Properties

The values for the following properties are specified when adding this activity to your project in UiPath Studio.

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-36260-75b15ad9-3a68d2a7.webp)

### Common

#### DisplayName

The display name of the activity.

| Attributes | Details |
| --- | --- |
| **Type** | `String` |
| **Required** | Yes |
| **Default value** | *Detect Labels* |
| **Allowed values** | Enter a `String` or `String` variable. |
| **Notes** | N/A |

### Input

#### ImagePath

The path to a local image that you want to analyze.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Attributes  
     Details  
  
 
 
  
    Type 
    <code>String</code> 
  
  
    Required 
     Yes (if the ImageURL is empty)  
  
  
    Default value 
     Empty  
  
  
    Allowed values 
    Enter a <code>String</code> or <code>String</code> variable. 
  
  
    Notes 
   
      
         Either the ImagePath or ImageURL property is required. 
         If you enter values for both the ImagePath and ImageURL , the Image Path value is used. 
      

  
 

#### ImageURL

The URL of an image that you want to analyze.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Attributes  
     Details  
  
 
 
  
    Type 
    <code>String</code> 
  
  
    Required 
     Yes (if the ImagePath is empty)  
  
  
    Default value 
     Empty  
  
  
    Allowed values 
    Enter a <code>String</code> or <code>String</code> variable. 
  
  
    Notes 
   
      
         Either the ImagePath or ImageURL property is required. 
         If you enter values for both the ImagePath and ImageURL , the Image Path value is used. 
      

  
 

### Misc

#### Private

If selected, the values of variables and arguments are no longer logged at Verbose level.

| Attributes | Details |
| --- | --- |
| **Type** | Checkbox |
| **Required** | No |
| **Default value** | Not Selected |
| **Allowed values** | Selected or Not Selected |
| **Notes** | N/A |

### Options

#### Confidence

The minimum confidence value (i.e., percentage of similarity) the image contains the detected objects.

| Attributes | Description |
| --- | --- |
| **Type** | `Double` |
| **Required** | No |
| **Default value** | *0.55* (not displayed in the property) |
| **Allowed values** | Enter a number between 0 and 1 to indicate the percentage of similarity (e.g., enter *.8* if you want the similarity to be 80%). |
| **Notes** | If this property is set, the **Labels** property only returns the labels that meet or exceed the specified value |

#### MaxResults

The maximum number of labels you want the activity to return in the response. The activity returns the specified number of highest confidence labels.

| Attributes | Details |
| --- | --- |
| **Type** | `Int32` |
| **Required** | No |
| **Default value** | Empty |
| **Allowed values** | Enter a `Int32` or `Int32` variable. |
| **Notes** | N/A |

### Output

#### Labels

An array of objects (i.e. labels) that were detected within the image.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Attributes  
     Details  
  
 
 
  
    Type 
    <code>Label[]</code>UiPath.Amazon.Rekognition.Models.Label[] 
  
  
    Required 
     No (recommended if you plan to use the output data in subsequent activities)  
  
  
    Default value 
     Empty  
  
  
    Allowed values 
    Enter your value as a <code>Label[]</code> variable. 
  
  
    Notes 
   
      
         The output data includes the <code>Name</code> and <code>Confidence</code> of each label. For more information see the, Label datatype in the Amazon Rekognition API documentation. 
         If the Confidence value is set, the array only includes the labels that meet or exceed the specified level of similarity. 
         If you plan to use the For Each activity to process the array output, select UiPath.Amazon.Rekognition.Models.Label as the TypeArgument.
