VisionOnDeviceAutoMLImageLabelerOptions

class VisionOnDeviceAutoMLImageLabelerOptions : NSObject

Options for an on-device image labeler using models generated by AutoML.

  • The confidence threshold for labels returned by the image labeler. Labels returned by the image labeler will have a confidence level higher or equal to the given threshold. Values must be in range [0, 1]. If unset or an invalid value is set, the default threshold of 0.5 is used. There is no limit on the maximum number of labels returned by an on-device image labeler.

    Declaration

    Swift

    var confidenceThreshold: Float { get set }
  • Creates a new instance of VisionOnDeviceAutoMLImageLabelerOptions with the given localModel.

    Declaration

    Swift

    init(localModel: AutoMLLocalModel)

    Parameters

    localModel

    The AutoML Vision Edge model stored locally on the device. If nil is passed, raises FIRInvalidAutoMLLocalModel.

    Return Value

    VisionOnDeviceAutoMLImageLabelerOptions instance with the given localModel.

  • Creates a new instance of VisionOnDeviceAutoMLImageLabelerOptions with the given remoteModel.

    It is recommended that the AutoMLRemoteModel be downloaded before creating a new instance of VisionOnDeviceAutoMLImageLabeler. To download the remote model, invoke the ModelManager‘s download(_:conditions:) method and monitor the returned Progress and/or listen for the download notifications defined in FIRModelDownloadNotifications.h.

    Declaration

    Swift

    init(remoteModel: AutoMLRemoteModel)

    Parameters

    remoteModel

    The AutoML Vision Edge model hosted on the server. If nil is passed, raises FIRInvalidAutoMLRemoteModel.

    Return Value

    VisionOnDeviceAutoMLImageLabelerOptions instance with the given remoteModel.

  • Unavailable.