I'm trying to implement a face auth which analysis face of a user, stores the data and then authenticate the user with the face data stored in the memory.
I have used the googles ML Kit to detects and get the faces, how then do I carry on from here using FaceNet to get the embeddings, so I can store it and compare for authentification?
private fun processImageProxy(detector: FaceDetector, imageProxy: ImageProxy){
val inputImage = InputImage.fromMediaImage(imageProxy.image!!, imageProxy.imageInfo.rotationDegrees)
detector.process(inputImage)
.addOnSuccessListener { faces ->
Log.i("faces", faces.toString())
binding.faceboxOverlay.clear()
faces.forEach{ face ->
}
}
}
.addOnFailureListener {
Log.e(TAG, it.message ?: it.toString())
}
.addOnCompleteListener {
imageProxy.close()
}
}