Page Summary
-
MLKObjectLabelprovides information about an object detected within an image, including its textual description, index, and confidence score. -
The
textproperty describes the detected object, whileindexserves as a unique identifier for the label. -
confidenceindicates the model's certainty about the label's accuracy, typically ranging from 0 to 1. -
Direct instantiation of
MLKObjectLabelis prohibited; it is designed for internal use within the ML Kit framework.
MLKObjectLabel
@interface MLKObjectLabel : NSObjectA label that describes an object detected in an image.
-
The text returned here depends on the classifier model used.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull text; -
The index of the label.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger index; -
The confidence that the label applies to the detected object. Its range depends on the classifier model used, but by convention it should be [0, 1]. For an
ObjectDetectorcreated withObjectDetectorOptions, the range is [0, 1].Declaration
Objective-C
@property (nonatomic, readonly) float confidence; -
Unavailable.
Declaration
Objective-C
- (nonnull instancetype)init;