---
title: "extractLabels(from:)"
framework: createmlcomponents
role: symbol
role_heading: Type Method
path: "createmlcomponents/objectdetectionmetrics/extractlabels(from:)"
---

# extractLabels(from:)

Extracts all the labels from a list of annotations.

## Declaration

```swift
static func extractLabels(from annotations: [ObjectDetectionAnnotation<Label>]) -> Set<Label>
```

## Parameters

- `annotations`: A list of annotations.

## Return Value

Return Value A set of all the labels present in the annotations.
