Face Recognition on Android

How can I use Android's Face Unlock within my own private application?

For those who don't feel like reading: OpenCV can accomplish all of what you are looking for in terms of facial recognition. (Documentation here)

This is a difficult question to answer as few existing android applications make use of the facial recognition technology you ask for. However, you may want to check these sites out:

A good list of face detection software

A decent walkthrough for some of the main api's available

Another higher quality tutorial...

Documentation for default android FaceDetector class

It might be useful to take a look at this sample which uses the OpenCV library

I understand the problem of not being able to accomplish this offline. To get around this you could always add a "backup" such as a normal passcode which only comes into effect after it is discovered that the user has no internet access. Another solution would be to simply require a stable internet/cellular connection for your app to function.

EDIT: Unfortunately,

Face unlock is closed-source google proprietary code, so we have no opportunity to modify it.
Source: http://forum.xda-developers.com/showthread.php?t=1367610

You are probably looking for the following information:

The most popular library for image manipulate and the like seems to be OpenCV which has a Java wrapper that can be found here

You would also need this to be running in the background, periodically checking user's face without an indication that this is taking place so you should keep that in mind when choosing your library/approach

Source: A while ago, I implemented face recognition technology as a way for users to sign into one of my apps so I am just recounting what I remember in my search for an answer to this same question

Your scenario:

If you need a real world example, assume that this is a password manager, or the phone will be loaned to a child... and the owner never locks the phone. Face unlock will secure the things they need private.

As for accomplishing this, I would read up on android encryption if that is what you mean by "secure the things they need private." Otherwise if you just want to create an "app lock" of sorts using face recognition instead of a passcode, this is much more simply and can be accomplished using intents/basic if-statements, etc. (I'm assuming you are accomplished with Java)

Please feel free to ask questions. Currently I am looking for my old source code where I did something similar to what you want but I doubt I still have it...

UPDATE: Check this out... and yes OpenCV can be used offline so I think this is what you guys are looking for

Security of devices who implement Face Unlock on Android 10

There is not a universal Android face unlock - each device maker creates their own implementation. However, they all do need to meet certain security requirements referenced in the Android Compatibility Definition Document for Android 10.

Strong biometrics (such as Pixel's face-unlock feature) must have a spoof acceptance rate ("The chance that a biometric model accepts a previously recorded, known good sample") of at most 7%, and a false accept rate ("how often a model mistakenly accepts a randomly chosen incorrect input") of at most 1 in 50000.

Of course, this is the minimum security level: implementations may be stronger than the minimum required.

There are other strength classes of biometrics (weak, convenience) - you can check that link for detailed descriptions and requirements for each strength class.

How to check if device supports face authentication for BiometricPrompt

The face recognition from Samsung is using the front camera which is not considered a secure biometric. This is what the docs say:

Feature for getSystemAvailableFeatures and hasSystemFeature: The device has biometric hardware to perform face authentication.

What I'm assuming is this will check if the device has secure face recognition, which the Pixel 4 has. From Android 10 and up (Pie had an issue which somewhat enabled unsecure biometrics in the API) Samsung will never show the BiometricPrompt for face recognition. If they provide a secure face recognition in a future device this check will probably return true.

Perform facial recognition offline in android app

It's not possible to run Amazon Rekognition's logic locally on your device.

When the device is offline, you could use Firebase ML Kit, or TensorFlow Lite.

If both are available, does Android BiometricManager default to Face Recognition or Fingerprint?

I had a similar kind of requirement, And after my research, I came to know as of now (Android 10) it depends on OEM's implementation to provide either fingerprint or face recognition for app's authentication.

From Android R, there will be a way to get a prompt to choose authentication either fingerprint or facial.

Please have a look at the below issues been raised for a similar requirement.

https://issuetracker.google.com/issues/111315641



Related Topics



Leave a reply



Submit