---
title: "init(model:inputName:outputName:context:)"
framework: createmlcomponents
role: symbol
role_heading: Initializer
path: "createmlcomponents/mlmodelimagefeatureextractor/init(model:inputname:outputname:context:)"
---

# init(model:inputName:outputName:context:)

Creates an image feature extractor from a CoreML model.

## Declaration

```swift
init(model: MLModel, inputName: String = "image", outputName: String, context: CIContext = CIContext()) throws
```

## Parameters

- `model`: The CoreML model which will be used for feature extraction.
- `inputName`: The name of the input which the model expects.
- `outputName`: The name of the output from the model.
- `context`: A Core Image context.

## See Also

### Creating the extractor

- [init(contentsOf:configuration:inputName:outputName:context:)](createmlcomponents/mlmodelimagefeatureextractor/init(contentsof:configuration:inputname:outputname:context:).md)
