Python API Reference
Module
import realeyes.face_verification
Classes
FaceVerifier
The main entry point for face detection, embedding, and verification operations.
Constructor
FaceVerifier(model_file: str, max_concurrency: int = 0)
Loads the model file and sets up processing.
Methods
detect_faces
def detect_faces(self, image: numpy.ndarray[numpy.uint8]) -> list[Face]
Detects faces on an image.
Returns: list[Face] — the detected faces.
embed_face
def embed_face(self, face: Face) -> list[float]
Returns the embedding vector of a detected face.
Returns: list[float] — the face embedding vector.
compare_faces
def compare_faces(self, embedding1: list[float], embedding2: list[float]) -> Match
Compares two face embeddings.
Returns: Match
get_model_name
def get_model_name(self) -> str
Returns the name (version, etc.) of the loaded model.
Returns: str — model name.
Module Functions
get_sdk_version_string
def get_sdk_version_string() -> str
Returns the version string of the SDK (not the model version).
Returns: str — SDK version string.
Result Classes
Face
Represents a detected face with landmarks, bounding box, and quality information.
Constructor
Face(image: numpy.ndarray[numpy.uint8],
landmarks: list[Point2d],
bbox: BoundingBox = BoundingBox(x=0, y=0, width=0, height=0),
confidence: float = 0.0)
Creates a Face object to support 3rd party face detectors.
Methods
bounding_box
def bounding_box(self) -> BoundingBox
Returns: BoundingBox
confidence
def confidence(self) -> float
Returns: float — the detection confidence score.
detection_quality
def detection_quality(self) -> DetectionQuality
Returns: DetectionQuality
landmarks
def landmarks(self) -> list[Point2d]
Returns: list[Point2d] — the 5 facial landmarks.
Point2d
2D point for landmark coordinates.
Point2d(x: float, y: float)
BoundingBox
Bounding box for detected faces.
BoundingBox(x: int, y: int, width: int, height: int)
Match
Result of face comparison.
Enums
DetectionQuality
Detection quality indicator.