Classification information produced by an image analysis request.


@interface VNClassificationObservation : VNObservation


This type of observation results from performing a VNCoreMLRequest image analysis with a Core ML model whose role is classification (rather than prediction or image-to-image processing). Vision infers that an MLModel object is a classifier model if that model predicts a single feature. That is, the model’s modelDescription object has a non-nil value for its predictedFeatureName property.


Determining Classification


Classification label identifying the type of observation.

Measuring Confidence and Precision


A Boolean variable indicating whether the observation contains precision and recall curves.

- hasMinimumPrecision:forRecall:

Determines whether the observation for a specific recall has a minimum precision value.

- hasMinimumRecall:forPrecision:

Determines whether the observation for a specific precision has a minimum recall value.


Inherits From

See Also

Machine-Learning Image Analysis

Classifying Images with Vision and Core ML

Preprocess photos using the Vision framework and classify them with a Core ML model.

Training a Create ML Model to Classify Flowers

Train a flower classifier using Create ML in Swift Playgrounds, and apply the resulting model to real-time image classification using Vision.


An image analysis request that uses a Core ML model to process images.


An output image produced by a Core ML image analysis request.


A collection of key-value information produced by a Core ML image analysis request.