On-device face recognition Android app
Enroll a person from their face and identify them later, with no internet connection and no server.
- Period
- 2025 · ~3 months
- Team
- Small
- My role
- Mobile developer
- Focus
- 100% Android
These projects are under a confidentiality agreement. Client names, code and screenshots are not shown; titles are descriptive.
Context
A native Android app that captures a face with the camera, processes it and generates a face embedding (a numeric vector) to enroll the person and identify them later. Everything runs on the device.
It is used by operators who enroll and identify people for access control. We started from an earlier proof of concept and built several prototypes and internal support libraries before the final app.
Problem
Identify people quickly and offline.
The technical challenge: running computer vision models on a phone with good performance. Detect the face in real time, capture it only when it faces the camera, align it, generate the vector and search for it by similarity among enrolled people.
What I did
- Real-time capture with the device camera (Camera2) and per-frame processing.
- Face and landmark detection, with automatic capture when the person faces the camera.
- Face alignment, cropping and normalization before feeding the model.
- Face embedding generation with a neural network running on the device.
- Vector similarity search in native code, plus local storage of enrolled records.
Problems solved
- Processing camera frames in the background without blocking the UI.
- Adapting the image processing logic to run on Android.
Architecture
Offline native app: image processing, model inference and vector search all run on the device.
Stack
- Java
- Android SDK
- Camera2
- Android NDK (C/JNI)
- Gradle
- ONNX Runtime
- MediaPipe
- OpenCV
- SQLite
What I learned
Native Android development, on-device AI models, image processing, embeddings and vector similarity search, and integrating C code into Android.