Introduction
react-native-mediapipe-posedetection brings Google’s MediaPipe Pose Landmarker to React Native. It detects people in a camera feed or an image and returns 33 landmarks for each person: points on the face, arms, hands, torso, legs and feet.
How it works
Section titled “How it works”- You create a detector with
usePoseDetection, giving it a MediaPipe model file and some options. - The hook returns a VisionCamera frame processor. You attach it to a
<Camera>(or use the bundled<MediapipeCamera>). - Every camera frame is passed straight to MediaPipe in native code (Swift on iOS, Kotlin on Android).
- Results come back to JavaScript through your
onResultscallback, along with a helper that converts landmark coordinates into screen coordinates for drawing.
For photos you don’t need a camera at all: call PoseDetectionOnImage(path, model) and await the result.
Requirements
Section titled “Requirements”| React Native | 0.74 or newer |
| Architecture | New Architecture only (TurboModules) |
| iOS | The minimum iOS version of your React Native version |
| Android | API 24+ |
| Expo | SDK with New Architecture enabled, using a development build (not Expo Go) |
| Peer dependencies | react-native-vision-camera v4, react-native-worklets-core |
Credits
Section titled “Credits”The pose detection code is based on react-native-mediapipe by cdiddy77, rewritten as a TurboModule for the New Architecture.
Head to Installation.