![]() |
Face Recognition Engine
1.0
|
The Face Recognition Engine is a software library designed to perform face recognition and assign IDs to new faces. The system uses OpenCV and neural network models to detect faces in an image, extract unique feature vectors from them, and compare these features to identify individuals.
core::face::FaceDetectorYunet: This class uses OpenCV's DNN-supported FaceDetectorYN model to perform the initial detection of faces in an image, providing their locations and landmarks.
core::face::FaceMesh: After initial detection, this class can generate a detailed facial mesh, providing a rich set of landmark points for tasks like alignment.
Feature Extraction: Once a face is detected and aligned, the FaceRecognitionSFace class extracts a unique mathematical feature vector (embedding) that represents the face's identity.
core::face::FeatureComparisonResult: A simple structure that holds the result of a comparison between two facial features, containing the calculated distance and a boolean indicating if they are a match. The comparison itself determines if two faces belong to the same person by calculating the distance between their feature vectors.
FaceRecognitionEngine::init(resourcePath) initializes the engine, loading all necessary models and resources.FaceRecognitionEngine::process(input, output) runs the full pipeline on an input image: detecting faces, extracting features, comparing them, and generating a visualized output image.FaceRecognitionSFace::extractFeatures(image, detection) takes an image and a detected face and returns the detection object populated with the extracted feature vector.FaceRecognitionSFace::compareFeatures(f1, f2) compares the feature vectors of two detection objects and returns a result indicating the distance and whether they match.FaceDetectorYunet::process(frame) detects all faces in an image frame and returns a vector of Detection objects.The project files are organized in the C:/Projects/Engine/AntalEngine/Engine directory. Key header files include:
Detection struct definition.