npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shinobi-face-api

v2.0.0

Published

FaceAPI: AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Browser and NodeJS using TensorFlow/JS

Readme

shinobi-face-api

AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Node.js using TensorFlow.js

This is the Shinobi Systems maintained fork of FaceAPI.

Why this fork?

The original face-api.js is pinned to TensorFlow.js 1.7 and is no longer maintained.
@vladmandic/face-api modernized it for TF.js 2–4 but is now archived.
Recursive Labs continues maintenance for browser and Node.js under @recursivelabs/face-api. This is a fork of the Recursive Labs version.

Features

  • Face detection (TinyFaceDetector, SSD MobileNet v1)
  • 68-point face landmarks (+ tiny variant)
  • Face recognition descriptors & matching
  • Expression recognition
  • Age estimation & gender recognition
  • Face angle (roll, yaw, pitch)
  • Browser backends: WebGL, CPU, WASM, WebGPU
  • Node backends: tfjs-node, tfjs-node-gpu, WASM

Install

npm install git+https://gitlab.com/Shinobi-Systems/face-api-js

Node.js

npm install git+https://gitlab.com/Shinobi-Systems/face-api-js @tensorflow/tfjs-node canvas
const tf = require('@tensorflow/tfjs-node');
const faceapi = require('shinobi-face-api');
const canvas = require('canvas');

const { Canvas, Image, ImageData } = canvas;
faceapi.env.monkeyPatch({ Canvas, Image, ImageData });

For GPU: use @tensorflow/tfjs-node-gpu and dist/face-api.node-gpu.js.
For WASM-only Node: use @tensorflow/tfjs + @tensorflow/tfjs-backend-wasm and dist/face-api.node-wasm.js.

Models

Pretrained weights live in ./model:

| Model | Purpose | |-------|---------| | tiny_face_detector_model | Fast face detection | | ssd_mobilenetv1_model | Higher-accuracy face detection | | face_landmark_68_model | 68 facial landmarks | | face_landmark_68_tiny_model | Smaller landmark model | | face_recognition_model | 128-d face descriptors | | face_expression_model | Expressions | | age_gender_model | Age & gender |

Load example:

await faceapi.nets.tinyFaceDetector.loadFromUri('/model');
await faceapi.nets.faceLandmark68Net.loadFromUri('/model');
await faceapi.nets.faceRecognitionNet.loadFromUri('/model');

const results = await faceapi
  .detectAllFaces(input, new faceapi.TinyFaceDetectorOptions())
  .withFaceLandmarks()
  .withFaceDescriptors();

In Node, prefer loadFromDisk:

await faceapi.nets.tinyFaceDetector.loadFromDisk('./model');

Bundle formats

| File | Format | TF.js bundled? | Target | |------|--------|----------------|--------| | dist/face-api.node.js | CJS | no | Node + tfjs-node | | dist/face-api.node-gpu.js | CJS | no | Node + tfjs-node-gpu | | dist/face-api.node-wasm.js | CJS | no | Node + WASM backend |

Package entry points:

  • maindist/face-api.node.js
  • typestypes/face-api.d.ts

See TUTORIAL.md for the full API walkthrough.

Develop / build

Requires Node.js 20–22 for develop/build and native @tensorflow/tfjs-node. TF.js native bindings are not compatible with Node 23+. On newer Node, use the WASM build (dist/face-api.node-wasm.js).

npm install
npm run build   # production bundles + typings
npm run lint
npm test        # Node smoke tests (needs native deps for full run)

## Breaking changes vs original face-api.js 0.22.2

- Compatible with **TensorFlow.js 4.x** (not 1.7)
- Package name: `shinobi-face-api` (was `@recursivelabs/face-api`)
- Model path: `./model` (was `./weights`); weight shards are consolidated `.bin` files
- **MTCNN removed** (non-functional in modern TF.js)
- ESM + CJS + IIFE platform builds (not a single UMD-only dist)
- TypeScript targets modern ES; types ship in `types/`
- Node engine: ≥ 18

## Credits

- Original project: [face-api.js](https://github.com/justadudewhohacks/face-api.js) by Vincent Mühler
- TF.js modernization: [vladmandic/face-api](https://github.com/vladmandic/face-api) by Vladimir Mandic
- Continued maintenance: [Recursive Labs](https://github.com/RecursiveLabsInc)
- This Fork : [shinobi-face-api](https://gitlab.com/Shinobi-Systems/face-api-js)

## License

MIT — see [LICENSE](./LICENSE)