Algorithms for finding similar views?

I am doing a personal project, trying to find a person who looks like a database with photographs of other people who are taken sequentially - people who look directly at the camera, have a neutral expression and do not lean toward their heads (I think a photograph of a passport).

I have a system for placing markers for 2d coordinates on faces, and I was wondering if there are any known approaches for finding similar views on this side with this approach?

I found the following face recognition algorithms: http://www.face-rec.org/algorithms/

But no one deals with the specific task of finding similar ones.

Thank you for your time.

+7
source share
3 answers

I believe that you can also try to find "Face Verification", not just "Face Recognition". This may give you more relevant results.

Strictly speaking, these two things are actually different in the scientific literature, but sometimes they face recognition. For more details on their differences and an example, see here: http://www.idiap.ch/~marcel/labs/faceverif.php

However, for your purposes, what others kindly suggested, such as Edward and Ari, will also work. They mainly offer a face recognition classifier of the K-nearest neighbor class. You can try this first. First, calculate the function vector for each of your face images in your database. One possible use case is the local binary pattern (LBP). You can find the code by clicking on the link. Do the same for your request image. Now scroll through all the object vectors and compare them with the image of your query using the Euclidean distance and return the K nearest ones.

While the aforementioned method is easy to code, it will generally not be as reliable as some of the more complex ones because they usually fail poorly when the faces are not aligned (known as unlimited pose). Search for "Labeled faces in the wild" "to see results to achieve this goal") or taken in different environmental conditions. But if the faces in your database are aligned and accepted under similar conditions, as you mentioned, then this might work. If they are not aligned, you can use the points of the key points of the face that you mentioned, which you can calculate to align the faces. In general, comparing individuals who are not aligned is a very complex problem in computer vision and is still a very active area of ​​research. But if you consider only faces that look the same, and in the same pose should be similar (that is, similar in pose, as well as external), then this should not be a problem.

Your website has code links for Eigenfaces and Fisherfaces. These are essentially 2 methods for calculating feature vectors for your face images. Faces are identified by searching for the nearest neighbor K for faces in the database with function vectors (computed using PCA and LDA, respectively) closest to the request image objects.

I should probably also mention that in the Fisherfaces method you will need to have “tags” for faces in your database to identify faces. This is because the linear discriminant method (LDA), the classification method used by Fisherfaces, needs this information to calculate the projection matrix, which will design feature vectors for faces close to each other and close to each other. A comparison of these predicted vectors is then performed. Here lies the difference between face recognition and face verification: for recognition, you need to “stick” your training images in your database, that is, you need to identify them. For verification, you are only trying to tell if any 2 given faces have the same person. Often you do not need “tagged” data in the traditional sense (although some methods may use ancillary training data to help verify your face).

The code for calculating Eigenfaces and Fisherfaces is available in OpenCV if you use it.

As a side note: A functional vector is really just a vector in the sense of your linear algebra. These are just n numbers packed together. The word “feature” refers to something like “statistics,” that is, a feature vector is a vector containing statistics that characterizes the object that it represents. For example, for the face recognition problem, the simplest feature vector will be image intensities in grayscale. In this case, I just change the 2D array of numbers in n rows to one column vector, with each record containing the value of one pixel. The pixel value here is a “feature”, and the vector of the vector nx 1 pixel is a feature vector. In the case of LBP, roughly speaking, it computes a histogram with small spots of pixels in the image and combines these histograms together into one histogram, which is then used as a feature vector. Thus, the local binary pattern is statistics, and the histograms combined together are a feature vector. Together they described the “texture” and facial patterns of your face.

Hope this helps.

+5
source

These two options look like an equivalent problem, but I do not work in this area. You have the following two problems:

  • Face recognition: take a face and try to match it with a person.

  • Find Similar Faces: Take a face and try to find similar faces.

Are these equivalents? In (1), you start with the image that you want to combine with the owner, and compare it with the database for reference for every person you know. In (2), you select an image in your reference database and perform (1) for that image against other images in the database.

Since the algorithms seem to give you an idea of ​​how likely it is that the two photos belong to the same person, in (2) you simply sort the measures in descending order and select the upper images.

0
source

I assume that you should first analyze all the images in your database with whatever approach you use. Then you should have a set of indicators for each image with which you can compare a specific image and statistically find the closest match.

For example, if you can measure the distance between the eyes, you can find faces with the same distance. Then you can find the person having the common closest match and return it.

0
source

All Articles