Recognito
  • About RECOGNITO
  • Face Recognition SDK
    • Performance Overview
    • Integration Guide
      • Linux
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Windows
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Android
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • iOS
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Flutter
        • Installation
        • API Reference
        • Licensing
        • Sample Application
  • Face Liveness Detection SDK
    • Performance Overview
    • Integration Guide
      • Linux
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Windows
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Android
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • iOS
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Flutter
        • Installation
        • API Reference
        • Licensing
        • Sample Application
  • ID Document Recognition SDK
    • Performance Overview
    • Integration Guide
      • Linux
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • Android
        • Installation
        • API Reference
        • Licensing
        • Sample Application
      • iOS
        • Installation
        • API Reference
        • Licensing
        • Sample Application
  • ID Document Liveness Detection SDK
    • Performance Overview
    • Integration Guide
      • Linux
        • Installation
        • API Reference
        • Licensing
        • Sample Application
  • License Option
  • How to implement 1:N identification with RECOGNITO SDK
  • Contact & Support
Powered by GitBook
On this page
  • Docker
  • Installation
  • - Download
  • - Install dependencies
  • - Setting Up SDK License Key
  • Test
  • - Run Demo
  • - Test Flask Server APIs
  • - Test Gradio
  1. Face Recognition SDK
  2. Integration Guide
  3. Linux

Sample Application

Linux-Face Recognition SDK(updated version) Flask, Gradio Demo (1:1 Matching)

PreviousLicensingNextWindows

Last updated 5 months ago

Looking for 1:N face search demo?


Docker

Pull the Docker image and run the container:

sudo docker pull recognito/face-recognition:latest
sudo docker run -it -e FR_LICENSE_KEY="XXXXX-XXXXX-XXXXX-XXXXX" -p 8001:8000 -p 7861:7860 recognito/face-recognition:latest [OPTION --gradio(-g), --flask(-f)]

Installation

- Download

Download

The Demo directory contains the following directories and files:

dependency\

Dependency files

engine\

SDK engine files

examples\

Sample images for face recognition

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

- Install dependencies

Run the install.sh script to install dependencies:

./install.sh

- Setting Up SDK License Key

  • Online Licensing: Set the online license key as an environment variable:

export FR_LICENSE_KEY="XXXXX-XXXXX-XXXXX-XXXXX"
  • Offline Licensing: Copy the license.txt license file to the demo directory.


Test

- Run Demo

Run the demo script with the desired option:

./run_demo.sh [OPTION --gradio(-g), --flask(-f), --help(-h)]

- Test Flask Server APIs

POST /api/compare_face

Perform face match between two face image files

Parameters

image1: image file for the 1st face

image2: image file for the 2nd face

Response

result: face match result

similarity: similarity between two faces

detection: face bounding boxes of two faces

POST /api/compare_face_base64

Perform face match between two face base64 images

Parameters

image1: base64 image for the 1st face

image2: base64 image for the 2nd face

Response

result: face match result

similarity: similarity between two faces

detection: face bounding boxes of two faces

- Test Gradio

To test the Flask Server API, you can use . Here are the endpoints for testing:

Go to on a web browser.

https://github.com/recognito-vision/Linux-FaceRecognition-FaceLivenessDetection/tree/main/Identification(1%3AN)-Demo
FaceRecognition-Demo.zip[191M]
Postman
http://127.0.0.1:7860/
Postman usage guide for Flask Demo
Gradio Demo