AI-generated Key Takeaways
-
MLKCustomImageLabelerOptionsconfigures custom-model image labelers, controlling aspects like the maximum number of returned labels. -
It allows initialization with either a local or remote custom image labeling model, setting a default confidence threshold if not explicitly defined.
-
maxResultCountproperty dictates the maximum number of labels to be returned, defaulting to 10 if unset or invalid. -
Initialization methods accept
MLKLocalModelfor local models andMLKCustomRemoteModelfor remote models, handling confidence thresholds based on model metadata.
MLKCustomImageLabelerOptions
@interface MLKCustomImageLabelerOptions : MLKCommonImageLabelerOptionsConfigurations 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
Objective-C
@property (nonatomic) NSInteger maxResultCount; -
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
Objective-C
- (nonnull instancetype)initWithLocalModel:(nonnull MLKLocalModel *)localModel;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
Objective-C
- (nonnull instancetype)initWithRemoteModel: (nonnull MLKCustomRemoteModel *)remoteModel;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.
Declaration
Objective-C
- (nonnull instancetype)init;