Creates an image feature extractor from a CoreML model URL.
- Parameters:
- url: URL of the .mlmodel file.
- configuration: The model configuration of the CoreML model.
- inputName: The name of the input which the `model` expects.
- outputName: The name of the output from the `model`.
- context: The Core Image context.
Creates an image feature extractor from a CoreML model.
- Parameters:
- model: The CoreML model which will be used for feature extraction.
- inputName: The name of the input which the `model` expects.
- outputName: The name of the output from the `model`.
- context: A Core Image context.
get · iOS 16.0+
model
TypeScript
get model(): _CoreML_MLModel
Swift declaration
let model: MLModel
The CoreML model with .mlmodel extension.
This model should satisfy the following requirements:
1. Take in one input of type .image and its key name should be same as `inputName`.
2. Any other input should be optional.
3. Give at least one output of type .multiarray and its key name should be same as `outputName`
Uses the CoreML model to create image features from the input pixel buffer.
- Parameters:
- input: An image.
- eventHandler: An event handler.
- Returns: `ImageFeatures` generated by passing the `pixelBuffer` through the `model`.