FritzVisionObjectModelOptions

@objc(FritzVisionObjectModelOptions)
public final class FritzVisionObjectModelOptions : NSObject, FritzImageOptions
  • Confidence threshold for prediction results in the range of [0, 1], default is 0.6.

    Declaration

    Swift

    @objc
    public var threshold: Double
  • Threshold for overlap of items within a single class in range [0, 1]. Lower values are more strict.

    Declaration

    Swift

    @objc
    public var iouThreshold: Double
  • Number of results to return from request.

    Declaration

    Swift

    @objc
    public var numResults: Int
  • Declaration

    Swift

    @objc
    public var imageCropAndScaleOption: FritzVisionCropAndScale
  • Force predictions to use Core ML (if supported by model). In iOS 12, scaleFit would incorrectly crop image. When True (or on iOS 12) model will run using CoreML.

    Declaration

    Swift

    @objc
    public let forceCoreMLPrediction: Bool
  • Force predictions to use the Vision framework (if supported by model).

    Takes precedence over forceCoreMLPrediction. Core ML predictions do not currently work with YUV pixel formats, which are used in ARKit. Setting this to true will force the predictor to use the Vision framework. Unfortunately, in iOS 11.1 - 12.1 there is a bug that incorrectly crops images with the imageCropAndScaleOption set to .scaleFit. However, if you are using ARKit, you must set this to true.

    Declaration

    Swift

    @objc
    public var forceVisionPrediction: Bool
  • Declaration

    Swift

    public static var defaults: FritzImageOptions