Anima is the Android companion app for a smart glasses-based continuous mental health monitoring system. The glasses collect physiological signals (PPG, EDA, skin temperature, IMU, eye tracking) over BLE and stream them to the app. All ML inference runs on-device. No data leaves your phone.
Part of a research project: Smart Glasses for Continuous Mental Health Monitoring: A Multi-Sensor Approach with Real-time Analysis — Cambridge Institute of Technology, Bengaluru.
| Home / Dashboard | Stress Detection Result |
|---|---|
![]() |
![]() |
The smart glasses hardware (ESP32 + sensor array) streams data to the app over Bluetooth Low Energy. The app fuses signals from five sensor modalities and runs a dual-model inference pipeline:
- Anomaly Detection Model — establishes a personal physiological baseline during the first week of use, then flags real-time deviations that may indicate stress or fatigue.
- Personalization Model — a Random Forest classifier that updates continuously from user feedback, adapting decision boundaries to individual stress patterns over time.
Alongside sensor data, the app pulls contextual signals via Android's Health Connect API: screen time, sleep duration, step count, and app usage patterns. All of this feeds into a unified stress score surfaced on the dashboard.
When severe stress is detected, the app can trigger an SOS alert to emergency contacts.
| Sensor | Model | Signal |
|---|---|---|
| PPG | MAX30102 | Heart rate and HRV |
| EDA | Custom | Skin conductance |
| Temperature | DS18B20 | Skin temperature |
| IMU | MPU-6050 | Motion and orientation |
| Eye tracking | OV2640 NoIR + 850nm IR LEDs | Pupil diameter and blink rate |
| Microcontroller | ESP32-WROOM-32 | BLE communication |
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM + Clean Architecture |
| ML Inference | TensorFlow Lite |
| Dependency Injection | Hilt |
| Device Communication | Bluetooth Low Energy (BLE) |
| Health Data | Android Health Connect API |
| Build System | Gradle Kotlin DSL |
| Testing | JUnit, Espresso, MockK |
anima/
├── frontend/
│ └── app/
│ └── src/main/java/com/dilip/anima/
│ ├── presentation/ # Screens, ViewModels, UI state
│ ├── domain/ # Use cases, ML model wrappers
│ ├── data/ # Repositories, BLE data sources
│ └── di/ # Hilt modules
├── build.gradle.kts
├── settings.gradle.kts
└── gradle.properties
Prerequisites
- Android Studio Jellyfish (2023.3.1) or newer
- JDK 17
- Android device or emulator running API 24 (Android 7.0) or higher
- Smart glasses hardware (ESP32 + sensor array) for full functionality
- The app runs in standalone mode without the glasses for UI and dashboard exploration
Setup
git clone https://github.com/DILIP-SHEESH/anima.git
cd animaOpen in Android Studio, let Gradle sync, then run on a device or emulator. No API keys or external services required.

