AI-generated Key Takeaways
-
CustomImageLabelerOptionsconfigures custom-model image labelers, allowing you to specify the model and adjust settings. -
It allows you to set the maximum number of labels returned for an image, defaulting to 10 if unset.
-
You can initialize it with either a local or remote custom image labeling model.
-
The confidence threshold can be set directly or will default to the model's metadata, or 0.0 if unavailable.
CustomImageLabelerOptions
class CustomImageLabelerOptions : CommonImageLabelerOptionsConfigurations 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
10is used.Declaration
Swift
var maxResultCount: Int { get set } -
Initializes a
CustomImageLabelerOptionsinstance using the givenLocalModelwith theconfidenceThresholdproperty set tonil. 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 of0.0will be used instead.Declaration
Swift
init(localModel: MLKLocalModel)Parameters
localModelA custom image labeling model stored locally on the device.
Return Value
A new instance of
CustomImageLabelerOptionswith the givenLocalModel. -
Initializes a
CustomImageLabelerOptionsinstance using the givenCustomRemoteModelwith theconfidenceThresholdproperty set tonil. 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 of0.0will be used instead.Declaration
Swift
init(remoteModel: MLKCustomRemoteModel)Parameters
remoteModelA custom image labeling model stored remotely on the server and downloaded to the device.
Return Value
A new instance of
CustomImageLabelerOptionswith the givenCustomRemoteModel. -
Unavailable.