New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-perch-eye

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-perch-eye

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.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
2
Created
Source

🧠 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.

Keywords

react-native

FAQs

Package last updated on 04 Jun 2025

Did you know?

Socket

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.

Install

Related posts