MLKitObjectDetectionCommon Framework Reference

  • ObjectLabel provides information about an object detected within an image, such as its description, index, and confidence level.

  • The text property offers a description of the detected object, which varies based on the classifier model used.

  • An index is assigned to each label for identification purposes.

  • The confidence property indicates the level of certainty that the label accurately describes the object, typically ranging from 0 to 1.

ObjectLabel

class ObjectLabel : NSObject

A label that describes an object detected in an image.

  • The text returned here depends on the classifier model used.

    Declaration

    Swift

    var text: String { get }
  • The index of the label.

    Declaration

    Swift

    var index: Int { get }
  • 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

    Swift

    var confidence: Float { get }
  • Unavailable.