开发者

Compare two faces (and their likeness)

开发者 https://www.devze.com 2023-03-18 07:45 出处:网络
Is there is a way to compare two faces (perhaps with OpenCv) and get a score of their likeness? I mean to apply a facial recognition algorithm, but only between 2 faces, not on an entire da开发者_如何

Is there is a way to compare two faces (perhaps with OpenCv) and get a score of their likeness? I mean to apply a facial recognition algorithm, but only between 2 faces, not on an entire da开发者_如何学编程taset.

The problem is that, for example, Eigenfaces requires at least 2 training images.


Yes, you can absolutely use eigenfaces. The training faces have nothing to do, with the two faces you are comparing for facial recognition. Have a training face gallery of say 100 faces. Then to compare your two faces (face_1 and face_2), do an eigenface decomposition of each face with the 100 faces in your training gallery. So for example face_1 = [2 3 1 5...]*[eigFace1 eigface2 eigface3 eigface4...]' and same for face two. That vector I showed above in the example [2 3 1 5...], compare it for each of your two face decompositions in some sort of distance algorithm (whether it be a euclidean distance or some other distance metric). If the distance within a certain threshold then you can say they are the same. Keep in mind, if you are using eigenfaces the pose, lighting conditions, size, and background of all the training images as well as the faces you are trying to compare must all be normalized. The eyes, noses, a mouths must also be as lined up as possible.


This article explains the whole face recognition process nicely. With face_recognition library you can identify a person even with only 1 image and then try to recognise that person in another image. This is possible because the neural network is already trained.


Try to forget, that you compare faces. Find SURF keypoints for both photos, match their descriptors. As score of photo likeness use ratio of number of matched descriptors to number of all descriptors.


  • You can use compare function which is from openbr.Its give you matched percentage of two faces.

  • And it gives this values based on min, max, mean, stddev for both genuine and impostor.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号