MediaPipeTasksVision Framework Reference

MPPEmbeddingResult


@interface MPPEmbeddingResult : NSObject

Represents the embedding results of a model. Typically used as a result for embedding tasks.

  • An Array of MPPEmbedding objects containing the embedding results for each head of the model.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<MPPEmbedding *> *_Nonnull embeddings;
  • @brief The optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results. This is only used for embedding extraction on time series (e.g. audio embedder). In these use cases, the amount of data to process might exceed the maximum size that the model can process. To solve this, the input data is split into multiple chunks starting at different timestamps.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger timestampInMilliseconds;
  • Initializes a new MPPEmbedding with the given array of embeddings and timestamp (in milliseconds).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithEmbeddings:
                                (nonnull NSArray<MPPEmbedding *> *)embeddings
                       timestampInMilliseconds:(NSInteger)timestampInMilliseconds;

    Parameters

    embeddings

    An Array of MPPEmbedding objects containing the embedding results for each head of the model.

    timestampInMilliseconds

    The optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results. Pass 0 if timestamp is absent.

    Return Value

    An instance of MPPEmbeddingResult initialized with the given array of embeddings and timestamp (in milliseconds).

  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    + (instancetype)new NS_UNAVAILABLE;