bearsprogrammer / real-time-deep-face-recognition

using facenet algorithm
MIT License
233 stars 100 forks source link

How to not label faces that are not included in the training? #15

Open elnasdgreat opened 6 years ago

elnasdgreat commented 6 years ago

I trained with my own datasets and have successfully recognized faces. The problem is, when the camera sees a new face (face that was not included in training) it will still label it with a name. What I want is to filter out faces that are not included in the training so that only those trained face images will be labeled. Please help me, which part of the code to edit in order to achieve this.

angelicali commented 6 years ago

You can add a line here to only label a box if it's confident: if best_class_probabilities > 0.7:, and indent line 120-127.

elbayaninho commented 6 years ago

Thank you @angelicali @elnasdgreat see my example in picture. I use a probabilite > 0.2 for example. code

elbayaninho commented 6 years ago

Sorry for late, i want to ask @angelicali , i try to display best_class_probabilities but it never exced 0.3, i want to known how to do to get 0.7? Thank you again.