davidsandberg / facenet

Face recognition using Tensorflow
MIT License
13.73k stars 4.8k forks source link

How to use embedding at service time for face recognition #972

Open FSet89 opened 5 years ago

FSet89 commented 5 years ago

Consider a real-time face recognition system in the following situations:

Now, at service time, what is the best approach to perform recognition in both cases? Is it correct to take the embeddings related to the valid person, compute the mean and compare it with embeddings coming from new images, using a distance threshold for the decision? Are there smarter and more robust ways?

fybaft2012 commented 5 years ago

Hey FSetragno, Have you found the solution about using pre-trained face embedding in real face recognition task? Actually, I tried use the same way posted at https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/ (k-nearest neighbor) and https://www.pyimagesearch.com/2018/09/24/opencv-face-recognition/ (linear SVM classifier)

First of which used KNN clustering method, and second used the linear SVM classifier. However both of them gave the poor performance with my own pre-trained face embedding model instead of dilb face embedding model.

FSet89 commented 5 years ago

In my specific case I don't have many samples for each identity, so I am not sure that a classification task would work. I am looking for a quick solution that would work with very few samples. So far I tried with just a distance measure and a threshold but maybe there are smarter solutions...

AhmadShaik commented 5 years ago

Dear @FSetragno I am also searching for solutions to the same problem. I am using face_recognition repo based implementation to detect the unknown person but some times I am getting the unknown face embedding vectors whose euclidean distance is very close to the known face embedding vector. If you found any solution please share with me.