face-api.js icon indicating copy to clipboard operation
face-api.js copied to clipboard

False positive examples. How to improve matching accuracy?

Open AmirAbrams opened this issue 5 years ago • 3 comments

This is a great library to detect faces, landmarks and expressions. Is it possible to improve the accuracy of face matching?

I found that Margot Robbie and Jaime Pressly often produce false positive matches. I tested the same pictures using Face++ and it also produced false positive matches for them (distance is 0.42 below). face-api-js-jaime-and-margo

Elijah Woods and Daniel Radcliffe also produced false positives matches (distance is 0.38 below). face-api-js-elijah-and-daniel They didn't score high using Face++ and all pictures of Elijah and Daniel did not match.

Is it possible to use these examples to improve the CNN model(s) or the euclidean distance algorithm? What tools were used to create the TensorFlow models?

Thank you.

AmirAbrams avatar Dec 05 '19 08:12 AmirAbrams

The problem is not the models, you are comparing two unaligned faces with each other, which is invalid input for the face recognition model. The BBT Face Similarity example works on aligned and cropped face images as you can see from the initial images provided in the example.

You first have to perform face detection + alignment, which is done by the example shown in the "Face Recognition" tab of the web GUI.

justadudewhohacks avatar Dec 06 '19 09:12 justadudewhohacks

@justadudewhohacks, I will try that out. Thanks so much.

AmirAbrams avatar Dec 06 '19 23:12 AmirAbrams

I'm also straggling to get better result when trying to know whether a face (give by a source image) appears in a random image with several faces.

@justadudewhohacks do you mean that
faceapi.detectAllFaces(image).withFaceLandmarks().withFaceDescriptors() ? is this the best way to make results to be more accurate ?

yonatanm avatar Jul 02 '22 20:07 yonatanm