MLKitObjectDetectionCommon Framework Reference

Stay organized with collections Save and categorize content based on your preferences.

MLKObjectLabel


@interface MLKObjectLabel : NSObject

A 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 ObjectDetector created with ObjectDetectorOptions, the range is [0, 1].

    Declaration

    Objective-C

    @property (nonatomic, readonly) float confidence;
  • Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;