Skip to content

Repository files navigation

📸 Face Detector POC – React Native Vision Camera

This is a Proof of Concept (POC) showcasing real-time face detection in a React Native app using react-native-vision-camera and the react-native-vision-camera-face-detector plugin.

It demonstrates how to use Frame Processors with Worklets Core for efficient on-device ML face detection.


🚀 Features

  • 🔍 Detects faces in real-time
  • 🧑‍🤝‍🧑 Supports multiple faces simultaneously
  • 🎯 Provides face bounds, landmarks, and contours
  • ⚡ 100% on-device ML (works offline)
  • 📱 iOS & Android supported
  • ✅ Compatible with React Native New Architecture

🛠️ Tech Stack

  • React Native 0.81.4
  • react-native-vision-camera ^4.7.2
  • react-native-vision-camera-face-detector ^1.8.9
  • react-native-worklets-core ^1.6.2

📦 Installation

  1. Install dependencies:
yarn install
  1. iOS setup:
cd ios && pod install
  1. Android setup:
    Ensure your android/build.gradle has:
minSdkVersion = 24

⚙️ Babel Config

Your babel.config.js already has Worklets Core enabled:

module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: [['react-native-worklets-core/plugin']],
};

This means you don’t need react-native-reanimated/plugin – everything runs via Worklets Core.


🧪 Tested On

  • ✅ iOS 17+ (Xcode 15.4)
  • ✅ Android 13+ (CameraX)

📌 Notes

  • Requires camera permission (Info.plist and AndroidManifest.xml)
  • Runs better on physical devices than emulators
  • Use fps={5} to balance CPU load

📄 License

This POC is for demo and learning purposes. MIT License.

About

Face Detector POC is a React Native demo app using Vision Camera with Worklets Core to perform real-time, on-device face detection. It leverages Google ML Kit and iOS Vision API to detect multiple faces, landmarks, and contours efficiently on both iOS and Android.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages