Giter VIP home page Giter VIP logo

deepid-implementation's Introduction

deepid@460

DeepID-implementation

DeepID-implementation is an implementation of paper "Deep Learning Face Representation from Predicting 10,000 Classes", which proposes to learn a set of compact, 160-dims high level feature representations through deep learning, referred to as Deep hidden IDentity features (DeepID), for face verification.

More details in DeepID Notebook.

Dataset

Dataset People Image Size
CASIA-WebFace-custom 10,575 392,304 62x62
LFW 6,000 pairs 62x62

Train, Test Model

Model People Training images Validation images Train Test
62x62_3_e2_0264 264 9,554 939 train test
62x62_3_e2_0528 528 16,076 1,544 train test
62x62_3_e2_1057 1,057 37,977 3,686 train test
62x62_3_e2_2115 2,115 72,126 6,978 train test
62x62_3_e2_4230 4,230 143,939 13,977 train test
62x62_3_e2_8460 8,460 284,466 27,498 train test
62x62_3_e1_conventional 8,460 284,466 27,498 train test

Experiments

Test accuracy on LFW

with Joint Bayesian, Cosine Similarity, Euclidean Distance method.

Model Joint Bayesian Cosine Similarity Euclidean Distance
62x62_3_e2_0264 0.61 0.735 0.6745
62x62_3_e2_0528 0.60 0.749333 0.701
62x62_3_e2_1057 0.61 0.758333 0.709167
62x62_3_e2_2115 0.65 0.778167 0.7365
62x62_3_e2_4230 0.66 0.793167 0.756833
62x62_3_e2_8460 0.66 0.7985 0.757
62x62_3_e1_conventional 0.64 0.797667 0.763167

Reference

[1]. Yi Sun, Xiaogang Wang, Xiaoao Tang, Deep Learning Face Representation from Predicting 10,000 Classes, 2014-06-23

[2]. RiweiChen, Caffe实践-基于Caffe的人脸识别实现, 2015-11-01

[3]. RiweiChen, 深度学习论文笔记-Deep Learning Face Representation from Predicting 10,000 Classes, 2014-06-16

[4]. 張雨石, DeepID人脸识别算法之三代, 2014-12-23

[5]. RiweiChen, RiweiChen/DeepFace, 2016-04-14

[6]. Feng Wang, happynear/FaceVerification, 2016-04-25

[7]. Alfred Xiang Wu, AlfredXiangWu/face_verification_experiment, 2015-12-14

deepid-implementation's People

Contributors

joyhuang9473 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

deepid-implementation's Issues

[INFO] DeepID vs DeepID2

reference: - happynear/FaceVerification

@happynear
I am not very clearly about fine-tuning the pre-trained model with DeepID2, you mean that i can use any one pre-trained model as the initialization of DeepID2?

Ans: Sure, DeepID1 model and DeepID2 model can share the same trained parameters.

[INFO] Calculating top-5 error rate in Caffe

In train_val.prototxt:

layer {
  name: "accuracy_top_5"
  type: "Accuracy"
  bottom: "fc8"
  bottom: "label"
  top: "accuracy_top_5"
  accuracy_param {
    top_k: 5
  }
  include {
    phase: TEST
  }
} 

[INFO] identity with less than 10 images.

reference: happynear/FaceVerification

@happynear
hi, as in webface datasets is very unbalanced, it has 10575 persons, but the amount of same person is small, have you made some stategies to make the generated pair images balanced such as the probability of been the same person or the different person is almost equal?

Ans: Face++ has done a experiment. The conclusion is to delete all identity with less than 10 images.
Paper: http://arxiv.org/pdf/1501.04690.pdf .

[INFO] A better CNN pre-trained model

author: AlfredXiangWu

reference: https://github.com/AlfredXiangWu/face_verification_experiment

related: #5

[INFO] About DeepID2

reference: happynear/FaceVerification#14

happynear:

Recently I am working on face alignment. As a friend of mine said, he successfully trained a DeepID2 model, by setting the loss_weight of contrastive loss to a very low value, say 1e-5. You may try it again.

happynear:

  • His net is the same with mine, and is described in the CASIA-webface paper.
  • I use matlab script to generate the list of image pairs. They are in ./dataset folder of this repo.

[INFO] The threshold selection of face verification

reference: happynear/FaceVerification

how much is the best threshold for face authentication.

Three probably answers:

  1. You can use a linear svm to calculate the threshold.
  2. The threshold is determined by 10-fold validation. Using 5400 pair samples for training and 600 pair test, then recycled. L2 and cosine are used to determine the threshold.
  3. I used all training data(944612 images) to train a joint bayesian classifier, then using all 6000 pair samples for testing.

[INFO] The process of Xiang Wu's model

reference: happynear/FaceVerification

OK, I can tell you something you should be attention to in order to use Xiang Wu's model.

  1. Wu's alignment method is different from mine. He used the five-point landmark detection algorithm provided by CUHK, and he aligned the face image both horizontally and vertically, while in my implementation, only vertical alginment is applied.

  2. Wu's face image size is 128x128, so the aligned image should also be resized to 128x128.

  3. Wu's network was trained without mean file, so there is no need to find it.

  4. The distance between two facial images can be calculated by caffe directly, these configurations are in CASIA_demo.prototxt, including a Normalization layer and a Euclidean layer.

  5. The threshold of same / different person can be got by cross-validation on LFW or your own dataset. Since it is only one number, it is all ok to use whether 1000 samples or 10000 samples.

[PM] mean vs scale

reference: happynear/FaceVerification

剪去 mean 的 data 不是用 scale 1/255 ?

Ans:

happynear:

But i don't understand why you set 0.0078125 scale in CASIA_train_test.prototxt. Why is not 0.00390625.Should it normalized -1 to 1 not 0 to 1? But input image is 0 - 255 , if scale set 0.0078125 it get 0-2 isn't it? So why scale is 0.0078125. Do you do any image process before you train model?
Thank your answer!

Since I have substracted the mean image, divide by 128 (1/128=0.0078125) scales the pixels' graylevel to [-1, 1].
I have also minused the mean image. So every pixel's range is [-1 1].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.