I have a system that recognizes faces in real-time. I've collected facial features from two different people and labeled the features as "1" and "2". Currently, I'm able to recognize these two people in real-time using the following code sample:
classifier.predict(new_instance)
However, when it comes to a new person (who has not any features in the current model), ML model still predicts him/her as "1" or "2". (The model has to say this person is either "1" or "2"). I've used predict_proba method to overcome this issue by setting a threshold in case of the prediction probability is less than a value, but it still gives high probabilities like that:
classifier.predict_proba(new_instance)
Probabilities :
[[0.97499996 0.02500004]]
So, my question is that is it possible to detect the person he/she is not pre-recorded? Or is there any metric to calculate the confidence score of the real-time prediction?