FritzVisionStyleModel

@objc(FritzVisionStyleModel)
public class FritzVisionStyleModel : NSObject
  • Number of predictions waiting to be run asynchronously

    Declaration

    Swift

    @objc
    public var pendingAsyncPredictions: Int { get set }
  • Initialize FritzStyleTransferModel with your own trained style model.

    Declaration

    Swift

    @objc(initWithModel:)
    public init(model: SwiftIdentifiedModel)

    Parameters

    model

    Fritz model to use.

  • Run Style Transfer on a FritzVisionImage.

    Declaration

    Swift

    @objc(predict:options:completion:)
    public func predict(_ fritzImage: FritzVisionImage, options: FritzVisionStyleModelOptions = .init(), completion: @escaping (CVPixelBuffer?, Error?) -> Void)

    Parameters

    fritzImage

    Image or buffer to run model on.

    options

    Options for model execution.

    completion

    The block to invoke after the prediction request. Contains a FritzVisionSegmentationResult or error message.

  • Run prediction on a style transfer model asynchronously on the given queue.

    Declaration

    Swift

    @objc(predict:options:queue:completion:)
    public func predict(_ fritzImage: FritzVisionImage, options: FritzVisionStyleModelOptions = .init(), queue: DispatchQueue, completion: @escaping (CVPixelBuffer?, Error?) -> Void)

    Parameters

    fritzImage

    Image or buffer to run model on.

    options

    Options for model execution.

    queue

    DispatchQueue to run prediction on. This will run as an async request on the queue.

    completion

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

  • Style Model based on Vincent Van Gogh’s Starry Night painting

    Declaration

    Swift

    @objc
    public static let starryNight: FritzVisionStyleModel
  • Style Model with shapes of pink and blue rhombuses.

    Declaration

    Swift

    @objc
    public static let pinkBlueRhombus: FritzVisionStyleModel
  • Style Model based on Edvard Munch’s The Scream painting.

    Declaration

    Swift

    @objc
    public static let theScream: FritzVisionStyleModel
  • Style Model based on Roy Lichtenstein’s Bicentennial Print from America: The Third Century

    Declaration

    Swift

    @objc
    public static let bicentennialPrint: FritzVisionStyleModel
  • Style Model based on Claude Monet’s The Poppy Field painting.

    Declaration

    Swift

    @objc
    public static let poppyField: FritzVisionStyleModel
  • Style Model based on an image depicting the view through a kaleidoscope.

    Declaration

    Swift

    @objc
    public static let kaleidoscope: FritzVisionStyleModel
  • Style Model based on Picasso’s Les Femmes d'Alger painting.

    Declaration

    Swift

    @objc
    public static let femmes: FritzVisionStyleModel
  • Style Model based on Joseph Kutter’s Head of a Clown painting.

    Declaration

    Swift

    @objc
    public static let headOfClown: FritzVisionStyleModel
  • Style Model based on Giorgio de Chirico’s Horses on the Seashore painting

    Declaration

    Swift

    @objc
    public static let horsesOnSeashore: FritzVisionStyleModel
  • Style Model based on Sidney Nolan’s The Trial painting.

    Declaration

    Swift

    @objc
    public static let theTrial: FritzVisionStyleModel
  • Style Model based on Gino Severini’s Ritmo Plastico painting.

    Declaration

    Swift

    @objc
    public static let ritmoPlastico: FritzVisionStyleModel
  • A list of all Style Models.

    Declaration

    Swift

    @objc(allModels)
    public static func allModels() -> [FritzVisionStyleModel]