# FaceLivenessDetection - Windows

view

This is the `Face Liveness Detection` `Python` project for `Windows` Server.

It stands for `3D passive face liveness detection` python, `face anti-spoofing` python, `face fraudulent check` python, `face liveness check` python, `fraud prevention` python, `spoof prevention` python, `face fraud detection` python and `biometric fraud` with liveness detection on `Windows` server.

## SDK

{% content-ref url="../../product/face-liveness-detection-sdk-face-recognition-sdk/face-liveness-detection-sdk-server" %}
[face-liveness-detection-sdk-server](https://docs.kby-ai.com/help/product/face-liveness-detection-sdk-face-recognition-sdk/face-liveness-detection-sdk-server)
{% endcontent-ref %}

## Github

{% embed url="<https://github.com/kby-ai/FaceLivenessDetection-Windows>" %}

## Test Online

{% embed url="<https://web.kby-ai.com/>" %}

<figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2FroDOxwFnJk20NBmWxhUJ%2Fimage.png?alt=media&#x26;token=620cd700-b70b-4aee-93b8-9b772b891a48" alt=""><figcaption></figcaption></figure>

## Postman

To test the API, you can use `Postman`. Here are the `endpoints` for testing:

* Test with an image file: Send a `POST` request to <http://18.221.33.238:8080/check_liveness>
* Test with a `base64-encoded` image: Send a `POST` request to <http://18.221.33.238:8080/check_liveness_base64>
* You can download the `Postman` collection to easily access and use these `endpoints`. [click here](https://github.com/kby-ai/FaceLivenessDetection-Docker/blob/main/postman/kby-ai-live.postman_collection.json)

<figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2FS1OVRkxjpppjsRMtAUA8%2Fimage.png?alt=media&#x26;token=3dea51fb-61b3-45d5-b23e-eeb2b9fa927c" alt=""><figcaption></figcaption></figure>

## How to Run

> We have not published facesdk1.dll. If you need the SDK DLL, please get in touch with us.

### 1. System Requirements

**CPU:** 2 cores or more (Recommended: 8 cores)&#x20;

**RAM:** 4 GB or more (Recommended: 8 GB)&#x20;

**HDD:** 4 GB or more (Recommended: 8 GB)&#x20;

**OS:** Windows 7 or later&#x20;

**Dependency:** `OpenVINO`™ Runtime (Version: 2022.3), ncnn Runtime(20220721), `Vulkan SDK` Runtime(1.3.250)

### 2. Install SDK from DockerHub

`SDK` could be installed easily from `DockerHub` repository pushed by `KBY-AI` team as discribed in the follwing [link](https://hub.docker.com/r/kbyai/face-liveness-detection).

* Pull docker image from the repository.

```bash
sudo docker pull kbyai/face-liveness-detection:latest
```

* Get machine code with the following command.

```bash
sudo docker run -e LICENSE="xxxxx" kbyai/face-liveness-detection:latest 
```

To request the license, please provide us with the machine code obtained from your console.

<figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2FxcXsbkAJJQBoG41WzT71%2FScreenshot%202025-03-10%20225017.png?alt=media&#x26;token=f73bfe85-8959-4c43-8aaa-d7b31ce23dbe" alt=""><figcaption><p>How to get machine code</p></figcaption></figure>

* Run `docker` container with license key file from `KBY-AI` team.

```bash
sudo docker run -v ./license.txt:/root/kby-ai-live/license.txt -p 8080:8080 -p 9000:9000 kbyai/face-liveness-detection:latest
```

### 3. Install SDK from GitHub

* Clone the project:

```bash
git clone https://github.com/kby-ai/FaceLivenessDetection-Windows.git
```

* Download the model from `Google Drive` and unzip it: [click here](https://drive.google.com/file/d/1bYl0p5uHXuTQoETdbRwYLpd3huOqA3wY/view?usp=share_link)
* Run the `Python` code:

```bash
python test.py
```

* Send us the `machine code` and replace the `license.txt` file you received. Then, run the `Python` code again.

<figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2FwZXuZTD6HnzoMvJV7Yja%2Fimage.png?alt=media&#x26;token=8b9b5b94-310a-4d89-8357-8144565673f6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2589216230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1WwtQK0VFwKRGmIjGA3I%2Fuploads%2F2izi9oSk1DdjPPBaMWJZ%2Fimage.png?alt=media&#x26;token=0027dfdd-3882-4dcd-a8fe-4f20ba8711e2" alt=""><figcaption></figcaption></figure>
