MLKitImageLabelingCommon 框架参考

MLKImageLabel


@interface MLKImageLabel : NSObject

表示图片的标签。

  • 分类器模型返回的标签文本。

    声明

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull text;
  • 标签的索引。

    声明

    Objective-C

    @property (nonatomic, readonly) NSInteger index;
  • 标签的置信度。其范围取决于所使用的分类器模型,但按照惯例,它应为 [0, 1]。对于使用 ImageLabelerOptions 创建的 ImageLabeler,范围为 [0, 1]。

    声明

    Objective-C

    @property (nonatomic, readonly) float confidence;
  • 不可用。

    声明

    Objective-C

    - (nonnull instancetype)init;