Python Face Embedder API

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

oneML.faceAPI.FaceEmbedder : public object

The oneML FaceEmbedder API object.

Class to create and use oneML face embedding model.

Public Functions

__init__(self, manager)

Construct a FaceEmbedder object.

Parameters

embed_batch(self, imgvec_, flip=False)

Create embedding vector.

Return

FaceEmbedderResultVector: list of FaceEmbedderResult objects

Parameters
  • imgvec_: numpy array with shape (batch, height, width, channel)

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

embed(self, imgvec_, flip=False)

Create embedding vector.

Return

FaceEmbedderResult: result object

Parameters
  • imgvec_: numpy array with shape (height, width, channel)

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

oneML.faceAPI.FaceEmbedderResult : public object

The result object for oneML FaceEmbedder API.

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

Public Functions

get_size(self)

Get embedding size.

Return

int: size of embedding

get_embedding(self)

Get embedding vector.

Return

numpy array: embedding

get_return_status(self)

Get return status.

Return

int: return status

oneML.faceAPI.FaceEmbedderResultVector : public object
List of FaceEmbedderResult objects.
oneML.faceAPI.FaceEmbedderStatus_Empty = _oneMLfacePython.FaceEmbedderStatus_Empty
oneML.faceAPI.FaceEmbedderStatus_Success = _oneMLfacePython.FaceEmbedderStatus_Success
oneML.faceAPI.FaceEmbedderStatus_Fail = _oneMLfacePython.FaceEmbedderStatus_Fail