| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Ready in ~10 minutes (after Drive download):
- Put runtime under lib\cpu\ → 2) pip install -r requirements.txt → 3) run.bat → 4) Postman or run_demo.bat.
Jump: Download runtime · Start the API · About SDK
FacePlugin Face Liveness SDK detects presentation attacks (photo, screen, print, replay) from a single RGB face image.
This repository is standalone. Download the runtime into this repo and run — no other FacePlugin repository is required.
This is an on-premise FacePlugin SDK. All processing stays on your machine — no biometric data is sent to FacePlugin cloud.
Windows product: native x64 runtime + local HTTP API and Gradio demo. (No Docker on Windows — use FaceLiveness-Linux-App for Docker.)
API server — test with Postman, curl, or the local Gradio demo (demo.py).
| Feature | Supported |
|---|---|
| RGB liveness (all engines combined) | ✓ |
| Photo / screen / print / replay PAD | ✓ |
| Score, Real/Spoof, pass | ✓ |
| CPU inference | ✓ |
Score ≥ 0.5 → result: "Real", pass: true. Score < 0.5 → result: "Spoof", pass: false.
| Platform | Repository |
|---|---|
| Android | FaceLiveness-Android-App |
| iOS | FaceLiveness-iOS-App |
| Windows | FaceLivenessDetection-Windows |
| Linux / Docker | FaceLiveness-Linux-App |
| Step | What you need |
|---|---|
| 1 | Windows 10/11 x64, Python 3.10+ |
| 2 | Runtime libraries in ./lib/cpu/ — see Download runtime libraries |
| 3 | You do not need a license to start the API for the first time. Simply launch it without a key, then locate the machine code ( FPMC1.…) in the logs or via GET /api/machinecode. Submit this code to FacePlugin(contact) to get activation key ( FP1.…) and unlock product endpoints. |
You do not need a license to start the API once. Product endpoints unlock after you activate.
| Item | Minimum | Recommended |
|---|---|---|
| OS | Windows 10 x64 | Windows 11 x64 |
| CPU | 4 cores | 8 cores |
| RAM | 4 GB | 8 GB |
| Disk | 4 GB | 8 GB |
The ./lib/cpu/ tree is intentionally empty on GitHub because native binaries and model files are too large.
FaceLiveness-Windows-App runtime (Google Drive)
Download library files into ./lib/cpu/.
The Windows product is CPU-only — there is no gpu\ package.
git clone https://github.com/Faceplugin-ltd/FaceLivenessDetection-Windows.git
cd FaceLivenessDetection-WindowsCorrect layout:
FaceLivenessDetection-Windows/
└── lib/
└── cpu/
├── FaceLivenessSDK.dll
├── fal-eng.dll
├── fal.fpk
└── ... (VC++ redist and other runtimes from Drive)
Wrong layout: lib\cpu\SomeFolder\FaceLivenessSDK.dll (a nested folder breaks local runs).
dir lib\cpu\FaceLivenessSDK.dll
dir lib\cpu\fal-eng.dll
dir lib\cpu\fal.fpkIf those paths exist, you are ready to start.
The VC++ runtime DLLs ship inside lib\cpu\. You do not install vcredist. run.bat puts that folder on PATH.
You can start without a license — the server prints your machine code on startup.
pip install -r requirements.txt
run.batThe API starts even if activation fails. Copy the machine code (FPMC1.…) from the log and send it to FacePlugin. When prompted, paste your FP1. license key (or skip and activate later).
Licenses are offline and bound to your machine. Offline cryptography is pre-packaged within the SDK—no third-party licensing libraries or external OpenSSL installations are required.
:: After run run.bat, paste the FP1. key on terminal like top screenshot. This is the easiest way and you can try 3 times.
:: Paste the FP1. key into .\license.txt (overwrite the file), then:
curl -s -X POST http://127.0.0.1:8084/api/activate -H "Content-Type: text/plain" --data-binary @license.txt
:: Or stop the process (Ctrl+C), save license.txt, and run run.bat againcurl -s http://127.0.0.1:8084/api/healthcurl -s -X POST http://127.0.0.1:8084/api/liveness -H "Content-Type: application/json" -d "{\"image\":\"<base64-jpeg>\"}"Success data:
{ "score": 0.72, "result": "Real", "pass": true }Import postman/FaceLiveness-API.postman_collection.json.
Default base URL: http://127.0.0.1:8084
Canonical protocol: /api/* (see FacePlugin Protocol). No version segment in route paths.
For a simple browser test UI (API must already be running on port 8084):
pip install -r requirements-demo.txt
run_demo.batOr (CMD):
set DEMO_PORT=9004
set API_BASE=http://127.0.0.1:8084
python demo.pyPowerShell:
$env:DEMO_PORT = "9004"
$env:API_BASE = "http://127.0.0.1:8084"
python demo.pyOpen http://127.0.0.1:9004. Samples: assets/examples/samples/.
Each run shows Score, Result (Real or Spoof), and Pass.
Use the Python bindings in sdk.py. Return code 0 means success.
import sdk
machine_code = sdk.get_machine_code() # FPMC1.…
sdk.activate("license.txt")
sdk.init_sdk()
result = sdk.liveness(base64_image)result is JSON. data is { "score": <float>, "result": "Real" | "Spoof", "pass": <bool> }. All RGB engines are always run and combined.
HTTP endpoints: /api/health, /api/machinecode, /api/backend, /api/activate, /api/liveness, /api/check_liveness.
| Back | FazBrowse Home | New Git URL |