MLKitImageLabelingCustom Framework Reference

CustomImageLabelerOptions

class CustomImageLabelerOptions : CommonImageLabelerOptions

Configurations for a custom-model image labeler.

  • The maximum number of labels to return for an image. Must be positive. If unset or an invalid value is set, the default value of 10 is used.

    Declaration

    Swift

    var maxResultCount: Int { get set }
  • Initializes a CustomImageLabelerOptions instance using the given LocalModel with the confidenceThreshold property set to nil. If that remains unset, it will use the confidence threshold value included in the model metadata, if available. If that does not exist, a value of 0.0 will be used instead.

    Declaration

    Swift

    init(localModel: MLKLocalModel)

    Parameters

    localModel

    A custom image labeling model stored locally on the device.

    Return Value

    A new instance of CustomImageLabelerOptions with the given LocalModel.

  • Initializes a CustomImageLabelerOptions instance using the given CustomRemoteModel with the confidenceThreshold property set to nil. If that remains unset, it will use the confidence threshold value included in the model metadata, if available. If that does not exist, a value of 0.0 will be used instead.

    Declaration

    Swift

    init(remoteModel: MLKCustomRemoteModel)

    Parameters

    remoteModel

    A custom image labeling model stored remotely on the server and downloaded to the device.

    Return Value

    A new instance of CustomImageLabelerOptions with the given CustomRemoteModel.

  • Unavailable.