Mathematical Model
The FaceLog recognition pipeline relies on mathematical transformations that convert images into numerical representations.
These representations allow the system to compare faces using distance metrics.
Image Representation
An image is represented as a three-dimensional matrix:
Where:
- (m) = image height
- (n) = image width
- (3) = RGB color channels
Face Detection Using Convolution
Face detection relies on convolution operations applied across the image.
Where:
- (X) represents the image matrix
- (W) represents the convolution kernel
- (S(i,j)) represents the resulting feature map
This operation highlights visual patterns that indicate the presence of a face.
Embedding Generation
After detecting a face, the system generates an embedding vector using a neural network.
Where:
- (X) is the input face image
- (f_\theta) is the neural network
- (e) is the resulting embedding vector
Embeddings encode facial characteristics into a numerical representation.
Face Comparison
To determine whether two embeddings represent the same person, the system computes the Euclidean distance:
If the distance is sufficiently small, the embeddings are considered to represent the same individual.
Image Processing and Facial Recognition: - DeepFace v0.0.85: Library for facial analysis and recognition.