To confirm whether the result of the prediction is reliable or it should be taken as an unknown person, we perform face verification (also referred to as face authentication) to obtain a confidence metric showing whether the single face image is similar to the claimed person (as opposed to face identification, which we just performed, comparing the single face image with many people).
OpenCV's FaceRecognizer class can return a confidence metric when you call the predict() function, but unfortunately the confidence metric is simply based on the distance in eigen-subspace, so it is not very reliable. The method we will use is to reconstruct the facial image using the eigenvectors