<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLObjectDetector/predictions(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML16MLObjectDetectorV11predictions4fromSaySayAC16ObjectAnnotationVGGSay10Foundation3URLVG_tKF"
  },
  "title" : "predictions(from:)"
}
-->

# predictions(from:)

Locates objects in an array of images and generates an array of annotation collections, one for each input image.

```
func predictions(from images: [URL]) throws -> [MLObjectDetector.DetectedObjects]
```

## Parameters

`images`

An array of URLs for the image files where you want the object detector to look for objects.

## Return Value

An [`MLObjectDetector.DetectedObjects`](/documentation/CreateML/MLObjectDetector/DetectedObjects) array, where each element represents the annotations of the
items the object detector found in the corresponding input image.

---

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)