<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/DetectedObject/init(boundingBox:label:probability:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents14DetectedObjectV11boundingBox5label11probabilityACyxGSo6CGRectV_xSftcfc"
  },
  "title" : "init(boundingBox:label:probability:)"
}
-->

# init(boundingBox:label:probability:)

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

```
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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)