Initializer

init(trainingData:imageColumn:annotationColumn:boundingBoxOrigin:parameters:)

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

Declaration

init(trainingData: MLDataTable, imageColumn: String, annotationColumn: String, boundingBoxOrigin: MLObjectDetector.Origin = .center, parameters: MLObjectDetector.ModelParameters = ModelParameters()) throws

Parameters

trainingData

The annotated images that you use to train this model, contained in an MLDataTable.

imageColumn

The name of the column that contains the image file URLs.

annotationColumn

The name of the column that contains the image annotations.

boundingBoxOrigin

The location within an annotation’s bounding box to which its (x, y) coordinates refer to. 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 MLDataTable.

See Also

Deprecated

enum MLObjectDetector.Origin

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

Deprecated