This summer, the "college student research plan" was launched in Beijing automation from. Mentor and Senior Brother are both nice. Have a fruitful summer vacation!
My understanding of face recognition: Compare the similarity between the two faces, and the storage of images is a matrix. Then we can compare the closeness of these two matrices. If they are "very close ", it is the same person. On the contrary, if the difference is great, it is not a person. How can we determine that the two matrices are "close"? The answer is rich and colorful, so there are various methods.
Next, let's talk about the whole process of face recognition: sample -- extract feature -- training -- get classifier -- Test
1 sample: I used the lfw (labeled face in wild) database. Click lfw to go down. There are 13233 images, corresponding to 5749 people.
2. Extract the features. I used the HSV method. In addition, because the feature is too large to be extracted, if direct training is required, the cost is too high. We recommend that you compress the feature, here I am using the PCA method of CAI Deng. You can use the toolbox here for convenience.
3. During the training process, metric learning is used here.
Here we refer to Cao Qiong's similarity metric learning for face recognition and Jason v. Davis's Information theoretic metric learning. They all have complete code posted, but unfortunately they are all Matlab.
As mentioned above, how to find a proper distance to "exactly" the same person and different people can be separated, of course we can use the European distance we are familiar with, d1 = (X-Y) '(X-Y) (X, Y is the matrix of two faces), but the effect is not good, at this time we will find a way, what distance, usually, markov distance d = (X-Y) 'G (X-Y), at this time we find a suitable g through training, this g can make when X and Y are close to get a small value; cao Qiong also introduced another distance, D2 = xmy, which is very large when X and Y are close, while D is very small when it is far away. Cao Xiong combines the above two points, D = d2-d1. Jason v. Davis only uses D1.
In essence, metric learning is to find a suitable matrix G.
I feel that this is transformed into an optimization problem. We must be an optimal indicator and then give some restrictions, which will become a familiar operational research problem.
4. Obtain the classifier. With G, the classification is simple. KNN can be used for classification or a simple threshold value. If D is greater than a certain value, it is not the same person, if it is less than a certain value, it is a person.
5. Training results: the recognition rate is 400 based on 89.7%-Dimension Data.