Initializer

init(trainingData:boundingBoxOrigin:parameters:)

Creates an object detector from a training set represented by a data source.

Declaration

init(trainingData: MLObjectDetector.DataSource, boundingBoxOrigin: MLObjectDetector.Origin = .center, parameters: MLObjectDetector.ModelParameters = ModelParameters()) throws

Parameters

trainingData

The annotated images that you use to train this model, contained in a data source.

boundingBoxOrigin

The location within an annotation’s bounding box to which its (x, y) coordinates refer. The default is .center, meaning every annotation’s coordinates are the center point of its bounding box.

parameters

MLObjectDetector.ModelParameters that you use to configure model training.

Discussion

Use this initializer to create an object detector with an MLObjectDetector.DataSource.

See Also

Deprecated

enum MLObjectDetector.Origin

The location within an annotation’s bounding box that corresponds to the annotation’s coordinates.

Deprecated