Aurai
Aurai is a camera-first Expo app that detects human poses, classifies the scene, and can suggest improved poses for better photos. It combines real-time pose estimation (MediaPipe via a hidden WebView) with a skeleton overlay and optional AI-based pose recommendations.
Features
- Live camera preview with capture, timer, and aspect ratio controls.
- Pose detection and skeleton overlay using MediaPipe and Skia.
- Scene classification (solo, group, indoor, outdoor).
- Photo capture and gallery preview.
- Optional pose recommendations backed by an Ollama model endpoint.
Getting started
Prerequisites
- Node.js 18+ and npm
- Expo Go or a development build for running on device
Install dependencies
npm install
Run the app
npm run start
Then choose a platform:
npm run androidnpm run iosnpm run web
App permissions
The app requests camera access for pose detection and photo capture. It also requests media library access to save captured photos.
Pose analysis flow
components/MediaPipeView.tsxloadsassets/mediapipe.htmlin a hidden WebView.- The camera captures a frame and posts it to MediaPipe for pose detection.
utils/sceneDetector.tsclassifies the detected pose into a scene type.components/SkeletonOverlay.tsxrenders the 33-point skeleton overlay.
Pose recommendations (Ollama)
Pose recommendations are powered by an Ollama endpoint defined in utils/ollamaService.ts:
- Update
OLLAMA_HOSTto point to your Ollama server. - Update
OLLAMA_MODELto the model you want to use.
The recommendation uses the detected keypoints plus the captured frame to return a suggested pose and description.
Project structure
app/— route-based screens (index.tsx,preview.tsx)components/— camera overlays and MediaPipe bridgeutils/— scene detection, camera layout helpers, Ollama integrationassets/— static assets andmediapipe.html
Scripts
npm run start— start Expo dev servernpm run android— launch on Androidnpm run ios— launch on iOSnpm run web— launch on webnpm run lint— run Expo lint
Troubleshooting
- If
expois not found, runnpm installfirst or usenpx expo start. - MediaPipe needs the bundled
assets/mediapipe.html; ensure assets are included when publishing.