One Logo Pool Ball
CreateMLComponents · IOS API REFERENCE

ImageFeaturePrint

struct · iOS 16.0+ · SDK 27.1

struct ImageFeaturePrint

ImageFeaturePrint image feature extractor.

Members (8)

init · iOS 16.0+

init

TypeScript
static initCropAndScaleContext(cropAndScale?: _Vision_VNImageCropAndScaleOption, context?: _CoreImage_CIContext): ImageFeaturePrint
Swift declaration
init(cropAndScale: VNImageCropAndScaleOption = .centerCrop, context: CIContext = CIContext())

Creates a FeaturePrint feature extractor. - Parameters: - cropAndScale: The scaling and cropping options. - context: The CoreImage context to use for the operation. Defaults to a new default context.

get · iOS 16.0+

cropAndScale

TypeScript
get cropAndScale(): _Vision_VNImageCropAndScaleOption
Swift declaration
let cropAndScale: VNImageCropAndScaleOption

The crop and scale options.

get · iOS 17.0+

latestRevision

TypeScript
static get latestRevision(): number
Swift declaration
static let latestRevision: Int

The latest feature extractor revision.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(image: _CoreImage_CIImage, eventHandler?: (((arg0: Event) => void)) | null): Promise<_CoreML_MLShapedArray<number>>
Swift declaration
func applied(to image: CIImage, eventHandler: EventHandler? = nil) async throws -> MLShapedArray<Float>

Extracts image features from an image. - Parameters: - image: An image. - eventHandler: An event handler. - Returns: A shaped array containing the extracted features of the image.

init · iOS 17.0+

init

TypeScript
static initRevisionCropAndScaleContext(revision: number, cropAndScale?: _Vision_VNImageCropAndScaleOption, context?: _CoreImage_CIContext): ImageFeaturePrint
Swift declaration
init(revision: Int, cropAndScale: VNImageCropAndScaleOption = .centerCrop, context: CIContext = CIContext())

Creates a FeaturePrint feature extractor. - Parameters: - revision: The revision of feature extractor to use. - cropAndScale: The scaling and cropping options. - context: The CoreImage context to use for the operation. Defaults to a new default context.

get · iOS 17.0+

revision

TypeScript
get revision(): number
Swift declaration
var revision: Int { get set }

The feature extractor revision number. There are two Image Feature Print revisions: 1 and 2. In most cases revision 2 produces better models because it uses a smaller feature vector and better features. In iOS 12 or later, tvOS 12 or later, and macOS 10.14 or later, revision 1 takes images with a size of 299x299 and produces a 2048 feature vector. In iOS 17 or later, tvOS 17 or later, and macOS 14 or later, revision 2 takes images with a size of 360x360 and produces a 768 feature vector.

set · iOS 17.0+

revision

TypeScript
set revision(value: number)
Swift declaration
var revision: Int { get set }

The feature extractor revision number. There are two Image Feature Print revisions: 1 and 2. In most cases revision 2 produces better models because it uses a smaller feature vector and better features. In iOS 12 or later, tvOS 12 or later, and macOS 10.14 or later, revision 1 takes images with a size of 299x299 and produces a 2048 feature vector. In iOS 17 or later, tvOS 17 or later, and macOS 14 or later, revision 2 takes images with a size of 360x360 and produces a 768 feature vector.

Skipped declarations

No declarations were skipped in this snapshot.

All CreateMLComponents types →