Node-ArcFace
Arcsoft Face Cognition Engine.
ArcFace is a Face Cognition Engine, which contains Face Detection, Face Recognition and Face Tracking.
This module is a wrapper of ArcFace C++ SDK used for nodejs.
Installation
with npm
$ npm install arcface --save
with yarn
$ yarn add arcface
Usage
Using Raw SDK
This way you need to know how to use C/C++ pointer
, struct
and array
in nodejs. See ref.
const ArcFace = ; const TypeDef = ArcFaceTypeDef;const Lib = ArcFaceLib; // init FD moduleconst FD = ArcFace;// init FR moduleconst FR = ArcFace; // setting initial variablesconst APPID = 'yourAppId';const FR_SDKKey = 'yourFRSDKKey';const WORKBUF_SIZE = 40 * 1024 * 1024;const nScale = 16;const nMaxFace = 10; // alloc memoryconst phEngine = TypeDefRef;const pWorkMem = Lib; // initial FR Engineconst nRet = FR; // other usages are same as the official sample code// ...
Using Wrapped SDK
const ArcFace = ; const arcface = ; // init FD Enginearcface;// init FR Enginearcface; // parse image file to ASVLOFFSCREENconst asvl = await arcface; // face detectionconst faces = arcface; // extract face featrueconst faceModel = arcface; // ...
More see test.
License
MIT