An image analysis request that uses a Core ML model to process images.
SDKs
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 11.0+
Framework
- Vision
Declaration
class VNCoreMLRequest : VNImage Based Request
Overview
The results array of a Core ML-based image analysis request contains a different observation type depending on the kind of MLModel
object you create the request with:
If the model predicts a single feature (that is, the model’s
model
object has a non-Description nil
value for itspredicted
property), Vision treats that model as a classifier: the results areFeature Name VNClassification
objects.Observation If the model’s outputs include at least one output whose feature type is
MLFeature
, Vision treats that model as an image-to-image model: the results areType .image VNPixel
objects.Buffer Observation Otherwise, Vision treats the model as a general predictor model: the results are
VNCore
objects.MLFeature Value Observation