/TF-siamesenet

Face recognition based on SiameseNet

Primary LanguagePython

TF-siamesenet

The main work of the article is to use the SiameseNet model to achieve the function of face recognition. The SiameseNet convolutional neural network model is as follows (detailed structure moves to GitHub, a simplified version of VGG): SiameseNet model Input and output examples

The data set uses Microsoft's MS-Celeb-1M public face data set. We directly download the aligned data set. First, there is a cleaned list on the network. The file name is: MS-Celeb-1M_clean_list.txt, about 160M. Then use the combination algorithm to generate two files, positive_pairs_path.txt and negative_pairs_path.txt, each about 1.5million pairs. Generate file example

The key question is, how to define the loss function, the loss function is Logistic Regression loss function actually, it is worth noting that the last layer of the activation function should use Sigmoid Function. The Loss function is as follows: Loss function

The next step is training, training on TITAN X for about 3 days, we can see this Loss curve: Loss curve

We can see that Loss converges very well.

What about the correct rate of our model? Haha, not very good, the correct rate on the LFW is 94%+, and the model needs to be optimized. If you have ideas to solve this problem, you can give me a message or Email me (hfrommane@qq.com).

Project source code: https://github.com/hfrommane/TF-siamesenet

Chinese readme version is: https://www.jianshu.com/p/1df484d9eba9

If you like, give me a star, thanks.