The Problem
Face recognition typically means sending biometric data to a cloud API, which creates privacy, latency, and compliance problems for access control, kiosks, and identity verification. This SDK positions itself as a fully on-premise alternative: detection, landmarking, and feature extraction all run locally with no network calls.
What This Does
It is a Python face pipeline built on PyTorch. face_detect/ contains an SSD-style detector (mb_tiny_RFB_fd.py, ssd.py, predictor.py) with pretrained weights in face_detect/models/pretrained/version-slim-320.pth. face_feature/GetFeature.py extracts embeddings via irn50_pytorch.py (weights in irn50_pytorch.npy). face_landmark/GetLandmark.py runs MobileFaceNet.py with vfl_1.02_578_6.734591484069824.pth.tar. face_util/faceutil.py wraps compiled C libraries (FaceUtil.dll, libFaceUtil.so) for the heavy lifting. The README claims liveness, anti-spoofing, expression, and attribute support, but the file structure only shows detection, landmarks, pose, and feature extraction.
How It Is Wired
Execution starts at run.py. It calls into face_detect/detect_imgs.py to get bounding boxes, then face_feature/GetFeature.py for embeddings, face_landmark/GetLandmark.py for landmarks, and face_pose/GetPose.py for pose angles. Similarity comparison routes through face_util/faceutil.py, which calls into the native DLL/so. The README's quick-start imports from face_recognition_sdk import FaceRecognition, but no such module exists in the file listing — the documented API does not match the actual code, so a reader following the README will hit an import error. The real API surface is whatever run.py and faceutil.py expose. Binary weights and native libraries are committed directly to the repo, so there is no model download step, but also no provenance or rebuild path for those artifacts.
How To Use It
The README documents these steps verbatim:
conda create -n facesdk python=3.9
conda activate facesdk
pip install -r requirements.txt
python run.py
There is no config file and no documented environment variables. The only runtime inputs are the test images in test/ (1.jpg, 2.png). The README's GetImageInfo(image_path, faceMaxCount) and get_similarity(feature1, feature2) calls are the intended interface, but they are not importable as shown — you would need to read run.py to find the actual callable names.
Real-World Use
A lobby kiosk that enrolls an employee's face once, stores the embedding locally, and compares each new capture against it on the same machine. No biometric data leaves the device, which keeps the deployment inside the privacy boundary a customer's security team would demand. The pipeline is: detect face → extract embedding → compare against stored template with a similarity threshold (the README uses 75).
Code Health & Issues
- High - README API mismatch - the documented
face_recognition_sdkimport andFaceRecognitionclass do not exist in the file structure; the actual entry isrun.py. - Med - No CI/CD - no
.github/or CI config, so nothing gates regressions. - Med - No LICENSE file - the README claims "open source" but the repo ships no license terms; redistribution rights are unclear.
- Med - No automated tests - the two "test" files are images (
test/1.jpg,test/2.png), not test code. - Low - No dependency lockfile - only
requirements.txt, so installs are not reproducible. - Low - Binary artifacts in git -
.pth,.npy,.dll, and.sofiles are committed; repo size and provenance are concerns.
The Bottom Line
A functional demo of the upstream Faceplugin pipeline (2008-star parent repo) with the core detect → embed → compare flow intact. The README oversells the API surface and the license is ambiguous, so treat it as a reference implementation for wiring a local face pipeline, not as a drop-in SDK. Before production use, align the documentation with the real entry points and confirm licensing with the upstream project.