Hi,
Iam developing an android app using MLKIT Vision for face detection.
- I can able to detect the user faces using mlkit vision and store the detected faces in internal storage.
Now i want to verify the user faces with stored faces like. If a user opens the app starting capturing the user face and i want to verify with the stored face.
How to verify the two faces are identical or not using the MLKIT vision?
Saravanan GanesanPosted Aug 14, 2023, 12:21 PM
To verify if two faces are identical using ML Kit Vision:
Please note that ML Kit Vision primarily focuses on face detection, not face recognition. For face recognition, you might need to use a dedicated face recognition library or implement a deep learning model.
Ravikant SahuPosted Aug 11, 2023, 1:21 PM
you can do it like this
// Step 1: Store contour = // List of face contour stored in internal storage
val storedcontours: List
// Step 2: Capture User Face
val capturedImage: Bitmap = // Captured user's face image
val capturedFacecontour: FloatArray = // Compute contour for the captured face using ML Kit
// Step 3: Compare contour
for (storedcontour in storedcontours) {
val similarityScore = calculateSimilarityScore(capturedFacecontour, storedcontour)
if (similarityScore > threshold) {
// Face match found, user is verified
break
}
}
Rajanikant HawaldarPosted Nov 4, 2020, 11:22 AM