---
title: "init(boundingBox:label:probability:)"
framework: createmlcomponents
role: symbol
role_heading: Initializer
path: "createmlcomponents/detectedobject/init(boundingbox:label:probability:)"
---

# init(boundingBox:label:probability:)

Creates a detected object with bounding box, object label and confidence.

## Declaration

```swift
init(boundingBox: CGRect, label: Label, probability: Float)
```

## Parameters

- `boundingBox`: The bounding box of the detected object.
- `label`: The label of the detected object.
- `probability`: The detection confidence. The value will always be between 0.0 and 1.0
