---
title: "predictions(from:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mlobjectdetector/predictions(from:)"
---

# predictions(from:)

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

## Declaration

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

Return Value An MLObjectDetector.DetectedObjects array, where each element represents the annotations of the items the object detector found in the corresponding input image.

## See Also

### Testing an object detector

- [prediction(from:)](createml/mlobjectdetector/prediction(from:).md)
- [MLObjectDetector.DetectedObjects](createml/mlobjectdetector/detectedobjects.md)
- [MLObjectDetector.ObjectAnnotation](createml/mlobjectdetector/objectannotation.md)
