# On-Device Face Recognition In Android

An Android app and reference project that performs on-device face recognition by comparing FaceNet embeddings against a local vector database of known faces.

On-Device Face Recognition In Android demonstrates a full on-device pipeline: detecting faces with MediaPipe or MLKit, producing FaceNet embeddings in either a 128- or 512-dimensional variant, storing them with an embedded vector database, and comparing a new face against the stored set with nearest-neighbor vector search. It also includes an optional face-spoof detection step using a separate anti-spoofing model.

The project reports latency for detection, embedding, and vector search on its main screen, and is built as a reference implementation of modern Android architecture rather than a packaged consumer product, distributed with source code and an APK for testing.

It is written in Kotlin and released under the Apache-2.0 license.

Website: https://medium.com/proandroiddev/building-on-device-face-recognition-in-android-076a40dbaac6
