FaceLivenessDetection - Docker
This demo demonstrates 3D passive face liveness detection python SDK by mitigating biometric fraud on Linux server.
Overview
This project demonstrates an advanced face liveness detection technology implemented via a Dockerized Flask API.
It stands for 3D passive face liveness detection docker, face anti-spoofing docker, face fraudulent check docker, face liveness check docker, fraud prevention docker, spoof prevention docker, face fraud detection docker and biometric fraud with liveness detection on Linux server.
SDK
Face Liveness Detection SDK - ServerGithub
dockerhub
Test Online

Postman
To test the API, you can use Postman. Here are the endpoints for testing:
Test with an image file: Send a
POSTrequest to http://18.221.33.238:8080/check_livenessTest with a
base64-encodedimage: Send aPOSTrequest to http://18.221.33.238:8080/check_liveness_base64You can download the
Postmancollection to easily access and use theseendpoints. click here

How to Run
1. System Requirements
CPU: 2 cores or more (Recommended: 8 cores)
RAM: 4 GB or more (Recommended: 8 GB)
HDD: 4 GB or more (Recommended: 8 GB)
OS: Ubuntu 20.04 or later
Dependency: OpenVINO™ Runtime (Version: 2022.3)
2. Setup and Test
Clone the project:
git clone https://github.com/kby-ai/FaceLivenessDetection-Windows.gitDownload the model from
Google Driveand unzip it: click here
cd FaceLivenessDetection-Docker
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1bYl0p5uHXuTQoETdbRwYLpd3huOqA3wY' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1bYl0p5uHXuTQoETdbRwYLpd3huOqA3wY" -O data.zip && rm -rf /tmp/cookies.txt
unzip data.zipBuild the
Dockerimage:
sudo docker build --pull --rm -f Dockerfile -t kby-ai-live:latest .Run the
Dockercontainer:
sudo docker run -v ./license.txt:/home/openvino/kby-ai-live/license.txt -p 8080:8080 kby-ai-liveSend us the
machine codeand replace thelicense.txtfile you received. Then, run theDockercontainer again.


To test the
API, you can usePostman. Here are theendpointsfor testing: Test with an image file: Send aPOSTrequest to http://{xx.xx.xx.xx}:8080/check_liveness. Test with abase64-encodedimage: Send aPOSTrequest to http://{xx.xx.xx.xx}:8080/check_liveness_base64. You can download thePostmancollection to easily access and use theseendpoints. click here
3. Execute the Gradio demo
Setup
GradioEnsure that you have the necessary dependencies installed.GradiorequiresPython 3.6or above. You can installGradiousing pip by running the following command:
pip install gradioRun the demo by using the following command:
cd gradio
python demo.pyYou can test within the following
URL: http://127.0.0.1:9000
Last updated