Initializer

init(trainingData:parameters:annotationType:)

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

Declaration

init(trainingData: MLObjectDetector.DataSource, parameters: MLObjectDetector.ModelParameters = .init(), annotationType: MLObjectDetector.AnnotationType) throws

Parameters

trainingData

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

parameters

MLObjectDetector.ModelParameters that you use to configure model training.

annotationType

The type of image annotations in trainingData.

Discussion

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

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.