.NET API Documentation

FaceVerifier class

class FaceVerifier

The Face Verifier class

FaceVerifier(string model_file, int max_concurrency)

FaceVerifier constructor: loads model file, sets up the processing.

Parameters:
  • model_file (string) – path for the used model.

  • max_concurrency (int) – maximum allowed concurrency, 0 means automatic (using all cores), default: 0

DetectFaces(ImageHeader img_hdr)

Detects the faces on an image. This method is async.

Parameters:

image (ImageHeader) – image of the face(s).

Return type:

Task<DetectResultsOrError>

EmbedFace(Face face)

Returns the embedding of the detected face.

Parameters:

face (Face) – face to embed.

Return type:

Task<EmbedResultsOrError>

CompareFaces(float[] emb1, float[] emb2)
Parameters:
  • emb1 (float[]) – embeddings of the 1st face.

  • emb2 (float[]) – embeddings of the 2nd face.

Return type:

float

Result classes

Faces

class Faces

Result wrapper class for internal Face list

Count()

Gets the number of Face objects held.

GetFace(int idx)

Gets one Face object from the internal list

Parameters:

idx (int) – index of Face object.

Return type:

Face

Face

class Face
GetBoundingBox()

Returns the bounding box of the detected face.

Return type:

BoundingBox

GetConfidence()

Returns the confidence value of the detected face.

Return type:

float

BoundingBox

class BoundingBox

The BoundingBox class

x: int

X coordinate of the top left corner.

y: int

Y coordinate of the top left corner.

width: int

Width of the bounding box.

height: int

Height of the bounding box.