Mjrovai / OpenCV-Face-Recognition

Real-time face recognition project with OpenCV and Python
1.18k stars 1.02k forks source link

How to run an action upon seeing someone who hasn't been trained in? #25

Open Aedanp07 opened 3 years ago

Aedanp07 commented 3 years ago

Hi! I love this amazing face recognizer that you have made, and I play with it so much. There is one thing that I have a question about, though: How do you run an action upon seeing someone who hasn't been trained into the system? Basically, if the AI sees someone, and it isn't ID 1, 2, 3, etc., what ID is it? I know the code for if a certain ID is found, which is: elif str(id) == "1": confidence = " {0}%".format(round(100 - confidence))

but no matter how much I have toyed around with the confidence settings, I cant get it to work. Is there is a fix to this?