FritzVisionSegmentationModelOptions

@objc(FritzVisionSegmentationModelOptions)
public final class FritzVisionSegmentationModelOptions : NSObject, FritzImageOptions
  • Declaration

    Swift

    public static var defaults: FritzImageOptions
  • Crop and scale option. Default value is scaleFit.

    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 var 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