JSPM

react-native-perch-eye

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51
  • Score
    100M100P100Q9296F
  • License MIT

High-performance React Native SDK for face recognition and verification using native TensorFlow and C++ engine. Extract and compare unique face hashes from images with zero dependencies.

Package Exports

  • react-native-perch-eye
  • react-native-perch-eye/src/index.tsx

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-perch-eye) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

๐Ÿง  Perch Eye SDK React Native Documentation

The Perch Eye SDK for React Native allows you to extract unique face hashes from image sequences and verify them against new images. The SDK is built using TensorFlow and C++ and provides high performance for mobile applications, with zero dependencies.


๐Ÿ”ง Integration

Install the native module:

npm install react-native-perch-eye

๐Ÿ”ง Initialization

import { init, destroy } from 'react-native-perch-eye';

await init();      // Init native engine
await destroy();   // Cleanup

Note: These methods are called natively by the module lifecycle, so manual calls are usually not required.


๐Ÿš€ Usage

๐Ÿ” Enroll - Create Hash From Face Images

To create a face hash from a sequence of base64 images:

import { openTransaction, addImage, enroll } from 'react-native-perch-eye';

await openTransaction();
await addImage(base64Image1);
await addImage(base64Image2);
// ...
const hash = await enroll();

๐Ÿงช Verify - Compare New Face With Stored Hash

To compare a new image sequence against a previously created hash:

import { openTransaction, addImage, verify } from 'react-native-perch-eye';

await openTransaction();
await addImage(base64ImageNew);
// ...
const similarity = await verify(hash);

โšก Compare a list

Compares a list of base64-encoded images against a face hash.

import { evaluate, compareList } from 'react-native-perch-eye';

const hash = await evaluate(base64Images);
const similarity = await compareList(base64Images, hash);

โšก Optional: Direct Face Comparison

Convenience method: Internally performs:

  • openTransaction()
  • addImage(image1) โ†’ enroll() โ†’ openTransaction() โ†’ addImage(image2) โ†’ verify()
import { compareFaces } from 'react-native-perch-eye';

const sim = await compareFaces(img1, img2);

โ— Error Codes

addImage method error codes :

// Returned string:
"SUCCESS" |
"FACE_NOT_FOUND" |
"FILE_NOT_FOUND" |
"TRANSACTION_NOT_OPEN" |
"SDK_NOT_INITIALIZED" |
"INTERNAL_ERROR"

โœ… Summary

  • Minimal, high-performance Flutter SDK for face hash comparison.
  • Zero dependencies, designed for mobile applications.
  • Works with both base64 and raw RGBA face images.
  • Includes methods for enrolling, verifying, and comparing face hashes.