🌐 Company Site - Here
🤗 Hugging Face - Here
🛟 Help Center - Here
🐳 Docker Hub - Here
FacePlugin ID Document Recognition + Liveness Detection — Windows (Fully On-Premise)
Put runtime under lib\cpu\ → pip install -r requirements.txt → run.bat → Postman or run_demo.bat (~10 min after Drive download).
Jump: Quick start · Get the runtimes · Start the API · SDK License · Scan options · Setup · About SDK
Quick start
There is no Docker on this Windows product. For Linux / Docker Hub use ID-Document-Recognition-Docker. Docs: https://doc.faceplugin.com
Introduction
FacePlugin ID Document Recognition SDK for Windows is a fully on-premise identity verification engine for ID cards, passports, and driver licenses. It runs OCR, MRZ reading, barcode and QR extraction, document detection and classification, image quality analysis, face extraction from the document, optional NFC/RFID, and authenticity / document liveness (security) checks.
This repository is standalone. Download the Windows runtime into this repo and run — no other FacePlugin repository is required.
All processing stays on your PC. No biometric data is sent to FacePlugin cloud — built for KYC, eKYC, banking, and on-premise compliance workflows.
Windows product: native x64 runtime, local HTTP API, and a Gradio demo covering Fields, Liveness, Images, and Raw JSON, with every scan option in a Scan settings dialog.
API server — test with Postman, curl, or the local Gradio demo (python demo).
Main Functionalities
| Feature |
Supported |
| ID Card, Passport, and Driver License recognition |
✓ |
| MRZ, Barcode, QR, and OCR data extraction |
✓ |
| Document detection and type classification |
✓ |
| Auto-capture and image quality analysis |
✓ |
| Face, portrait, and signature extraction from document |
✓ |
| NFC / RFID chip reading (where available) |
✓ |
Product List
Product hubs: Face Recognition · Face Liveness Detection · ID Document Recognition · ID Document Liveness
Before you start
| Step |
What you need |
| 1 |
Windows 10/11 x64, Python 3.10+ |
| 2 |
Runtime libraries in ./lib/cpu/ — Get the runtimes |
| 3 |
You do not need a license to start the API the first time. Copy the machine code (FPMC1.…) from the logs or GET /api/machinecode. Send it to FacePlugin (contact) to get an FP1.… key 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 |
| CPU |
2 cores |
4 cores |
| RAM |
4 GB |
8 GB |
| Disk |
4 GB |
8 GB |
| OS |
Windows 10 x64 |
Windows 11 x64 |
Get the runtimes
The ./lib/cpu/ tree is empty on GitHub because native binaries and model files are too large.
DocumentReader is CPU-only — there is no gpu\ package.
DocumentReader Windows runtime (Google Drive)
- Clone the repo (if you have not already):
git clone https://github.com/Faceplugin-ltd/ID-Document-Recognition-LivenessDetection-Windows.git
cd ID-Document-Recognition-LivenessDetection-Windows
- Open the Google Drive folder above.
- Download all files in that folder (Drive: select all → Download, or download as a zip).
- Put every file directly into
.\lib\cpu\ — not inside a nested subfolder.
ID-Document-Recognition-Windows/
└── lib/
└── cpu/
├── DocumentReaderSDK.dll
├── dcf-eng.dll
├── dcf.fpk
└── ... (helper DLLs from Drive)
Wrong layout: lib\cpu\SomeFolder\DocumentReaderSDK.dll.
dir lib\cpu\DocumentReaderSDK.dll
dir lib\cpu\dcf-eng.dll
dir lib\cpu\dcf.fpk
The VC++ runtime DLLs ship inside lib\cpu\. You do not need to install vcredist. run.bat puts lib\cpu\ 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:8082
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.
- Start the server (above). A license is not required for the first start.
- Copy the machine code from the terminal. It looks like
FPMC1.….
- Send that machine code to FacePlugin (contact). We will issue a license key for that code.
- Activate with the license key — either paste it when
run.bat prompts you (see screenshot above), or:
:: After run.bat, paste the FP1. key on the terminal like the screenshot. You can try 3 times.
:: Or paste the FP1. key into .\license.txt, then:
curl -s -X POST http://127.0.0.1:8082/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
Use the machine code from the PC where you will deploy. Windows machine codes are unique to each PC.
License capabilities (Recognition + Liveness)
After activation, GET /api/licenseStatus reports what the key unlocks. The Gradio demo shows the same summary as License: … at the top of the page.
| Capability |
Meaning |
| Recognition |
OCR, MRZ, barcode/QR, and document type classification |
| Liveness (authenticity) |
Document authenticity: physical document, security patterns, photo origin, barcode format |
Typical labels:
- Recognition + Liveness — full identity verification (Fields + Liveness tabs)
- Recognition — OCR, MRZ, and barcode only; Security stays empty / not checked
- Liveness — authenticity / document liveness only; OCR/MRZ/barcode stays empty / not checked
- Not licensed — machine code only until you activate
Check status anytime:
curl -s http://127.0.0.1:8082/api/licenseStatus
Authenticity is not requested with a flag any more. documentProcess always runs the full pipeline — identity fields plus authenticity — and the license decides whether the security block comes back. Set verifyStrict if you want the stricter authenticity status. See Scan options.
Scan options
The public option surface is a keep-list. Send them under options (nested) or at the request root:
{ "images": [ { "image": "<BASE64>", "page_idx": 0 } ], "options": {} }
Empty {} — or no options at all — is the recommended full scan: full KYC identity + authenticity, all visual fields, all languages, and image QA on sharp + glare + cover.
| Key |
Full name |
What it does |
Default |
lang |
Languages to read |
Visual-zone OCR language filter, e.g. ["en","de-de"]. Omit or [] = no filter. |
all |
checks |
Image quality checks |
Any of sharp, glare, cover. [] sends no QA block (see note). |
all three on |
checksStrict |
Affect overall status |
A failed QA check fails the optical / overall status. |
false |
verifyStrict |
Stricter security status |
Stricter authenticity overall status. |
false |
photo.cropped |
Already cropped |
The image is already edge-cropped, so skip document locating. |
false |
fine.mergeNames |
Merge names across sources |
Prefer the longest name spelling when MRZ, barcode and OCR disagree. |
true |
fine.qa.minDpi |
Minimum DPI |
Image QA resolution floor. |
150 |
fine.qa.maxTilt |
Maximum tilt angle |
Perspective angle threshold, in degrees. |
10 |
fine.qa.margin |
Edge indent % |
Minimum gap between the document and the image edge, in percent. |
0 |
On checks: the list picks which of the three gates the SDK asks the engine for; bounds, perspective and resolution always come back, driven by the fine.qa thresholds. An empty list sends no image-QA block at all, so the engine falls back to its own built-in quality checks — it is not an off switch for imageQuality in the result.
Example — English-only OCR, stricter status, pre-cropped image:
{
"lang": ["en"],
"checks": ["sharp", "glare", "cover"],
"checksStrict": true,
"verifyStrict": true,
"photo": { "cropped": true },
"fine": { "mergeNames": true, "qa": { "minDpi": 150, "maxTilt": 10, "margin": 0 } }
}
Keys outside this list are ignored, so an old caller that sends use, want, verify, reply, dates, ageMin or a response flag block still scans — those keys simply do nothing. Legacy isCropped / alreadyCropped still map to photo.cropped. Full reference: SDK docs/DOCUMENT_SDK_API_MANUAL.md and CAPABILITIES.md.
Try it
Health
curl -s http://127.0.0.1:8082/api/health
Documentation
https://doc.faceplugin.com
Postman
Import [postman/DocumentReader-API.postman_collection.json](postman/DocumentReader-API.postman_collection.json).
Default base URL: http://127.0.0.1:8082
Canonical protocol: /api/*. No version segment in route paths.
Demo UI (Gradio) — local only
For a local FacePlugin Document Reader demo in the browser — Fields, Liveness, Images, and Raw JSON (API must already be running on port 8082):
pip install -r requirements-demo.txt
run_demo.bat
Or (CMD):
set DEMO_PORT=9082
set API_BASE=http://127.0.0.1:8082
python demo
Open http://127.0.0.1:9082. Examples when present: assets/examples/samples/. The header shows License: (for example Recognition + Liveness) from /api/licenseStatus.
Drop the front (and the back if the document has one) on the left, or pick a sample, then press Recognize. The result panel on the right has four tabs:
- Fields — document type, country, field cross-check, image quality, and OCR / MRZ / barcode fields
- Liveness — overall and per-page authenticity: photo origin, physical document, security patterns, barcode format (needs a Liveness-capable license)
- Images — portrait, signature, ghost portrait, barcodes, and cropped pages
- Raw JSON — the
requestOptions that were sent plus the full /api/documentProcess response, so you can copy a working body straight into your own integration
Scan settings dialog
Everything in Scan options is editable from the ⚙︎ Scan settings button, and a chip row under it shows the current selection without opening the dialog:
- Visual zone — Languages is a searchable multi-select listing every supported language by full name (type “german”, pick German (Germany)), not a token string. Leave it empty for all languages. Merge names across sources maps to
fine.mergeNames.
- Image quality — the
sharp / glare / cover gates, Affect the overall status (checksStrict), and the three thresholds: DPI, angle in degrees, and document position indent in percent.
- Other — Stricter security status (
verifyStrict) and Already edge-cropped (photo.cropped).
Press Done to apply. The exact options the demo sent are echoed under the verdict and in the Raw JSON tab.
Setup on your own app
Two paths. You do not need the Gradio demo in production.
HTTP (any language) — run Option A, B, or C, then call the API:
curl -s -X POST http://127.0.0.1:8082/api/documentRecognition \
-H 'Content-Type: application/json' \
-d '{"images":[{"image":"<BASE64>"}]}'
curl -s -X POST http://127.0.0.1:8082/api/documentLiveness \
-H 'Content-Type: application/json' \
-d '{"images":[{"image":"<BASE64>"}]}'
curl -s -X POST http://127.0.0.1:8082/api/documentProcess \
-H 'Content-Type: application/json' \
-d '{"images":[{"image":"<BASE64>"}],"options":{}}'
"options": {} runs the full default scan. To narrow it, send the keep-list keys from Scan options:
curl -s -X POST http://127.0.0.1:8082/api/documentProcess \
-H 'Content-Type: application/json' \
-d '{"images":[{"image":"<BASE64>"}],"options":{"lang":["en"],"checks":["sharp","glare","cover"],"verifyStrict":true}}'
Python in-process — keep lib/cpu/ beside [sdk.py](sdk.py):
import sdk
machine_code = sdk.get_machine_code() # FPMC1.…
sdk.activate("license.txt")
sdk.init_sdk()
result = sdk.document_process([{"image": base64_front}], rfid="", options={})
About SDK
Use the Python bindings in [sdk.py](sdk.py). Return code 0 means success.
import sdk
machine_code = sdk.get_machine_code()
print("machineCode:", machine_code) # FPMC1.…
ret = sdk.activate("license.txt")
ret = sdk.init_sdk()
result = sdk.document_recognition([{"image": base64_front}])
result = sdk.document_liveness([{"image": base64_front}])
result = sdk.document_process([{"image": base64_front}], rfid="", options={})
# Front + back, English OCR only, stricter authenticity status
result = sdk.document_process(
[
{"image": base64_front, "page_idx": 0},
{"image": base64_back, "page_idx": 1},
],
rfid="",
options={"lang": ["en"], "verifyStrict": True},
)
result = sdk.general_process(base64_image, options={})
print(sdk.get_license_status()) # recognition / authenticity flags + label
Optional session APIs: sdk.start_new_session(), sdk.start_new_page(), sdk.unload().
HTTP endpoints: /api/health, /api/machinecode, /api/licenseStatus, /api/backend, /api/activate, /api/documentRecognition, /api/documentLiveness, /api/documentProcess, /api/generalProcess.
评论