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.
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.
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.