FacePlugin
Get in Touch
Open Source

The Open-Source Face Recognition SDK

A free, open-source face recognition toolkit for Windows and Linux — face detection, landmark detection, feature embeddings, and face similarity comparison, running entirely on-premises in Python.

Free & open sourceWindows & LinuxPython 3.9+
Woman scanning her face with a phone for 1:1 verification
Identity Verified
Face Match 99.98%
Overview

A Free Starting Point for On-Premises Face Recognition

The Open-Source Face Recognition SDK is FacePlugin's free, openly licensed toolkit for teams that want to evaluate on-premises face recognition before committing to a licensed SDK, or that need a fully open codebase they can audit and modify directly. It runs on CPU alone — a GPU is optional — and keeps every image and embedding on the machine running it.

It covers the same core building blocks as FacePlugin's licensed SDKs: face detection, landmark detection, template (embedding) extraction, and similarity comparison between two faces. It does not include 1:N large-gallery search or the production-grade passive and active liveness that ship in the licensed Face Recognition and Face Liveness Detection SDKs. For basic anti-spoofing, FacePlugin publishes a separate free toolkit, the Open-Source Face Liveness Detection SDK, described below.

LanguagePython 3.9+
PlatformsWindows, Linux
HardwareCPU-only works; GPU optional
Dependency managerAnaconda recommended
Quick Start

Install and Run

  • Install Anaconda.
  • Create and activate an environment: conda create -n facesdk python=3.9 then conda activate facesdk.
  • Install dependencies: pip install -r requirements.txt.
  • Test the install: python run.py.
python
from face_recognition_sdk import FaceRecognition

face_sdk = FaceRecognition()
faces1 = face_sdk.GetImageInfo("test/1.jpg", faceMaxCount=1)
faces2 = face_sdk.GetImageInfo("test/2.png", faceMaxCount=1)

if faces1 and faces2:
    similarity = face_sdk.get_similarity(faces1[0]['embedding'], faces2[0]['embedding'])
    print(f"Similarity: {similarity}%")
    print(f"Same person: {similarity >= 75}")
Also Open Source

A Free Face Liveness Detection Toolkit

The Open-Source Face Liveness Detection SDK tells a live face apart from a spoofed one — a printed photo, a replayed video, or a picture on a screen. It runs on an ordinary CPU, classifies a single image, and is released under the MIT-0 license, including the trained model weights. It classifies the whole image and has no face detection step, so it is a starting point for evaluation and prototyping rather than a replacement for the licensed Face Liveness Detection SDK.

LicenseMIT-0 — free for commercial use, no attribution required
ModelMobileNetV2 backbone with a lightweight classification head
LanguagePython 3.10+ (64-bit)
PlatformsWindows, Linux
HardwareCPU-only; no CUDA setup needed
OutputLive or Fake label and a spoof score from 0 to 1 (default threshold 0.10)
NetworkWorks offline — no downloads or internet connection at run time
python
from liveness_detector import LivenessDetector

detector = LivenessDetector()                 # load the model once

result = detector.predict_file("input/real.jpg")
print(result.label, result.score)             # e.g. Live 0.0123

# Already have a frame in memory (for example from OpenCV)?
result = detector.predict(frame)              # BGR image, as from cv2
if result.is_live:
    print("Live face")
FAQ

Frequently Asked Questions

Is this SDK really free to use?

Yes. It's published as open source on GitHub and doesn't require a license key or machine activation, unlike FacePlugin's commercial SDKs.

How does it compare to the licensed Face Recognition SDK?

The licensed SDK adds production-grade passive and active liveness detection, 1:N identification at scale, native mobile and cross-platform builds (Android, iOS, Flutter, React Native, Ionic, .NET MAUI), and vendor support — this open-source toolkit covers detection, landmarks, and 1:1 similarity comparison in Python only.

Is there a free open-source liveness detection SDK?

Yes. FacePlugin publishes the Open-Source Face Liveness Detection SDK for Windows and Linux. It is a MobileNetV2-based Python model released under the MIT-0 license, so it is free for commercial use with no attribution required, and it runs offline on a CPU. It classifies a whole image as live or fake and does not include a face detection step.

Does it send any data externally?

No. It's designed to run entirely on your own Windows or Linux machine; nothing in the documented API calls out to a remote server.

Related

Pairs Well With

Need Liveness Detection, Mobile Builds, or Support?

Talk to our team about the licensed SDKs — same on-premises model, with 1:N search, native mobile platforms, and liveness detection included.