Initializer

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

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

Declaration

init(trainingData: MLDataTable, imageColumn: String, annotationColumn: String, annotationType: MLObjectDetector.AnnotationType, 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.

annotationType

The type of image annotations in annotationColumn.

parameters

MLObjectDetector.ModelParameters that you use to configure model training.

Discussion

Use this initializer to create an object detector with an MLDataTable.

See Also

Creating and Training an Object Detector

enum MLObjectDetector.DataSource

A data source for an object detector.

enum MLObjectDetector.AnnotationType

The available types of image annotations.

struct MLObjectDetector.ModelParameters

Parameters that affect the process of training an object detection model.

let modelParameters: MLObjectDetector.ModelParameters

The configuration parameters that the object detector used for training during initialization.