<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLObjectDetectorMetrics/init(averagePrecision:meanAveragePrecision:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML23MLObjectDetectorMetricsV16averagePrecision011meanAverageG0ACSDySSSdG9variedIoU_AF0K3U50t_SdAG_SdAHttcfc"
  },
  "title" : "init(averagePrecision:meanAveragePrecision:)"
}
-->

# init(averagePrecision:meanAveragePrecision:)

Creates metrics for an object detector given an average precision and a mean average precision.

```
init(averagePrecision: (variedIoU: [String : Double], IoU50: [String : Double]), meanAveragePrecision: (variedIoU: Double, IoU50: Double))
```

## Parameters

`averagePrecision`

The `averagePrecision` for this `MLObjectDetectorMetrics`.

`meanAveragePrecision`

The `meanAveragePrecision` for this `MLObjectDetectorMetrics`.

## Discussion

You do not use this initializer. Create ML uses this initializer to generate metrics for you when train an
object detector or when you use an evaluation method.

---

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)