explaingit

facex-engine/facex

190CAudience · developerComplexity · 4/5ActiveLicenseSetup · moderate

TLDR

Browser-side face processing library written in C and compiled to WebAssembly. Runs detection, 98-point and 576-point landmarks, recognition, and passive anti-spoofing without a server or GPU.

Mindmap

mindmap
  root((facex))
    Inputs
      Browser camera frames
      Encrypted model weights
    Outputs
      Face boxes
      Landmarks
      Identity embeddings
      Spoof score
    Use Cases
      Face login
      Access control
      Proctoring
      Banking onboarding
    Tech Stack
      C
      WebAssembly
      WebCrypto

Things people build with this

USE CASE 1

Add browser-based face login to a web app without sending biometric frames off-device.

USE CASE 2

Run identity verification on edge hardware (smart cameras, kiosks) with a single CPU and no GPU.

USE CASE 3

Build a proctoring tool that detects faces and landmarks in the browser during online exams.

USE CASE 4

Compare per-call cloud face API costs against shipping FaceX in your web client.

Tech stack

CWebAssemblyJavaScript

Getting it running

Difficulty · moderate Time to first run · 30min

Model weights ship as AES-encrypted ciphertext (~17 MB). The README notes this gives friction against scraping but is not real DRM.

Apache 2.0 license. Free to use, modify, and redistribute commercially with attribution and a patent grant.

In plain English

FaceX is a face-processing library written in C that runs entirely inside a web browser through WebAssembly. The README explains that the full pipeline (face detection, 98-point and 576-point landmarks, face recognition, and a passive anti-spoofing check) ships as roughly 17 MB of encrypted model weights and runs without any server, Python, or GPU. A live demo is hosted on GitHub Pages so visitors can press Start camera in a Chromium browser and try it. Most of the model components were trained by the project's authors from scratch. The README lists each piece with its size and training source: a YuNet-style face detector at 401 KB trained on WIDER FACE, a 98-point landmark model at 1.1 MB trained on WFLW, a 576-point 3D mesh distilled from MediaPipe at 5.6 MB, and recognition models from 0.8 MB to 8.4 MB trained with ArcFace on MS1M, reaching 99.07% on the LFW benchmark. The anti-spoof component is borrowed from MinivisionAI under Apache 2.0. The weights are shipped as AES-256-GCM ciphertext and decrypted in the browser using WebCrypto. The README is honest that this is not real DRM, since a determined attacker can read the decrypted bytes from memory, but it gives friction against casual scraping and lets a SaaS deployment revoke keys per customer. FaceX is positioned as one part of a larger pure-C surveillance stack written by the same team, which also includes a 184 KB H.264 and H.265 decoder called NexusDecode, an HEVC encoder, a surveillance-tuned video format called NXV, and a small neural network inference engine called nn2. The README reports that one Intel i5 CPU can decode 30 RTSP streams and run detection on all of them, supporting around 70 IP cameras on a single core with motion gating. The README walks through what users can build with FaceX: identity verification, face login, access control on edge hardware, proctoring, smart cameras, banking onboarding, and in-store kiosks. A cost comparison table argues that cloud face APIs from AWS, Azure, and Google would cost several thousand dollars per month for a 100,000-user app, while FaceX runs in the user's browser at no per-call cost and avoids sending biometric frames off-device. Small C and shell snippets show how to call the native library and how to serve the browser demo locally. The licence is Apache 2.0.

Copy-paste prompts

Prompt 1
Embed FaceX in a Next.js app to do face login from the user's webcam without sending frames to a server. Show the WASM init and the recognition call.
Prompt 2
Set up the FaceX live demo locally so I can press Start camera in Chromium. Walk through the shell script that serves it.
Prompt 3
Use FaceX to run identity verification on a kiosk PC with an Intel i5 and no GPU. What FPS and accuracy should I expect?
Prompt 4
Compare a FaceX-in-browser deployment against AWS Rekognition for a 100,000-user app. Run the cost math from the README.
Prompt 5
Explain the AES-256-GCM model encryption flow used by FaceX and where the WebCrypto decryption happens in the page lifecycle.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.