Always detects unfamiliar people as someone i've trained
Face recognition is working great for me, with one huge exception. It detects everyone (package delivery people, mail man, etc.) as one of the faces I've trained. Even if the person looks nothing like one of the trained subjects, it seems to pick the closest one and match it. Is there a way to configure it so that unknown people don't match as one of the subjects I've trained?
All machine learning systems work in a way where it predicts one of the known classes with a certain probability. The idea here is the same - we always return the closest match, but we return the similarity with it, so you need to decide if it's big enough to trust. Here you can find considerations of how to choose this threshold: https://github.com/exadel-inc/CompreFace/blob/master/docs/Face-Recognition-Similarity-Threshold.md
That link does a good job of describing how to determine what the threshold should be set to, but I cannot figure out where to set it. Which file is it in?
Hi @pospielov, I am also wondering, if the system always predicts one of the known classes with a certain probability then why is there a "No known faces" in the webcam demo? Sometimes it would show unknown faces with a known face but with very low similarity and other times it would just out "No known faces".
That link does a good job of describing how to determine what the threshold should be set to, but I cannot figure out where to set it. Which file is it in?
@dodgeboy, this should be your custom logic on your side. CompreFace always will return you result, but on your side, you need to write something like this:
if result_similarity < threshold:
return "No known faces"
Hi @pospielov, I am also wondering, if the system always predicts one of the known classes with a certain probability then why is there a
"No known faces"in the webcam demo? Sometimes it would show unknown faces with a known face but with very low similarity and other times it would just out"No known faces".
I don't remember how it is implemented, but this is definitely custom logic of the demo, you can look at the implementation and write something similar
Thank you for the responses!