C++ Face Embedder API

oneML model to embed faces in images, returning faces as vectors.

class oneML::face::FaceEmbedder : public oneML::oneMLAPI

The oneML FaceEmbedder API object.

Class to create and use oneML face embedding model.

Public Functions

explicit FaceEmbedder(oneML::LicenseManager &manager)

Construct a FaceEmbedder object.

Parameters

ReturnStatus embed(const MultiImage &imgs, std::vector<FaceEmbedderResult> &results, bool flip = false)

create embedding vector

Return

ReturnStatus: status of operation

Parameters
  • [in] imgs: vector of raw images

  • [out] results: vector of result objects

  • [in] flip: flag to enable flipped image embedding. If true, returns the average between the original and flipped image embeddings. Default to false.

ReturnStatus embed(const Image &img, FaceEmbedderResult &result, bool flip = false)

create embedding vector

Return

ReturnStatus: status of operation

Parameters
  • [in] img: raw image

  • [out] result: result object

  • [in] flip: flag to enable flipped image embedding. If true, returns the average between the original and flipped image embeddings. Default to false.

class oneML::face::FaceEmbedderResult : public oneML::oneMLResult

The result object for oneML FaceEmbedder API.

Helper class to access all the results from an API call.

Public Functions

void get_embedding(Embedding &array) const

get embedding vector

Parameters
  • [out] array: embedding

int get_size() const

get embedding size

Return

int: embedding size

oneML::face::FaceEmbedderStatus get_return_status() const

get return status

Return

return status

enum oneML::face::FaceEmbedderStatus

A FaceEmbedderStatus enum to use as return status.

Values:

enumerator Empty

Default return status.

enumerator Success

Success.

enumerator Fail

Fail.