FritzVisionPosePredictor

@available(iOS 11.0, *)
open class FritzVisionPosePredictor<Skeleton> : BasePredictor, CoreMLOrVisionPredictor where Skeleton : SkeletonType

A model used to predict the poses of people in images.

  • Declaration

    Swift

    public typealias PredictionInput = FritzVisionImage
  • Declaration

    Swift

    public typealias ModelOptions = FritzVisionPoseModelOptions
  • Declaration

    Swift

    public typealias PredictionResult = FritzVisionPoseResult<Skeleton>
  • Model Configuration for pose model in Fritz.

    Declaration

    Swift

    public var outputStride: Int
  • Declaration

    Swift

    public var useDisplacements: Bool
  • Initialize model with FritzMLModel. If output_stride key defined in userDefinedMetadata, Model will be initialized with that stride.

    Declaration

    Swift

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

    Parameters

    model

    FritzMLModel

  • Initialize model with FritzMLModel. If output_stride key defined in userDefinedMetadata, Model will be initialized with that stride.

    Declaration

    Swift

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

    Parameters

    model

    FritzMLModel

  • Initialize model with FritzMLModel. If output_stride key defined in userDefinedMetadata, Model will be initialized with that stride.

    Declaration

    Swift

    @objc(initWithModel:managedModel:)
    public override init(model: FritzMLModel, managedModel: FritzManagedModel)

    Parameters

    model

    FritzMLModel

    managedModel

    FritzManagedModel

  • Predict poses from a FritzImage.

    Declaration

    Swift

    public func predict(
      _ input: FritzVisionImage,
      options: FritzVisionPoseModelOptions = .init(),
      completion: (FritzVisionPoseResult<Skeleton>?, Error?) -> Void
    )

    Parameters

    input

    The image to use to dectect poses.

    options

    The options used to configure the pose results.

    completion

    Handler to call back on the main thread with poses or error.