Structure

MLObjectDetector.ModelParameters

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

Declaration

struct MLObjectDetector.ModelParameters

Overview

To configure the training process, initialize the object detector with an MLObjectDetector.ModelParameters instance. For example, you can explicitly define the validation data set instead of allowing the model to choose a random selection of your training data. Alternatively set validationData to nil to allow the object detector to choose the validation data for you from among your training data. This lets you set other parameters—like maxIterations and batchSize—to non-default values.

Topics

Creating Parameters

init(validationData: MLObjectDetector.DataSource, batchSize: Int?, maxIterations: Int?)

Creates a new set of object detector parameters with validation data represented by a data source.

init(validationData: MLDataTable?, batchSize: Int?, maxIterations: Int?)

Creates a new set of object detector parameters with validation data represented by a data table.

Deprecated

Validating the Model

var validationData: MLDataTable?

A set of annotated images that the training process uses for validation.

Deprecated

Configuring Model Training

var batchSize: Int?

The number of images to use for each training iteration.

var maxIterations: Int?

The maximum number of iterations to use during training.

Describing Parameters

var description: String

A text representation of the model parameters.

var debugDescription: String

A text representation of the model parameters that’s suitable for output during debugging.

var playgroundDescription: Any

A description of the model parameters shown in a playground.

See Also

Creating and Training an Object Detector

enum MLObjectDetector.Origin

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

enum MLObjectDetector.DataSource

A data source for an object detector.

let modelParameters: MLObjectDetector.ModelParameters

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software