<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLImageClassifier/CustomFeatureExtractor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML17MLImageClassifierV22CustomFeatureExtractorV"
  },
  "title" : "MLImageClassifier.CustomFeatureExtractor"
}
-->

# MLImageClassifier.CustomFeatureExtractor

A custom feature extractor a training session uses to train an image classifier.

```
struct CustomFeatureExtractor
```

## Topics

### Creating a custom feature extractor

[`init(modelPath: URL, outputName: String?)`](/documentation/CreateML/MLImageClassifier/CustomFeatureExtractor/init(modelPath:outputName:))

Creates a custom feature extractor given a model file and an optional output layer name.

### Configuring a custom feature extractor

[`var modelPath: URL`](/documentation/CreateML/MLImageClassifier/CustomFeatureExtractor/modelPath)

The location of a neural network `.mlmodel` file that takes an image as an input.

[`var outputName: String?`](/documentation/CreateML/MLImageClassifier/CustomFeatureExtractor/outputName)

The name of the output from a feature extraction layer within the model.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)