Regula Face SDK web API js client for the browser and node.js based on axios
@regulaforensics/facesdk-webclient"">
Face recognition as easy as reading two bytes.
If you have any problems with or questions about this client, please contact us
through a GitHub issue.
You are invited to contribute new features, fixes, or updates, large or small; We are always thrilled to receive pull requests, and do our best to process them as fast as we can. See dev guide.
npm install @regulaforensics/facesdk-webclient
Performing request:
const face1 = fs.readFileSync('face1.jpg').buffer;
const face2 = fs.readFileSync('face2.jpg').buffer;
const sdk = new FaceSdk({ basePath: 'http://localhost:41101' });
const response = await sdk.matchingApi.match({
images: [
{ type: ImageSource.LIVE, data: face1, index: 1 },
{ type: ImageSource.DOCUMENT_RFID, data: face2, index: 2 }
]
});
Parsing results:
for (const result of response.results) {
console.log(`pair(${result.firstIndex},${result.secondIndex}) similarity: ${result.similarity}`)
}
You can find more detailed guide and run this sample in example folder.
Language level
Module system
Definitions
package.json
. (Reference)