Class

VNCoreMLModel

A container for a Core ML model used with Vision requests.

Declaration

class VNCoreMLModel : NSObject

Overview

A Core ML model encapsulates the information trained from a data set used to drive Vision recognition requests. See Getting a Core ML Model for instructions on training your own. Once you have the trained model, use this class to initialize a VNCoreMLRequest for identification.

Topics

Initializers

init(for: MLModel)

Creates a model container to be used with VNCoreMLRequest.

Relationships

Inherits From

Conforms To

See Also

Initializing with a Core ML Model

init(model: VNCoreMLModel)

Creates a model container to be used with VNCoreMLRequest based on a Core ML model.

init(model: VNCoreMLModel, completionHandler: VNRequestCompletionHandler? = nil)

Creates a model container to be used with VNCoreMLRequest based on a Core ML model, with an optional completion handler.

var model: VNCoreMLModel

The Core ML model on which the request is based, wrapped in a VNCoreMLModel.