Open-Source-Face-Recognition-SDK README

The project's README from github.com/Faceplugin-ltd/Open-Source-Face-Recognition-SDK. As one markdown file: README.md.

FacePlugin

Open Source Face Recognition SDK

The world's first completely free and open-source face recognition SDK for Windows and Linux from Faceplugin

Platform Python License Privacy


🚀 Overview

The Open Source Face Recognition SDK by Faceplugin is a powerful, privacy-focused solution for integrating face recognition capabilities into your applications. Built with deep learning models, this SDK provides high-accuracy face detection and recognition while ensuring complete data privacy through on-premise processing.

✨ Key Features

🎯 Current Capabilities


🛠️ Installation

Prerequisites

Setup Instructions

  1. Install Anaconda (if not already installed)

    # Download from: https://www.anaconda.com/products/distribution
    
  2. Create and activate conda environment

    conda create -n facesdk python=3.9
    conda activate facesdk
    
  3. Install dependencies

    pip install -r requirements.txt
    
  4. Test the installation

    python run.py
    

📖 Quick Start

Basic Usage

from face_recognition_sdk import FaceRecognition

# Initialize the SDK
face_sdk = FaceRecognition()

# Process an image
image_path = "path/to/your/image.jpg"
face_info = face_sdk.GetImageInfo(image_path, faceMaxCount=10)

# Compare two faces
similarity = face_sdk.get_similarity(feature1, feature2)

Example: Face Comparison

# Compare two images
image1 = "test/1.jpg"
image2 = "test/2.png"

# Get face information from both images
faces1 = face_sdk.GetImageInfo(image1, faceMaxCount=1)
faces2 = face_sdk.GetImageInfo(image2, faceMaxCount=1)

if faces1 and faces2:
    # Compare the first face from each image
    similarity = face_sdk.get_similarity(faces1[0]['embedding'], faces2[0]['embedding'])
    print(f"Similarity: {similarity}%")
    
    # Check if it's the same person (threshold = 75)
    is_same_person = similarity >= 75
    print(f"Same person: {is_same_person}")

🔧 API Reference

Core Functions

GetImageInfo(image_path, faceMaxCount)

Extracts face information from an image.

Parameters:

Returns:

get_similarity(feature1, feature2)

Compares two face feature embeddings.

Parameters:

Returns:

Configuration


🎯 Use Cases

This SDK is ideal for various applications:

🔐 Security & Authentication

👥 Business Applications

📱 Mobile & IoT


🏢 More Biometric SDKs from Faceplugin

This project is developed by Faceplugin, a provider of on-premise biometric and identity verification SDKs.

If you need capabilities beyond this open-source SDK, explore Faceplugin's commercial SDKs for:

Solution Description
👤 Face Recognition Face recognition, verification, identification, attributes, and biometric authentication
🛡️ Face Liveness Detection Detect presentation attacks during face verification and authentication
🆔 ID Document Recognition OCR, MRZ, barcode recognition, and document classification
🔐 ID Document Liveness Detection Detect presentation attacks involving identity documents

Explore our complete suite of biometric and identity verification solutions, including face recognition, face liveness detection, ID document recognition and ID document liveness detection SDKs.

Face Recognition SDKs

ID Document Recognition SDKs

ID Document Liveness Detection SDK


🤝 Support & Contact

While there are many ways to support this project, starring ⭐️ this GitHub repository is one of the simplest and most impactful. It increases discoverability and helps the project reach a wider audience. Thank you for your support 🙏

Email WhatsApp Telegram @facepluginSDK

📞 Get in Touch


Made with ❤️ by Faceplugin

Open-Source-Face-Recognition-SDK (Faceplugin-ltd/Open-Source-Face-Recognition-SDK)

Searching Database…

这是什么?Faceplugin 出品的开源人脸识别 SDK,可做人脸检测、特征点提取、特征向量生成和人脸相似度比对,全部在本地处理。
这是从代码中调用的库,还是独立应用?它是一个 Python 库/SDK:把 GetImageInfo、getsimilarity 等函数导入到你自己的应用代码中使用。
怎么让它跑起来?安装 Anaconda,创建并激活 conda 环境,安装依赖,然后在调用 API 函数之前先测试安装是否成功。
需要先装 Python 和 Anaconda 吗?需要,必须使用 Python 3.9 或更高版本,并推荐使用 Anaconda 来管理环境和依赖。
它支持哪些操作系统?它可以在 Windows 和 Linux 上运行。
我的人脸数据会被发送到别处吗?不会,所有处理都在本地完成,不会有任何数据离开你的设备。
GetImageInfo 返回什么?它返回一个字典列表,每个检测到的人脸对应其中一项,包含边界框、面部特征点和特征嵌入向量。
人脸比对是怎么工作的?getsimilarity 函数比较两个人脸特征向量并返回 0 到 100 的相似度分数;默认阈值 75 用于判断两张脸是否属于同一个人。
支持哪些图像格式?支持 JPG、PNG、BMP 和 TIFF,并能自动检测每张图像中的多个人脸。
Faceplugin 还有这个 SDK 以外的产品吗?有,Faceplugin 还销售商业 SDK,覆盖人脸活体检测、证件识别和证件活体检测,支持 Android、iOS、Flutter、React Native 和 Docker 等平台。
Size
54.6 MB
Stars
2.6K
Updated
CommitOct 02
Age
1y
Commits · 90 Days