Instance Property

preferBackgroundProcessing

A hint to minimize the resource burden of the request.

Declaration

var preferBackgroundProcessing: Bool { get set }

Discussion

If set to true, this property reduces the request’s memory footprint, processing footprint, and CPU/GPU contention at the potential cost of longer execution time.

Setting this value can help ensure that Vision processing doesn’t block UI updates and other rendering on the main thread.

See Also

Configuring a Request

var completionHandler: VNRequestCompletionHandler?

The completion handler block that’s invoked after the request has finished processing.

var results: [Any]?

The collection of VNObservation results generated by request processing.

var usesCPUOnly: Bool

A Boolean signifying that the Vision request should execute exclusively on the CPU.

var revision: Int

The specific algorithm or implementation revision that’s used to perform the request.