FritzVisionObjectPredictor

@objc(FritzVisionObjectPredictor)
public class FritzVisionObjectPredictor : BasePredictor, CoreMLImagePredictor
  • Declaration

    Swift

    @objc(initWithModel:)
    public override init(model: FritzMLModel)
  • Declaration

    Swift

    @objc(initWithModel:managedModel:)
    public override init(model: FritzMLModel, managedModel: FritzManagedModel)
  • Initialize Object model using a custom model with accessible class names. For models with built-in post processing and built-in class names. Uses default class names as a fall back if none are found.

    Declaration

    Swift

    @objc(initWithIdentifiedModel:)
    public override init(model: SwiftIdentifiedModel)

    Parameters

    model

    IdentifiedModel to use

  • Initialize Object model using a custom model with the given class names. For models with built-in post processing without built-in class names.

    Declaration

    Swift

    @objc(initWithIdentifiedModel:processedLabels:)
    public init(identifiedModel: SwiftIdentifiedModel, classNames: [String])

    Parameters

    identifiedModel

    IdentifiedModel to use

    classNames

    Labels for objects

  • Run prediction for vision object model.

    Declaration

    Swift

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

    Parameters

    input

    Image or buffer to run model on.

    options

    Options for model execution.

    completion

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