arcsoft-idcard

1.0.4 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i arcsoft-idcard

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

13.6 kB

Total Files

10

Last publish

Collaborators

  • laoshu1997