Structure

MLObjectDetector.ObjectAnnotation

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

Declaration

struct MLObjectDetector.ObjectAnnotation

Topics

Creating a Detected Object Annotation

Labeling and Locating a Detected Object

var label: String

The label of a detected object.

var boundingBox: CGRect

The location, within an image, of the rectangle that encloses a detected object.

var confidence: Double

The confidence level of the model in the annotations’s accuracy.

Describing a Detected Object

var description: String

A text representation of the object annotation.

var debugDescription: String

A text representation of the object annotation that’s suitable for output during debugging.

var playgroundDescription: Any

A description of the object annotation shown in a playground.

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.

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

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

typealias MLObjectDetector.DetectedObjects

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