Skip to content

Model files

The library doesn’t ship a model. You bundle one with your app and pass its file name to usePoseDetection or PoseDetectionOnImage.

Google publishes three pose landmarker models. They all output the same 33 landmarks; the bigger ones are more accurate and slower.

Model Download Best for
Lite pose_landmarker_lite.task Live camera on most phones. Start here.
Full pose_landmarker_full.task Better accuracy on recent devices
Heavy pose_landmarker_heavy.task Static images, or when accuracy matters more than frame rate

Put the file in a folder in your project, for example assets/models/pose_landmarker_lite.task, and point the config plugin at that folder:

app.json
{
"expo": {
"plugins": [
["react-native-mediapipe-posedetection", { "assetsPaths": ["./assets/models/"] }]
]
}
}

On npx expo prebuild the plugin copies every file in that folder to:

  • Android: android/app/src/main/assets/
  • iOS: the root of the Xcode project, added to Copy Bundle Resources

Run npx expo prebuild --clean again whenever you add or change a model. See Expo config plugin for all options.

Pass just the file name. The native side looks it up in the app bundle (iOS) or assets folder (Android):

usePoseDetection(callbacks, RunningMode.LIVE_STREAM, 'pose_landmarker_lite.task');