Face-api.js: SOLVED: Distance is high

Created on 16 Jul 2019  路  6Comments  路  Source: justadudewhohacks/face-api.js

Hello Vincent, thanks for this fantastic API,

I'm getting some recognition tests, and my distance is low as you can see in the photo, is it possible this better? Thank you very much, I am using a photo in the base for the recognition, I already shot like photos, but I did not have significant changes.

image

Most helpful comment

Hmm looks good to me, what's the issue? The low distance tells you that the faces you are comparing are very similar.

All 6 comments

Can you show me the relevant code and the reference image/s you are using?

Hello Vincent, thank you for answering me quickly.

In this snippet of code is where I capture an image and do the detection of the broken using the tiny and check in the JSON if it has some similar

       shot = await blobImage();

       image = await faceapi.bufferToImage(shot.blob);
       image_shot = await shot.b64;

        const displaySize = { width: image.width, height: image.height };
        const detections = await faceapi.detectAllFaces(image, new faceapi.TinyFaceDetectorOptions()).withFaceLandmarks().withFaceDescriptors().withFaceExpressions();
        const resizedDetections = faceapi.resizeResults(detections, displaySize);
        const results = resizedDetections.map(d => faceMatcher.findBestMatch(d.descriptor));

        results.forEach((result, i) => {
            console.log(result);`

This image i use for traning

image

Hmm looks good to me, what's the issue? The low distance tells you that the faces you are comparing are very similar.

Can you reduce even more from a distance? 0.4 for my application is very high yet, would have improve for + - 0.2

Not really, 0.4 is already an indicator for very strong similarity. The threshold value should be 0.6 anyways.

Humm ok, thank very much Vincent, your API is fantastic!!!

Hugs my friend.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichaelFay picture MichaelFay  路  4Comments

logypaser picture logypaser  路  3Comments

luisdemarchi picture luisdemarchi  路  3Comments

XDmoyang picture XDmoyang  路  6Comments

dmohns picture dmohns  路  7Comments