CoreMLRequest
An image-analysis request that uses a Core ML model to process images.
Declaration
struct CoreMLRequestOverview
The results array of a Core ML-based image-analysis request contain a different observation type, depending on the kind of MLModel object you use:
If the model predicts a single feature and the model’s MLModelDescription object has a non-
nilvalue for predictedFeatureName, then Vision treats the model as a classifier. The results are ClassificationObservation objects.If the model’s outputs include at least one output with a feature type of MLFeatureType.image, Vision treats that model as an image-to-image model. The results are PixelBufferObservation objects.
Otherwise, Vision treats the model as a general predictor model. The results are CoreMLFeatureValueObservation objects.
Topics
Creating a request
Performing a request
perform(on:orientation:)perform(on:orientation:)perform(on:orientation:)perform(on:orientation:)perform(on:orientation:)perform(on:orientation:)
Understanding the result
Configuring a request
supportedIdentifiersmodelContainerCoreMLModelContainerComputeStagecropAndScaleActionImageCropAndScaleAction