Contents

init(model:completionHandler:)

Creates a model container to use with an image analysis request based on the model you provide, with an optional completion handler.

Declaration

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

Parameters

  • model:

    The Coreml model on which to base the Vision request.

  • completionHandler:

    An optional block of code to execute after model initialization.

Discussion

Initialization can fail if the Core ML model you provide isn’t supported in Vision, such as if the model doesn’t accept an image as input.

See Also

Initializing with a Core ML Model