
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@trueface/trueface-sdk-javascript
Advanced tools
The Node SDK is still in Beta. That being said, there may be a few methods from the main Trueface SDK which are still not available in the Node SDK. Please read this entire document. You will need to download the model files and dependency libraries before you can use the SDK.
In each stable release pipeline, the node binding package is submitted to https://npmjs.org automatically. Therefore, it will have always the latest SDK reference.
npm install @trueface/trueface-sdk-javascript
or
yarn add @trueface/trueface-sdk-javascript
In order to use the Node SDK, you must download the appropriate dependency library for your operating system. Extract the libraries and then place them in the same directory as the javascript project folder.
Windows x86
curl -O -L https://storage.googleapis.com/reference.trueface.ai/cpp/dev/latest/uploads/windows/trueface_c_sdk.zip
Linux x86
curl -O -L https://storage.googleapis.com/reference.trueface.ai/cpp/dev/latest/uploads/amd64_ubuntu20/trueface_c_sdk.zip
MacOS x86
curl -O -L https://storage.googleapis.com/reference.trueface.ai/cpp/dev/latest/uploads/mac/trueface_c_sdk.zip
MacOS ARM (M1/M2)
curl -O -L https://storage.googleapis.com/sdk-resources/MacOS_ARM/1.5/libtfsdk.dylib
const SDK = require("@trueface/trueface-sdk-javascript")
const license = process.env.TRUEFACE_TOKEN;
const sdk = new SDK({
"frModel": 0, // 0: lite model, 1: tfv5 model
"modelsPath": "."
}, ".");
sdk.setLicense(license)
if (!sdk.isLicensed()) return false
let image = sdk.preprocessImageFromFile("./image/test.jpeg")
if (image.errorCode !== 0) return false
const face = sdk.detectLargestFace(image)
console.log(face);
if (!face.found) return false
return face
The following commands can be used to download the desired model files.
Download blink detector model
curl -O -L https://storage.googleapis.com/sdk-models/enc/blink/blink_detector_v1.trueface.enc
Download body pose estimator model
curl -O -L https://storage.googleapis.com/sdk-models/enc/body_pose_estimator/v1/body_pose_estimator_v1.trueface.enc
Download face landmarks v2 model
curl -O -L https://storage.googleapis.com/sdk-models/enc/landmark_detection/face_landmark_detector_v2.trueface.enc
Download face recognition lite v2 model
curl -O -L https://storage.googleapis.com/sdk-models/enc/face_recognition/cpu/face_recognition_cpu_lite_v2.trueface.enc
Download face recognition tfv5 cpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/face_recognition/cpu/face_recognition_cpu_v5.trueface.enc
Download face recognition tfv5 gpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/face_recognition/gpu/face_recognition_gpu_v5.trueface.enc
Download face recognition tfv6 cpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/face_recognition/cpu/face_recognition_cpu_v6.trueface.enc
Download face recognition tfv6 gpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/face_recognition/gpu/face_recognition_gpu_v6.trueface.enc
Download object detector v2 cpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/object_detection/object_detector_cpu_v2.trueface.enc
Download object detector v2 gpu model - accurate
curl -O -L https://storage.googleapis.com/sdk-models/enc/object_detection/object_detector_gpu_v2_accurate.trueface.enc
Download object detector v2 gpu model - fast
curl -O -L https://storage.googleapis.com/sdk-models/enc/object_detection/object_detector_gpu_v2_fast.trueface.enc
Download mask detector v3 cpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/mask/mask_detector_cpu_v3.trueface.enc
Download mask detector v3 gpu model
curl -O -L https://storage.googleapis.com/sdk-models/enc/mask/mask_detector_gpu_v3.trueface.enc
Download spoof model v4
curl -O -L https://storage.googleapis.com/sdk-models/enc/spoof/v4/spoof_v4.trueface.enc
Then place the model files in desired location, be sure to set the correct modelsPath in your sdk initialization.
FAQs
Trueface SDK for Javascript
The npm package @trueface/trueface-sdk-javascript receives a total of 1 weekly downloads. As such, @trueface/trueface-sdk-javascript popularity was classified as not popular.
We found that @trueface/trueface-sdk-javascript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.