Skip to content

Intelligent ID liveness, ID document anti-spoofing for ID card, passport and driver license, ID card liveness detection, passport liveness detection

Notifications You must be signed in to change notification settings

kby-ai/ID-Document-Liveness-Detection-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 

Repository files navigation

Our facial recognition algorithm is globally top-ranked by NIST in the FRVT 1:1 leaderboards. badge

Latest NIST FRVT evaluation report 2024-12-20

FRVT Sheet

πŸ†” ID Document Liveness Detection - Linux - Here badge

πŸ€— Hugging Face - Here

πŸ“š Product & Resources - Here

πŸ›Ÿ Help Center - Here

πŸ’Ό KYC Verification Demo - Here

πŸ™‹β€β™€οΈ Docker Hub - Here

ID-Document-Liveness-Detection-Docker

Introduction

This repo demonstrates the server-based ID document liveness detection (anti-spoofing) capabilities for ID card, passport, and driver's license.
Our ID document liveness detection SDK(ID document anti-spoofing) suite effectively prevents common presentation attacks: Screen Replay Attacks, Printed Copy Attacks, and Portrait Substitution Attacks.

β—ΎID Card Recognition Product List

No. Repository Release Type
1 ID Card Recognition - Android Android
2 ID Card Recognition - iOS iOS
3 ID Card Recognition - Flutter Flutter
4 ID Auto Capture - React Web Front-end
5 ID Card Recognition - Windows Server-Windows
6 ID Card Recognition - Linux Server-Linux
7 ID Card Recognition - C# Server-Windows
➑️ ID Card Liveness Detection - Linux Server-Linux

Docker Run

  • Pull docker image.
sudo docker pull kbyai/idl:latest
  • Run docker container with license key file.
sudo docker run -v ./license.txt:/root/kby-ai-idl/license.txt -p 7860:7860 -p 9005:9000 kbyai/idl:latest

SDK License

This Docker image utilizes KBY-AI's SDK, which requires a license for each machine or instance on which it runs.

  • To get the machine code (HWID) for license, use the following syntax:
sudo docker run -e LICENSE="xxxxx" kbyai/idl:latest
  • To request the license, please provide us with the machine code (HWID) obtained from your console. image

Contact us:

πŸ§™Email: contact@kby-ai.com
πŸ§™Telegram: @kbyaisupport
πŸ§™WhatsApp: +19092802609
πŸ§™Discord: KBY-AI
πŸ§™Teams: KBY-AI

Test API in KBY-AI Online Demo Page

You can test the SDK against static image here.

image

Test API with Gradio Demo

To test the Gradio demo from the Docker image, access it at http://127.0.0.1:7860 or http://localhost:7860.

Gradio Demo

API Instruction

API can be tested through Postman based on the following endpoint details.

1. Processing Image with File

  • API endpoint: <base URL>/process_image
  • Method: POST
  • Content-type: multipart/form-data
  • Request Parameters:
    Parameter Type Description
    image File ID document image file with *.jpg or *.png extension
  • Request example
    image

2. Processing with Base64-Encoded String

  • API endpoint: <base URL>/process_image_base64
  • Method: POST
  • Content-type: application/json
  • Request Parameters:
    Parameter Type Description
    base64 String The base64-encoded string of the ID document image
  • Request example
    image

API Response Description in JSON

1. portraitReplace:

  • Type: Float
  • Description: A score indicating the likelihood that the portrait on the ID document has been tampered with or replaced. Higher values (closer to 1) suggest the portrait is likely original, while lower values may indicate potential tampering.

2. printedCopy:

  • Type: Float
  • Description: A score that assesses whether the document is a printed copy rather than an original document. Values close to zero suggest the document might be a printed copy, while higher values indicate originality.

3. screenReply:

  • Type: Float
  • Description: A score that determines if the document was displayed on a screen rather than being a physical ID. Lower values (closer to zero) imply a higher likelihood that the document is displayed on a screen.

4. Result status:

  • Type: String
  • Description: Indicates the status of the liveness check on the document. "Ok" typically means that the document passed initial verification. Other statuses could indicate different levels of authenticity or potential issues with the document.
  • Status: Ok, Too close to camera!, Too close to border!, Document cropped!, Too small!, Multiple documents, Is Colorless!, Document not found!, Unknown
  • Resonpse Example:
{
    "result": {
        "portraitReplace": 0.590566158294678,
        "printedCopy": 2.0435e-11,
        "screenReply": 0.002031173091382,
        "status": "Ok"
    },
    "resultCode": "Ok"
}

About

Intelligent ID liveness, ID document anti-spoofing for ID card, passport and driver license, ID card liveness detection, passport liveness detection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •