Skip to main content

Create a CoreML Vision request (coreml.new_vision_request)

Declaration

vnreq, err = coreml.new_vision_request(compiled_model_path)

Parameters

  • compiled_model_path
    String. Path to a compiled model. Currently supports two types: Image Classification and Object Detection.

Returns

  • vnreq
    Vision request object, or nil on failure.
  • err
    String. nil on success; error message on failure.

Notes

  • Available since app version 1.3.8+.
  • Not supported on iOS versions below 13.
  • Loads a compiled .mlmodelc and returns a context for image inference.

Example

See Use CoreML request to infer an image