FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Faceplugin-ltd/FaceLivenessDetection-Windows: On-premise Windows Face Liveness SDK for detecting presentation attacks (photo, screen, print, replay) from a single RGB image. Local HTTP REST API + Python bindings. No cloud, full data privacy. Ideal for KYC, access control, and identity verification. · GitHub

Repository files navigation

🌐 Company Site - Here

🤗 Hugging Face - Here

🛟 Help Center - Here

🐳 Docker Hub - Here

Face Liveness SDK — Windows (Fully On-Premise)

Ready in ~10 minutes (after Drive download):

  1. 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

Introduction

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).

◾ Main Functionalities

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.

◾ Product List

Platform Repository
Android FaceLiveness-Android-App
iOS FaceLiveness-iOS-App
Windows FaceLivenessDetection-Windows
Linux / Docker FaceLiveness-Linux-App

Before you start

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.

System requirements

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

Download runtime libraries (lib folder)

The ./lib/cpu/ tree is intentionally empty on GitHub because native binaries and model files are too large.

Where to download

FaceLiveness-Windows-App runtime (Google Drive)

Download library files into ./lib/cpu/.

The Windows product is CPU-only — there is no gpu\ package.

How to place files into ./lib/cpu/

  1. Clone the repo (if you have not already):
git clone https://github.com/Faceplugin-ltd/FaceLivenessDetection-Windows.git
cd FaceLivenessDetection-Windows
  1. Open the Google Drive folder above.
  2. Download all files in that folder (Drive: select all → Download, or download as a zip).
  3. Put every file directly into .\lib\cpu\ — not inside a nested subfolder.

Correct 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).

  1. Quick check:
dir lib\cpu\FaceLivenessSDK.dll
dir lib\cpu\fal-eng.dll
dir lib\cpu\fal.fpk

If 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.

Start the API

You can start without a license — the server prints your machine code on startup.

pip install -r requirements.txt
run.bat

API: http://127.0.0.1:8084

The 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).

SDK License

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.

How to get a license

  1. Start the server (above). A license is not required for the first start.
  2. Copy the machine code from the terminal. It looks like FPMC1.….
  3. Send that machine code to FacePlugin (contact). We will issue a license key for that code.
  4. Activate with the license key — either paste it when run.bat prompts you (see screenshot above), or:
:: 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 again

Try it

Health

curl -s http://127.0.0.1:8084/api/health

Liveness

curl -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 }

Documentation

https://doc.faceplugin.com

Postman

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.

Demo UI (Gradio) — local only

For a simple browser test UI (API must already be running on port 8084):

pip install -r requirements-demo.txt
run_demo.bat

Or (CMD):

set DEMO_PORT=9004
set API_BASE=http://127.0.0.1:8084
python demo.py

PowerShell:

$env:DEMO_PORT = "9004"
$env:API_BASE = "http://127.0.0.1:8084"
python demo.py

Open http://127.0.0.1:9004. Samples: assets/examples/samples/.

Each run shows Score, Result (Real or Spoof), and Pass.

About SDK

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.


List of our Products

Contact

About

On-premise Windows Face Liveness SDK for detecting presentation attacks (photo, screen, print, replay) from a single RGB image. Local HTTP REST API + Python bindings. No cloud, full data privacy. Ideal for KYC, access control, and identity verification.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL