GitHub - viante-ai/free-face-recognition: face recognition, face recognition sdk, face detection, face match, face attributes · GitHub
Skip to content

About

face recognition, face recognition sdk, face detection, face match, face attributes

Resources

Stars

244 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

VianteAI Open-Source Face Recognition SDK

On-premises face detection, facial attribute analysis, and 1:1 face verification for Windows.

Website · GitHub Repository


Overview

The VianteAI Face Recognition SDK provides HTTP API endpoints for face detection, facial attribute analysis, and face matching. It is designed for on-premises deployment, allowing image processing to run on your own server.

It provides face attributes like Age, Gender, emotion, glasses, mask, headphone and so on. Also, use the SDK to compare two face images and receive a similarity result that can be evaluated against thresholds appropriate for your application.

Key characteristics

  • On-premises processing: The SDK is designed to process data on the server where it is deployed.
  • Local API access: The documented API is available through 127.0.0.1:8083.
  • Multiple input formats: The API provides endpoints for image-file uploads and Base64 image input.
  • Python demo: A Gradio demo is included in the repository.
  • Integration flexibility: The HTTP API can be called from Python and other languages that support HTTP requests.

Privacy and deployment note

When deployed and configured entirely within your own environment, image processing can remain on your infrastructure. Your application’s network configuration, logging, backups, and any integrations determine whether data is transmitted elsewhere.

Face Recognition Technology Evaluation (FRTE)

1:1 Verification Ranked Top 1

The project README includes the following FRTE 1:1 verification leaderboard result:

VianteAI FRTE 1:1 verification leaderboard result

Refer to the benchmark source and evaluation conditions when interpreting leaderboard results. Performance can vary depending on the dataset, evaluation protocol, and deployment environment.


Table of Contents


System Requirements

The documented Windows server installation has the following minimum requirements:

Component Requirement
Operating system Windows
Python 3.6 or later
CPU 2 cores or more
Memory 8 GB RAM or more

The requirements above reflect the installation information supplied with this project. Actual resource requirements may vary with workload, image volume, and deployment configuration.

Installation

1. Download the Windows server installer

Download the on-premises server installer:

Download VianteAI On-Premises Server Installer

Installation recommendation

Close other applications before starting the installation. The original installation instructions recommend installing the SDK shortly after restarting Windows to reduce the chance of interference from other running applications.

2. Install the server

  1. Run the downloaded installer.
  2. Follow the on-screen installation instructions.
  3. Allow the installation process to complete.
VianteAI server installer

3. Verify the server

Open Windows Task Manager and check that the VianteAI server process or service is running.

VianteAI server process in Windows Task Manager

Once the server is running, the API endpoints documented below are available at:

http://127.0.0.1:8083

API Reference

Available Endpoints

All documented endpoints use the HTTP POST method.

Endpoint Input Function
/api/face_detect All Image Format - Multipart form-data Face detection and facial attribute analysis
/api/face_detect_base64 JSON Face detection and facial attribute analysis
/api/face_match All Image Format - Multipart form-data Face matching
/api/face_match_base64 JSON Face matching

Base URL

http://127.0.0.1:8083

1. Face Detection: File Upload

Endpoint

POST http://127.0.0.1:8083/api/face_detect

Request format: multipart/form-data

Field Type Description
image File Image to analyze, such as a PNG or JPG file

Example request using cURL:

curl -X POST "http://127.0.0.1:8083/api/face_detect" \
  -F "image=@test_image.jpg"

2. Face Detection: Base64 Input

Endpoint

POST http://127.0.0.1:8083/api/face_detect_base64

Request format: JSON

{
  "image": "BASE64_ENCODED_IMAGE_DATA"
}

Replace BASE64_ENCODED_IMAGE_DATA with the Base64-encoded contents of the image.

3. Face Matching

The SDK provides two face-matching endpoints:

POST http://127.0.0.1:8083/api/face_match
POST http://127.0.0.1:8083/api/face_match_base64

These endpoints are intended for face matching. The request field names and complete payload schemas are not specified in this README; refer to the API implementation or accompanying documentation for the exact request format.

API Response

The API returns a JSON response containing results from the submitted face image. The response may include recognized face details and analysis results, depending on the endpoint.

The repository's original documentation includes example response screenshots:

Example face API response Additional face API response example

Gradio Demo

A Gradio demo is included to provide a graphical interface for trying the SDK.

Run the demo

1. Clone the repository

git clone https://github.com/viante-ai/face-recognition-sdk.git

2. Install the Python dependencies

cd face-recognition-sdk
pip install -r requirement.txt

3. Start the Gradio application

cd gradio
python app.py

Follow the URL printed in the terminal to open the Gradio interface.


Python API Example

The following example demonstrates how to submit an image to the face-detection endpoint using Python and the requests library.

Prerequisites

  • Python 3.6 or later
  • The VianteAI server installed and running
  • The requests package

Install the dependency:

pip install requests

Example

from pathlib import Path

import requests

API_URL = "http://127.0.0.1:8083/api/face_detect"
IMAGE_PATH = Path("test_image.jpg")

if not IMAGE_PATH.is_file():
    raise FileNotFoundError(f"Image not found: {IMAGE_PATH}")

try:
    with IMAGE_PATH.open("rb") as image_file:
        response = requests.post(
            API_URL,
            files={"image": (IMAGE_PATH.name, image_file)},
            timeout=60,
        )

    response.raise_for_status()

    result = response.json()
    print("Request successful.")
    print("API response:")
    print(result)

except requests.exceptions.Timeout:
    print("The request timed out.")

except requests.exceptions.HTTPError as error:
    print(f"API returned an HTTP error: {error}")
    print(response.text)

except requests.exceptions.RequestException as error:
    print(f"Could not connect to the API: {error}")

except ValueError:
    print("The API response was not valid JSON.")
    print(response.text)

Using other programming languages

Because the SDK exposes HTTP endpoints, applications written in other languages can integrate with it using an HTTP client. Examples include:

  • C#
  • C++
  • Java
  • JavaScript / Node.js
  • Ruby

The request format must follow the endpoint's documented input requirements.


Integration

A typical integration follows this sequence:

  1. Install and start the VianteAI server on the target Windows machine.
  2. Send an image to the appropriate API endpoint.
  3. Receive and parse the JSON response.
  4. Use the returned face information or matching result in your application.
  5. For face verification, evaluate the matching result using thresholds suitable for your use case.

The API can be called by local applications or by other services that are permitted to access the server over the configured network.

Privacy and Deployment

The SDK is intended for on-premises deployment. For deployments that require data to remain within a controlled environment:

  • Run the server within your own infrastructure.
  • Restrict API access to trusted applications and network interfaces.
  • Use appropriate firewall rules and access controls.
  • Review application logs, monitoring, and backup policies to ensure they meet your data-handling requirements.
  • Avoid exposing the API directly to the public internet without suitable authentication and network protections.

Biometric data is sensitive. Ensure that your deployment and use of face recognition comply with applicable privacy, security, and biometric-data laws.


VianteAI — On-Premises Face Recognition Technology

Website · GitHub

About

face recognition, face recognition sdk, face detection, face match, face attributes

Resources

Stars

244 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages