npm install github:perusworld/ts-azure-cognitiveservices-face-api --saveimport { FaceAPIImpl } from "ts-azure-cognitiveservices-face-api";
let faceAPI = new FaceAPIImpl({
location: location,
subscriptionKey: subscriptionKey
});
//buf - image file content as Buffer
faceAPI.detect(buf).then(faces => {
//faces array
});import { FaceAPIImpl } from "ts-azure-cognitiveservices-face-api";
let faceAPI = new FaceAPIImpl({
location: location,
subscriptionKey: subscriptionKey
});
faceAPI.identify(personGroupId, faceIds).then(ids => {
//ids array
});import { FaceAPIImpl } from "ts-azure-cognitiveservices-face-api";
let faceAPI = new FaceAPIImpl({
location: location,
subscriptionKey: subscriptionKey
});
faceAPI.person(personGroupId, personId).then(person => {
//person
});