Ver-ID Utilities

Usage no npm install needed!

<script type="module">
  import veridUtils from '';


npm version

Ver-ID Node JS Utilities

Utilities for converting and comparing Ver-ID face templates


npm install verid_utils


Loading the module

var veridUtils = require("verid_utils");

Face template comparison

The template comparison function returns a score roughly between 0.0 (totally different faces) and 5.0 or higher (identical faces).

The similarity threshold for faces will vary slightly depending on the use case. 4.0 is a good all-purpose threshold that minimises false rejection while maintaining low false acceptance. 4.5 should nearly rule out false acceptance in most scenarios.

// Templates may be Base64-encoded strings or arrays or floating point integer values
var template1 = "..."; // Face template 1
var template2 = "..."; // Face template 2
var score = veridUtils.compareFaceTemplates(template1, template2);

Face template conversion

Convert a template from Base64-encoded string to an array

var templateBase64String = "..."; // Face template string
var templateArray = veridUtils.base64ToFloat32Array(base64Template);

Convert a template from an array to a Base64-encoded string

var templateArray = []; // Face template array
var templateBase64String = veridUtils.float32ArrayToBase64(templateArray);