<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/MLModelImageFeatureExtractor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents28MLModelImageFeatureExtractorV"
  },
  "title" : "MLModelImageFeatureExtractor"
}
-->

# MLModelImageFeatureExtractor

An image feature extractor provided by an MLModel.

```
struct MLModelImageFeatureExtractor
```

## Topics

### Creating the extractor

[`init(model: MLModel, inputName: String, outputName: String, context: CIContext) throws`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/init(model:inputName:outputName:context:))

Creates an image feature extractor from a CoreML model.

[`init(contentsOf: URL, configuration: MLModelConfiguration, inputName: String, outputName: String, context: CIContext) async throws`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/init(contentsOf:configuration:inputName:outputName:context:))

Creates an image feature extractor from a CoreML model URL.

### Getting the properties

[`let inputName: String`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/inputName)

The model’s input feature name.

[`let model: MLModel`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/model)

The CoreML model with .mlmodel extension.

[`let outputName: String`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/outputName)

The model’s output feature name.

### Applying

[`func applied(to: CIImage, eventHandler: EventHandler?) async throws -> MLShapedArray<Float>`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/applied(to:eventHandler:))

Uses the CoreML model to create image features from the input pixel buffer.

[`enum Error`](/documentation/CreateMLComponents/MLModelImageFeatureExtractor/Error)

CoreML Extraction error.

## Relationships

### Conforms To

[`ImageFeatureExtractor`](/documentation/CreateMLComponents/ImageFeatureExtractor)

[`Transformer`](/documentation/CreateMLComponents/Transformer)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)