1.0.4 • Published 4 years ago

arcsoft-idcard v1.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

Arcsoft-Idcard

Arcsoft Idcard Cognition Engine.

Arcsoft is a Face Cognition Engine, which contains Face Detection, Face Recognition, Face Tracking and Idcard Compare.

This module is a Non-Official wrapper of ArcFace C++ SDK used for nodejs.

Installation

Step 1 install windows-build-tools

$ npm i -g windows-build-tools

Step 2 with npm

$ npm install arcsoft-idcard --save

or with yarn

$ yarn add arcsoft-idcard

TODO

const path = require('path');
const IdCard = require('../lib');

const idcard = new IdCard();

(async function () {
  try {
    const activeRes = idcard.onlineActive({
      appId: 'BQxjZiDZuxi5Yyyx74GpddjyDw4EefRYjdsxmnD8aARa',
      sdkKey: '6QD8ib78kHtWhnREBvtC1ArWmsa6xhdAibzQwKL5qEdx'
    })
    console.log(activeRes)

    const initRes = idcard.initEngine()
    console.log(initRes)

    const compareRes = idcard.faceIdcardCompare({
      type: 0, // 1:视频,0:图片
      threshold: 0.82, // 比对阈值
      idcardData: await idcard.parseImage(path.join(__dirname, './img/f1.jpg')),
      faceData: await idcard.parseImage(path.join(__dirname, './img/f2.jpg'))
    })
    console.log(compareRes)

    const uninitRes = idcard.uninitialEngine()
    console.log(uninitRes)

  } catch (err) {
    console.error(err);
  }
})();

License

MIT

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago