Real-time emotion detection for mobile
A React Native library that detects emotions and tracks motion using on-device AI. No cloud, no servers, just your phone.
😊Happy - positive mood
🤩Excited - high energy
😴Tired - drowsiness detected
😐Neutral - baseline

For Developers
Use this library in your own React Native apps. All metrics are available through simple APIs.
Available Metrics
emotionCurrent emotional state: happy | excited | tired | neutral
confidenceDetection confidence level (0-100)
smileIntensitySmile percentage (0.0 - 1.0)
headMovementHead motion activity (0-100)
eyesClosedBoolean indicating if eyes are closed
drowsinessLevelDrowsiness percentage (0-100)
energyLevelOverall activity level (0-100)
eyeClosureRateRate of eye closure (0.0 - 1.0)
Detection Methods
EmotionDetector.initialize()Initialize the emotion detection system
EmotionDetector.detectEmotion(faces)Analyze faces and return emotion data
EmotionDetector.getStats()Get aggregated statistics over time
EmotionDetector.reset()Clear history and reset detectors
How It Works
- 1.Face Detection - ML Kit's TensorFlow Lite model detects faces and facial landmarks on Arm processors
- 2.Smile Analysis - Measures smile probability with exponential smoothing to prevent sudden drops
- 3.Eye Tracking - Monitors eye openness probability and calculates closure patterns
- 4.Motion Detection - Tracks head position changes and calculates movement velocity
- 5.Emotion Classification - Custom algorithm combines all metrics to determine emotional state
Built With
React NativeExpoML Kit (TensorFlow Lite)TypeScriptVision Camera
Powered by TensorFlow Lite on Arm • Optimized for mobile • Runs entirely on-device