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.
- 🔍 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
- 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
- Install dependencies:
yarn install- iOS setup:
cd ios && pod install- Android setup:
Ensure yourandroid/build.gradlehas:
minSdkVersion = 24Your 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.
- ✅ iOS 17+ (Xcode 15.4)
- ✅ Android 13+ (CameraX)
- Requires camera permission (
Info.plistandAndroidManifest.xml) - Runs better on physical devices than emulators
- Use
fps={5}to balance CPU load
This POC is for demo and learning purposes. MIT License.