Determine if biometric hardware is present and the user has enrolled biometrics on Android P
Date : March 29 2020, 07:55 AM
Any of those help Google finally solved this problem with Android Q The android.hardware.biometrics.BiometricManager#canAuthenticate() method can be used to determine if biometrics can be used. Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
context.packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)
|
Biometrics with iris and face recognition
Date : March 29 2020, 07:55 AM
I wish this helpful for you Android 9 only includes support for the Fingerprint aspect of biometric authentication. Iris and facial recognition will be supported down the line. Note that this results in the deprecation of the previous FingerprintManager APIs when writing apps for Android P.
|
Can you determine if the user just unlocked the mobile device using biometrics?
Date : March 29 2020, 07:55 AM
seems to work fine Reading through what you've written I had a thought in my mind: why exactly are you pivoting around biometric unlock? For your purposes, I guess, any kind of unlock will do. Give this thread a shot Android - detect phone unlock event, not screen on
|
How can I observe when user authenticates the app with biometrics?
Tag : ios , By : CodeOfficer
Date : March 29 2020, 07:55 AM
Hope this helps You don’t need a “callback” for this. If the user refuses authentication in response to the dialog, the only way authentication can happen is in Settings, i.e. outside your app. So just check for authentication every time your app comes to the foreground.
|
Storing a list of face encodings in python for face identification
Date : March 29 2020, 07:55 AM
seems to work fine If you are going to use your program as a general face identification method, storing them in a database as separate records might not be a good idea. Consider this case: You have 100,000 encoded vectors and you want to check if the new photo has any corresponding record in your previously seen faces. As you need to compare the new vector against all of the stored ones, you need to either load all of them upon each request or load them once and cache it in memory to do a vectorised operation over all of them (e.g. getting euclidian distance). As you can see, none of the database operations like indexing, searching on fields, transactions, etc. is getting used. So, I recommend leaving it with pickle objects on disk for persistence and load them once while the program is invoked. If you are going to add/remove stuff from the storage, I suggest a NoSQL database (like MongoDB) for storing the objects. This allows you to avoid creating not meaningful tables/ dealing with BLOBs etc. that do not provide any benefit in your case. Here is a starter for dealing with mongo (you need to install it before running the code): from pymongo import MongoClient
import numpy as np
client = MongoClient('localhost', 27018)
db = client['face_db']
faces = db.face
first_person_name = "John"
first_sample_face_embedding = np.random.rand(128).tolist()
second_person_name = "Julia"
second_sample_face_embedding = np.random.rand(128).tolist()
faces.insert_many([
{"name": first_person_name, "embedding": first_sample_face_embedding},
{"name": second_person_name, "embedding": second_sample_face_embedding}
])
#### load data back
all_docs = list(faces.find({}))
names, embeddings = [doc["name"] for doc in all_docs], [doc["embedding"] for doc in all_docs]
embeddings = np.array(embeddings)
target_embedding = np.random.rand(128)
# do stuff here
|