descriptor
TypeScriptget descriptor(): RequestDescriptorSwift declarationvar descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
struct · iOS 18.0+ · SDK 27.1
struct CoreMLRequestAn image analysis request that uses a Core ML model to process images. The results array of a Core ML-based image analysis request contains a different observation type, depending on the kind of MLModel object you use: * If the model predicts a single feature, the model’s `modelDescription` object has a non-nil value for `predictedFeatureName` and Vision treats the model as a classifier. The results are `ClassificationObservation` objects. * If the model’s outputs include at least one output with a feature type of `MLFeatureType.image`, Vision treats that model as an image-to-image model. The results are `PixelBufferObservation` objects. * Otherwise, Vision treats the model as a general predictor model. The results are `CoreMLFeatureValueObservation` objects. - Note: Vision forwards all confidence values from Core ML models as-is and doesn’t normalize them to [0, 1].
get descriptor(): RequestDescriptorSwift declarationvar descriptor: RequestDescriptor { get }An enum that identifies the request and request revision.
get modelContainer(): CoreMLModelContainerSwift declarationlet modelContainer: CoreMLModelContainerThe model to base the image analysis request on. This object wraps a Core ML model.
get regionOfInterest(): NormalizedRectSwift declarationvar regionOfInterest: NormalizedRectThe region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.
set regionOfInterest(value: NormalizedRect)Swift declarationvar regionOfInterest: NormalizedRectThe region of the image in which Vision will perform the request. The rectangle is normalized to the dimensions of the processed image. Its origin is specified relative to the image's lower-left corner. By default, the region of interest will be the full image.
setComputeDevice(computeDevice: (_CoreML_MLComputeDevice) | null, computeStage: ComputeStage): voidSwift declarationmutating func setComputeDevice(_ computeDevice: MLComputeDevice?, for computeStage: ComputeStage)Assigns a compute device for a compute stage. If the parameter `computeDevice` is `nil`, the framework removes any explicit compute device assignment and allows the framework to select the device. Configure any compute device for a given compute stage. When performing a request, the system makes a validity check. Use `supportedComputeStageDevices` to get valid compute devices for a request’s compute stages. - Parameters: - `computeDevice: `The compute device to assign to the compute stage. - `computeStage: `The compute stage.
get cropAndScaleAction(): ImageCropAndScaleActionSwift declarationvar cropAndScaleAction: ImageCropAndScaleActionset cropAndScaleAction(value: ImageCropAndScaleAction)Swift declarationvar cropAndScaleAction: ImageCropAndScaleActionstatic get supportedRevisions(): Array<CoreMLRequest_Revision>Swift declarationstatic let supportedRevisions: [CoreMLRequest.Revision]get supportedIdentifiers(): (Array<string>) | nullSwift declarationvar supportedIdentifiers: [String]? { get }The classification identifiers supported by the request. If the specific configuration is not supported, `nil` is returned.
get supportedComputeStageDevices(): NativeMap<ComputeStage, Array<_CoreML_MLComputeDevice>>Swift declarationvar supportedComputeStageDevices: [ComputeStage : [MLComputeDevice]] { get }static init(model: CoreMLModelContainer, revision?: (CoreMLRequest_Revision) | null): CoreMLRequestSwift declarationinit(model: CoreMLModelContainer, _ revision: CoreMLRequest.Revision? = nil)- Parameters: - model: The container for a CoreML model - revision: The specific algorithm or implementation revision that is to be used to perform the request.
get revision(): CoreMLRequest_RevisionSwift declarationlet revision: CoreMLRequest.RevisionThe request's configured revision.
No declarations were skipped in this snapshot.