FritzVisionObjectModel

@objc(FritzVisionObjectModel)
public class FritzVisionObjectModel : NSObject
  • Number of predictions waiting to be run asynchronously

    Declaration

    Swift

    public var pendingAsyncPredictions: Int { get set }
  • Run prediction for vision object model.

    Declaration

    Swift

    @objc(predict:options:completion:)
    public func predict(_ fritzImage: FritzVisionImage, options: FritzVisionObjectModelOptions = .init(), completion: ([FritzVisionObject]?, Error?) -> Void)

    Parameters

    fritzImage

    Image or buffer to run model on.

    options

    Options for model execution.

    completion

    The block to invoke after the prediction request has finished processing.

  • Run prediction for vision object model asynchronously on a given queue.

    Declaration

    Swift

    @objc(predict:options:queue:completion:)
    public func predict(_ fritzImage: FritzVisionImage, options: FritzVisionObjectModelOptions = .init(), on queue: DispatchQueue, completion: @escaping ([FritzVisionObject]?, Error?) -> Void)

    Parameters

    fritzImage

    Image or buffer to run model on.

    options

    Options for model execution.

    queue

    Dispatch queue to asynchronously execute predictions on

    completion

    The block to invoke after the prediction request has finished processing.