FacePlugin
Get in Touch
JavaScript

Face Recognition SDK for the Browser

A browser-based face recognition and liveness SDK built on ONNX Runtime Web and OpenCV.js — everything runs client-side in the browser, so no image or biometric data is sent anywhere.

Runs entirely in-browserONNX Runtime Web + OpenCV.jsMIT-licensed
Woman scanning her face with a phone for 1:1 verification
Identity Verified
Face Match 99.98%
Requirements

What You Need to Run It on JavaScript

These are the exact minimum and recommended requirements published in the FaceRecognition-LivenessDetection-Javascript repository — check the repo directly for the latest version, since SDK requirements can change between releases.

RuntimeONNX Runtime Web + OpenCV.js (loaded client-side)
Framework demosReact.js and Vue.js example apps included in the repo
Embedding size512-dimensional face feature vectors
Quick Start

Install and Activate

Install the SDK, then activate it with a license key before calling any recognition function — every platform follows this same activate-then-initialize pattern.

  • Install the package: npm install faceplugin-face-recognition-js.
  • Load the detection model, then the landmark, liveness, and feature models you need — each exposes a load*Model() and matching predict*()/detect*() call.
  • Run the React.js or Vue.js demo in the repo as a working reference implementation.
javascript
const detSession = await loadDetectionModel();
const bbox = await detectFace(detSession, "canvas");

// then pass bbox/landmarks into the matching predict*() calls:
// loadLandmarkModel() / predictLandmark()
// loadLivenessModel() / predictLiveness()
// loadFeatureModel() / extractFeature()
Platform notes

Browser SDK Notes

The JavaScript package runs entirely in the browser. These notes come from the package README and the React and Vue demos.

Install from npm

npm install faceplugin-face-recognition-js installs the package. Everything is processed in the browser and no data leaves the device.

Load models in order

Load the detection model first, then only the models you use: landmarks, liveness, expression, pose, eye closeness, gender, age or the face feature embedding.

Pick what you need

The package covers face detection, landmark extraction, liveness, expression, pose, eye-closeness, gender and age estimation, and face embeddings. Skip the models you do not need to keep page weight down.

Working references

Two reference apps are public: FaceRecognition-React and FaceRecognition-Vue.

Model evaluation

The README states the recognition model was evaluated in NIST FRTE (formerly FRVT) and that passive liveness was tested internally. See the independent evaluation details for the NIST report link.

For server-side or mobile deployment with offline license keys, see the Linux and Docker server or the Android and iOS SDKs.

Licensing

How Licensing Works

The browser SDK is released under the MIT license, and runs entirely client-side with no server component or license key required — see the repository's React.js and Vue.js demos for a complete working setup.

FAQ

Frequently Asked Questions

Does the JavaScript SDK send biometric data to the cloud?

No. Every stage of face recognition runs on your own server or directly on the device, depending on the platform – biometric templates never leave an environment you control.

How is the SDK licensed?

The browser SDK is MIT-licensed and needs no license key or server component. For on-premises servers and native mobile SDKs, licenses are offline and tied to a machine code, application ID or bundle ID; contact FacePlugin for those.

Where can I see the full source and open an issue?

The FaceRecognition-LivenessDetection-Javascript integration is maintained publicly on GitHub at github.com/Faceplugin-ltd, where you can browse the code, file issues, and track releases.

Related

Pairs Well With

Ready to Add Face Recognition to Your JavaScript App?

Talk to our team to get a license key and a 15-day evaluation period started.