C# Face ID API

OneML model for face verification and face identification.

OneML.Face.FaceId : public global.SystemIDisposable

Public Functions

inline void Dispose()

Gracefully destroy the object and free memory.

inline FaceId(LicenseManager manager)

Construct a FaceId object.

Parameters
  • manager: LicenseManager instance.

inline FaceId(FaceEmbedder embedder, LicenseManager manager)

Construct a FaceId object.

Parameters
  • embedder: FaceEmbedder instance.

  • manager: LicenseManager instance.

inline FaceIdResultList Predict(ImageBatch imgs)

makes a prediction.

Return

an instance of FaceIdResultList.

Parameters

inline FaceIdResultList Predict(ImageBatch imgs, float same_person_dist_threshold)

makes a prediction.

Return

an instance of FaceIdResultList.

Parameters
  • imgs: an instance of ImageBatch.

  • same_person_dist_threshold: same person dist threshold

inline FaceIdResult Predict(Image img)

makes a prediction.

Return

an instance of FaceIdResult.

Parameters
  • img: an instance of Image.

inline FaceIdResult Predict(Image img, float same_person_dist_threshold)

makes a prediction.

Return

an instance of FaceIdResult.

Parameters
  • img: an instance of Image.

  • same_person_dist_threshold: same person dist threshold

inline bool IsTheSamePerson(Image img1, Image img2)

checks whether the two Image’s are of the same person.

Return

bool.

Parameters
  • img1: Image of the first person to compare.

  • img2: Image of the second person to compare.

inline bool IsTheSamePerson(Image img1, Image img2, float same_person_dist_threshold)

checks whether the two Image’s are of the same person.

Return

bool.

Parameters
  • img1: Image of the first person to compare.

  • img2: Image of the second person to compare.

  • same_person_dist_threshold: same person dist threshold

inline SamePersonResult IsTheSamePerson(Embedding face_emb, Image img)

checks whether the given embedding face_emb is the same person as the one in Image.

Return

an instance of SamePersonResult..

Parameters
  • face_emb: an embedding representing the registered user.

  • img: Image of the second person to compare.

inline SamePersonResult IsTheSamePerson(Embedding face_emb, Image img, float same_person_dist_threshold)

checks whether the given embedding face_emb is the same person as the one in Image.

Return

an instance of SamePersonResult..

Parameters
  • face_emb: an embedding representing the registered user.

  • img: Image of the second person to compare.

  • same_person_dist_threshold: same person dist threshold

inline int RegisterId(string id, Embedding face_emb)

registers an id with embedding face_emb.

Return

an embedding size.

Parameters
  • id: string id of the registered user.

  • face_emb: an embedding representing the registered user.

inline Embedding RegisterId(string id, ImageBatch imgs, bool avg_emb)

registers an id with an ImageBatch.

Return

an instance of EmbeddingList.

Parameters
  • id: string id of the registered user.

  • imgs: a batch of images representing the registered user.

  • avg_emb: a boolean whether to average all images in ImageBatch as face embedding.

inline Embedding RegisterId(string id, Image img)

registers an id with an Image.

Return

an instance of Embedding.

Parameters
  • id: string id of the registered user.

  • img: an image representing the registered user.

inline IdList GetIds()

gets all user ids in the gallery.

Return

an instance of IdList representing all user ids in the gallery.

OneML.Face.FaceIdResult : public global.SystemIDisposable

Public Functions

inline void Dispose()

Gracefully destroy the object and free memory.

inline int GetReturnStatus()

returns return status.

Return

an int return status.

OneML.Face.FaceIdResultList : public global.SystemIDisposable , public global.SystemCollections.IEnumerable , public global::SystemCollections::Generic::IEnumerable< FaceIdResult >

Public Functions

inline void Dispose()

Gracefully destroy the object and free memory.

FaceIdResultListEnumerator : public global.SystemCollections.IEnumerator , public global::SystemCollections::Generic::IEnumerator< FaceIdResult >

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 FaceIdStatus

Values:

enumerator Empty
enumerator Success
enumerator Fail