Sample Application
Linux-Face Liveness Detection SDK(updated version) Flask, Gradio Demo
Last updated
Linux-Face Liveness Detection SDK(updated version) Flask, Gradio Demo
Last updated
Pull the Docker image and run the container:
Download FaceLivenessDetection-Demo.zip[377M]
The Demo directory contains the following directories and files:
Run the install.sh
script to install dependencies:
Online Licensing: Set the online license key as an environment variable:
Offline Licensing: Copy the license.txt
license file to the demo directory.
Run the demo script with the desired option:
To test the Flask Server API, you can use Postman. Here are the endpoints for testing:
Perform face liveness detection and attribute analysis on an image file
Parameters
image: image file
Response
result: face liveness, attribute check result
liveness_score: liveness score of detected face
face_rect: face bounding box of detected face
angles: Pitch, Yaw, Roll of detected face
Perform face liveness detection and attribute analysis on a base64 image
Parameters
image: base64 image
Response
result: face liveness, attribute check result
liveness_score: liveness score of detected face
face_rect: face bounding box of detected face
angles: Pitch, Yaw, Roll of detected face
Go to http://127.0.0.1:7860/ on a web browser.
dependency\
Dependency files
engine\
SDK engine files
examples\
Sample images for face liveness detection
flask\
Flask server side demo code
gradio\
Gradio demo code
Dockerfile
Dockerfile for building a Docker image
install.sh
Script for install environment
license.txt
License key file
run_demo.sh
Script for run demo