C# Face Embedder API

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

OneML.Face.FaceEmbedder : public global.SystemIDisposable

Public Functions

inline void Dispose()

Gracefully destroy the object and free memory.

inline FaceEmbedder(LicenseManager manager)

Construct a FaceEmbedder object.

Parameters
  • manager: LicenseManager instance.

inline FaceEmbedderResultList Embed(ImageBatch imgs, bool flip)

Create embedding vector.

Return

an instance of FaceEmbedderResultList.

Parameters
  • imgs: an instance of ImageBatch.

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

inline FaceEmbedderResultList Embed(ImageBatch imgs)

Create embedding vector.

Return

an instance of FaceEmbedderResultList.

Parameters

inline FaceEmbedderResult Embed(Image img, bool flip)

Create embedding vector.

Return

an instance of FaceEmbedderResult.

Parameters
  • img: an instance of Image.

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

inline FaceEmbedderResult Embed(Image img)

Create embedding vector.

Return

an instance of FaceEmbedderResult.

Parameters
  • img: an instance of Image.

OneML.Face.FaceEmbedderResult : public global.SystemIDisposable

Public Functions

inline void Dispose()

Gracefully destroy the object and free memory.

inline Embedding GetEmbedding()

Get an embedding of size EMB_SIZE.

Return

an embedding of type float[EMB_SIZE]

inline int GetReturnStatus()

returns return status.

Return

an int return status.

OneML.Face.FaceEmbedderResultList : public global.SystemIDisposable , public global.SystemCollections.IEnumerable , public global::SystemCollections::Generic::IEnumerable< FaceEmbedderResult >

Public Functions

inline void Dispose()

Gracefully destroy the object and free memory.

FaceEmbedderResultListEnumerator : public global.SystemCollections.IEnumerator , public global::SystemCollections::Generic::IEnumerator< FaceEmbedderResult >

Note that the IEnumerator documentation requires an InvalidOperationException to be thrown whenever the collection is modified.

This has been done for changes in the size of the collection but not when one of the elements of the collection is modified as it is a bit tricky to detect unmanaged code that modifies the collection under our feet.

Enums

enum FaceEmbedderStatus

Values:

enumerator Empty
enumerator Success
enumerator Fail