This application uses the 1024-dimensional Face Embedding obtained from the Clarifai API, for each face, and performs a series of calculations on the phone, to check if 2 faces are close to each other, within a threshold.
The best feature about this application is it does not require a phone with a robust GPU. You only need a good internet upload speed.
Clarifai's Face Embedding model is still in beta. It might not be the fastest.
It takes about 1.5 seconds to recognize a face with a 43 Mbps upload speed.
It took me 5.94 seconds because I had a 2.75 Mbps upload speed. (I live under a rock :) )
No database, and/or server is used to manage your data.
Clarifai's servers are contacted with your image and it returns the face embedding.
References given at the end
Hello, World! | I'm Srinath |
---|---|
![]() |
![]() |
The first step is to select images that contain only your face. The average vector is calculated for your face.
Getting the embeddings from Clarifai's API and then finding the average vector for each face, for 25 images took 3 minutes... (Due to slow upload speed)
Finding the average vector of my face.. | Done! |
---|---|
![]() |
![]() |
Selecting images | Finding the average vector for Vignesh |
---|---|
![]() |
![]() |
Selecting images | Finding the average vector for Siddath |
---|---|
![]() |
![]() |
Once we find the average vector for each face, we can get a test vector and see which one it is closest to.
It takes 5-6 seconds to recognize me, because of my potato internet upload speed.
With faster speeds, the API calls will naturally be faster.
Clarifai's Face Embedding
Setting up OpenCV on Android Studio