# Face Liveness

{% embed url="<https://drive.google.com/file/d/1lL0Hl49D7yQsN4VIaZ2CwI_g9M4u-ajr/view?usp=sharing>" %}

### Steps to Install and Run the Liveness Docker

#### Step 1:

Pull AccuraLiveness Docker image using the command `docker pull accurascan/faceliveness:<latest  tag>`

{% hint style="info" %}
Visit <https://hub.docker.com/r/accurascan/faceliveness> to check the latest version available
{% endhint %}

{% code title="Example:" fullWidth="false" %}

```
docker pull accurascan/faceliveness:36.0.0
```

{% endcode %}

#### Step 2:

Run the docker by using the command: `sudo docker run -dp port-you-want-accuraliveness-to-run-on:443 -- restart=always accurascan/faceliveness:<latest tag>`

{% code title="Example" overflow="wrap" %}

```
docker run -dp 8448:443 --restart=always accurascan/faceliveness:36.0.0
```

{% endcode %}

#### Step 3:

{% hint style="info" %}
To generate your Accura Scan license contact <sales@accurascan.com>
{% endhint %}

Upload your license accessing "<mark style="color:blue;">https\://\<yourdomain:port></mark>" using a browser, Example is shown in the image below.

<figure><img src="/files/BrjZX9xwwUQSb0uRR4oS" alt=""><figcaption></figcaption></figure>

#### Step 4:

Use <mark style="color:blue;">[https://your-domain-or-ip.com:port/upload.php](https://docs.accurascan.com/language/docker/https:/your-domain-or-ip.com:port/upload.php)</mark> (POST request) to access the API, an example post request as shown below.

<mark style="color:green;">`POST`</mark> `https://yourdomain:port/upload.php`

#### Request Body

> You can either pass image file or an image base64.

| Name                                    | Type           | Description                   |
| --------------------------------------- | -------------- | ----------------------------- |
| image<mark style="color:red;">\*</mark> | file           | Upload your image file        |
| imagebase64                             | text or string | paste your image base 64 here |

{% tabs %}
{% tab title="200: OK An example response is shown in the image below" %}

{% endtab %}
{% endtabs %}

<figure><img src="/files/ySdIGfLTb4YMiFdFdPv3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The preferred threshold is **55%**, meaning that if an image achieves a score above this threshold, the face shown is considered ***Live***; otherwise, it is identified as a ***Spoof***.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.accurascan.com/language/docker/face-liveness.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
