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

@nitro-mlkit/face-recognition

v0.1.0-beta.0

Published

On-device face recognition for React Native — register people, find them in photos. ML Kit detection + a TensorFlow Lite face-embedding model (bring your own, e.g. MobileFaceNet). Nitro/JSI, native batch.

Readme

React Native ML Kit — Face Recognition

@nitro-mlkit/face-recognition · on-device Google ML Kit via Nitro Modules — JSI, no bridge.

⚠️ Beta (0.1.0-beta.x). Android verified on-device; iOS impl pending (see Platform status). You provide the embedding model.

On-device face recognition for React Native, built with Nitro Modules (JSI, no bridge).

Google ML Kit finds & crops faces; a TensorFlow Lite face-embedding model (you supply it — e.g. MobileFaceNet, ~5 MB) turns each face into a vector, and cosine similarity against an in-memory registry answers "who is this?". Built for flows like a party game: register players by selfie, then scan a gallery to find which photos each player appears in.

Why bring your own model? ML Kit only does face detection, not recognition/embeddings. Face-embedding models vary in size/quality/license, so this package ships none (keeping it tiny) and loads one at runtime. Input and output tensor shapes are read from your model, so 112×112 / 128-d / 192-d MobileFaceNet variants all work.

Installation

npm install @nitro-mlkit/face-recognition react-native-nitro-modules

No config plugin (autolinked Expo module). Install and npx expo prebuild. Not available in Expo Go.

Usage

import { NitroRecognizer } from "@nitro-mlkit/face-recognition";

// 1. Provide a face-embedding model once (cached on disk).
await NitroRecognizer.downloadModel("https://your-host/mobilefacenet.tflite");
// …or load one you've bundled / downloaded yourself:
// await NitroRecognizer.loadModel("file:///…/mobilefacenet.tflite");

// 2. Register people (e.g. from selfies).
await NitroRecognizer.registerPerson("marcos", "Marcos", selfieUri);
await NitroRecognizer.registerPerson("lucia", "Lucía", selfieUri2);
await NitroRecognizer.addReference("marcos", anotherMarcosPhoto); // improves accuracy

// 3. Scan photos — one native batch call.
const results = await NitroRecognizer.findPeopleInPhotos(galleryUris, {
  concurrency: 4,
  minSimilarity: 0.6,
});
const marcosPhotos = results.filter((r) =>
  r.people.some((p) => p.person.id === "marcos"),
);

// Lower-level:
const emb = await NitroRecognizer.extractEmbedding(faceUri); // { vector: number[] }
const sim = NitroRecognizer.compare(embA, embB);             // cosine, 0..1

NitroRecognizer.clearRegistry(); // e.g. end of game session

Choosing a model

Any TFLite face-embedding model that takes an RGB face crop and outputs a fixed-length vector works (pixels are normalised as (px − 127.5) / 128). MobileFaceNet (Apache-2.0, ~5 MB, 112×112 → 192-d) is a good default. Host it yourself (e.g. a GitHub release asset or your CDN) and pass the URL to downloadModel(). A curated FaceModel enum of self-hosted, license-clear models is planned for a later release.

Platform status

| Platform | Min | Status | | -------- | --- | ------ | | Android | API 26+ | ✅ Verified on-device (Pixel 9, API 36): register + find + compare | | iOS | 15.5+ | 🔨 Swift impl pending (GoogleMLKit + TensorFlowLite) |

Part of nitro-mlkit

The full ML Kit suite on Nitro — see the other @nitro-mlkit/* packages.

License

MIT © Gonzalo Polo · (bring-your-own model keeps its own license)