Instance Method

predictions(from:)

Generates annotations for the detected objects in each image in the given array of URLs.

Declaration

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

Parameters

images

An array of file URLs for the images containg objects you want the model to detect.

Return Value

An array of arrays of detected objects. Each inner array of detected objects has an index which corresponds to the index of the input image.

See Also

Testing an Object Detector

func prediction(from: URL) -> MLObjectDetector.DetectedObjects

Generates annotations for the detected objects in an image at the given URL.

typealias MLObjectDetector.DetectedObjects

An array of annotations for objects that the model has detected.

struct MLObjectDetector.ObjectAnnotation

The label, location, and confidence level of a detected object within an image.