---
title: VNCoreMLRequest
framework: vision
role: symbol
role_heading: Class
path: vision/vncoremlrequest
---

# VNCoreMLRequest

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

## Declaration

```swift
class VNCoreMLRequest
```

## Overview

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 use: If the model predicts a single feature, the model’s modelDescription object has a non-nil value for predictedFeatureName and Vision treats the model as a classifier. The results are VNClassificationObservation 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 VNPixelBufferObservation objects. Otherwise, Vision treats the model as a general predictor model. The results are VNCoreMLFeatureValueObservation objects. note: Vision forwards all confidence values from Core ML models as-is and doesn’t normalize them to [0, 1].

## Topics

### Initializing with a Core ML Model

- [init(model:)](vision/vncoremlrequest/init(model:).md)
- [init(model:completionHandler:)](vision/vncoremlrequest/init(model:completionhandler:).md)
- [model](vision/vncoremlrequest/model.md)
- [VNCoreMLModel](vision/vncoremlmodel.md)

### Configuring Image Options

- [imageCropAndScaleOption](vision/vncoremlrequest/imagecropandscaleoption.md)
- [VNImageCropAndScaleOption](vision/vnimagecropandscaleoption.md)

### Identifying Request Revisions

- [VNCoreMLRequestRevision1](vision/vncoremlrequestrevision1.md)

## Relationships

### Inherits From

- [VNImageBasedRequest](vision/vnimagebasedrequest.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Machine learning image analysis

- [Classifying Images with Vision and Core ML](coreml/classifying-images-with-vision-and-core-ml.md)
- [Training a Create ML Model to Classify Flowers](vision/training-a-create-ml-model-to-classify-flowers.md)
- [VNClassificationObservation](vision/vnclassificationobservation.md)
- [VNPixelBufferObservation](vision/vnpixelbufferobservation.md)
- [VNCoreMLFeatureValueObservation](vision/vncoremlfeaturevalueobservation.md)
