A Free, Privacy-Focused Face Recognition Solution for Windows and Linux
Built with deep learning technology, featuring face detection, facial landmarks, feature extraction, and face similarity comparison.
The Open Source Face Recognition SDK is a free, privacy-focused solution designed to integrate face recognition capabilities into applications running on Windows and Linux.
This is updated version of faceplugin SDK by further training.
We evaluated the face recognition model developed by Nataphong-Lab against the original open-source model from FacePlugin across five widely recognized face verification benchmark datasets.
Nataphong-Lab builds upon FacePlugin's open-source recognition model, applying additional training and model optimization to improve recognition performance.
| Benchmark Dataset | Nataphong-Lab | FacePlugin | Improvement |
|---|---|---|---|
| LFW | 98.50% | 89.20% | +9.30 pp |
| CFP-FP | 99.10% | 90.10% | +9.00 pp |
| AgeDB-30 | 99.20% | 76.80% | +22.40 pp |
| CALFW | 98.10% | 80.30% | +17.80 pp |
| CPLFW | 96.50% | 78.90% | +17.60 pp |
| Average | 98.28% | 83.06% | +15.22 pp |
pp = percentage points.
- 98.28% average benchmark accuracy across five datasets.
- 15.22 percentage-point average improvement over the FacePlugin baseline.
- Consistent improvements across all five evaluated datasets.
- Particularly strong performance on AgeDB-30, CALFW, and CPLFW.
| Dataset | Evaluation Focus |
|---|---|
| LFW | Unconstrained face verification |
| CFP-FP | Frontal-to-profile face verification |
| AgeDB-30 | Cross-age face verification |
| CALFW | Cross-age face verification with similar appearance |
| CPLFW | Cross-pose face verification |
The comparison uses the face recognition models from the following repositories:
- Nataphong-Lab: Open-Source-Face-Recognition-Ultimate
- FacePlugin: Open-Source-Face-Recognition-SDK
For reproducible comparisons, both models should be evaluated using identical dataset splits, image preprocessing, face alignment, verification protocols, and evaluation metrics.
Note: The figures above are project-reported benchmark results. Independent reproduction and detailed evaluation configurations should be provided alongside the results.
Powered by deep learning models, this SDK provides face detection, facial feature extraction, and face similarity comparison through a simple Python interface.
Privacy is a priority: All biometric processing takes place locally, allowing applications to operate without sending facial data to external servers.
- π 100% On-Premise Processing: All face recognition operations run locally. No biometric data needs to leave your device.
- π― High Recognition Accuracy: Uses deep learning models with additional model training and optimization.
- β‘ Real-Time Processing: Supports efficient face detection and recognition workflows.
- π§ Easy Integration: Simple Python APIs for application development.
- π Cross-Platform: Supports Windows and Linux.
- π» CPU and GPU Support: Can operate on CPU-only systems, with optional GPU acceleration where supported.
- π Completely Free: Open source with no SDK licensing fees.
- Face detection and bounding box extraction.
- Facial landmark detection.
- Facial feature embedding generation.
- Face similarity comparison.
- Multiple face detection within a single image.
- Support for common image formats, including JPG, PNG, BMP, and TIFF.
Before installing the SDK, make sure you have:
- Python 3.9 or higher.
- Anaconda or Miniconda (recommended).
- Windows or Linux operating system.
- Git (recommended).
git clone https://github.com/nataphong-lab/Open-Source-Face-Recognition-Ultimate.git
cd Open-Source-Face-Recognition-UltimateRun the following command from the repository directory:
winget install --id Python.Python.3.9 -e --source winget
powershell -Ep Bypass ./install.ps1conda create -n facesdk python=3.9 -y
conda activate facesdkpython run.pyThe following example demonstrates how to initialize the SDK, process an image, and retrieve facial information.
from face_recognition_sdk import FaceRecognition
# Initialize the SDK
face_sdk = FaceRecognition()
# Process an image
image_path = "path/to/your/image.jpg"
face_info = face_sdk.GetImageInfo(
image_path,
faceMaxCount=10
)
# Display detected faces
if face_info:
print(f"Detected {len(face_info)} face(s)")
for face in face_info:
print("Bounding Box:", face["bbox"])
print("Landmarks:", face["landmarks"])
print("Embedding:", face["embedding"])
else:
print("No faces detected.")Compare two facial images and calculate their similarity score.
from face_recognition_sdk import FaceRecognition
# Initialize the SDK
face_sdk = FaceRecognition()
# Input images
image1 = "test/1.jpg"
image2 = "test/2.png"
# Extract facial information
faces1 = face_sdk.GetImageInfo(image1, faceMaxCount=1)
faces2 = face_sdk.GetImageInfo(image2, faceMaxCount=1)
# Compare facial embeddings
if faces1 and faces2:
feature1 = faces1[0]["embedding"]
feature2 = faces2[0]["embedding"]
similarity = face_sdk.get_similarity(feature1, feature2)
print(f"Similarity: {similarity}%")
# Example threshold: 75
is_same_person = similarity >= 75
print(f"Same Person: {is_same_person}")
else:
print("Unable to detect a face in one or both images.")Note: The similarity threshold of 75 is an example configuration. The appropriate threshold should be validated against your application, dataset, and operating conditions.
Initializes the face recognition SDK.
face_sdk = FaceRecognition()Detects faces in an image and extracts facial information.
Parameters:
| Parameter | Type | Description |
|---|---|---|
image_path |
str |
Path to the input image. |
faceMaxCount |
int |
Maximum number of faces to detect. |
Returns:
A list of dictionaries containing facial information:
| Field | Description |
|---|---|
bbox |
Face bounding box coordinates. |
landmarks |
Facial landmark coordinates. |
embedding |
Extracted facial feature embedding. |
Compares two facial feature embeddings and returns a similarity score.
Parameters:
| Parameter | Type | Description |
|---|---|---|
feature1 |
array |
First facial feature embedding. |
feature2 |
array |
Second facial feature embedding. |
Returns:
A similarity score between 0 and 100, where higher values indicate greater similarity.
| Configuration | Value |
|---|---|
| Default similarity threshold | 75 (example) |
| Supported image formats | JPG, PNG, BMP, TIFF |
| Face detection | Multiple face detection |
| Processing | On-premise |
| Supported operating systems | Windows and Linux |
The SDK can be integrated into a wide range of applications.
- Access Control Systems: Face-based access control and identity verification.
- User Authentication: Biometric authentication for applications.
- Security Monitoring: Face detection and recognition workflows.
- Time & Attendance: Automated employee check-in and check-out.
- Customer Analytics: Face-based customer analysis, subject to applicable privacy requirements.
- Smart Offices: Visitor identification and management.
- Smart Devices: Face recognition integration for connected devices.
- Application Development: Biometric functionality for software applications.
- Augmented Reality: Face detection and facial landmark applications.
For questions, suggestions, collaboration, or technical support:
- Email: nataphong-lab@gmail.com
- GitHub: nataphong-lab