FlexibleModelDimensions

@objc(FlexibleModelDimensions)
public class FlexibleModelDimensions : NSObject

Specify dimensions for how to run flexible model. Calling init with no arguments will cause the model to run on original file size.

  • Declaration

    Swift

    public let size: CGSize?
  • Declaration

    Swift

    @objc(init)
    override public init()
  • Declaration

    Swift

    @objc(initWithSize:)
    public init(size: CGSize)
  • Declaration

    Swift

    @objc(initWithWidth:withHeight:)
    public init(width: Int, height: Int)
  • Use original image dimensions. Model will throw an error if image dimensions are not within range of acceptable input sizes.

    Declaration

    Swift

    public static let original: FlexibleModelDimensions
  • Declaration

    Swift

    public static let lowResolution: FlexibleModelDimensions
  • Declaration

    Swift

    public static let mediumResolution: FlexibleModelDimensions
  • Declaration

    Swift

    public static let highResolution: FlexibleModelDimensions