-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About DeepID2 #14
Comments
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 |
@happynear |
As the DeepID2 paper described, using same pair only can already get accuracy very close to the best performance. In this case, we can generate pairs of images of same label, and set the margin to 0. |
@happynear |
|
@happynear |
@happynear |
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 . |
@happynear |
This is really a messy code. Just try more times.... |
In fact, for same pair generation, I suggest you to use a full permutation, i. e. generate all possible pairs. Since there are not too many images in a single identity, the final number will not be too large. Moreover, you can extract a pre-trained feature first and mine the hard paris only, then fine-tune the pre-trained network with DeepID2. |
@happynear |
Sure, DeepID1 model and DeepID2 model can share the same trained parameters. |
@happynear |
About the DeepID2, in your implementation you use: "layer { You use 4 blobs as bottom, but in the docs from caffe the constrative loss only use 3 (the third parameter is the similarity, it value should be 0 if differs or 1 if simmilar), so as I am reading, your similarity parameter is based only in the label1 which I think is totally wrong. Is this correct? Or you changed something else in the code? Thank you, and by the way good work! |
@dfdf |
@dfdf |
@happynear |
@denghuiru What are the values that you are using on the solver? Thank You |
@dfdf |
@denghuiru you got any improvements doing what you suggest? You were able to make the network to converge, using a valid constrative loss? |
@dfdf |
@denghuiru Yeah, sure. I am still trying to converge the network on training, but if I got any progress I will post here |
@dfdf |
I got some ideas from a discussion list in the caffe users. I will try to do the follow: I created 3 diferents prototxt and try to execute them only changing the value o constrative loss weight and the learning rate 1 - Constrative loss = 0 and Learning Rate: 0.01 I will try for 30~50k iterations until I change the parameters. If you have any progress in the mean time, feel free to warn me. Thanks |
@dfdf |
By the way, if we could train the DeepID2 (my network are still training now), how do we get the output vector for one image? Should we get the combination of dropout5 + dropout5_p? Or we choose one of them as the deepid output? |
@dfdf |
@happynear I found a problem with your caffe version, I am using your windows version (caffe repository) but it seens that you don't have the last version for the constrative loss, for example this bug is not fixed in your version: Maybe that is the reason for some problems to converge the network |
@dfdf This is another type of contrastive loss. Would you like to merge it and try it yourself? I am looking for your results. |
I tried to merge it in the windows version, but I am not so experienced with compilers, I will try on another machine using ubuntu |
In this thread: BVLC/caffe#2308, they reported that the equation is different from what is pointed in LeCun's paper (The same used in the DeepID2 paper), maybe as they suggest that could be one of the reasons that are affecting the network training speed (or not converging at all). |
Hi all. |
@happynear , is your model coincident with the DeepID2 paper (Deep Learning Face Representation by Joint Identification-Verification) ? I find that your Convolution layers are twice as much as the paper's. |
No, my implementation is based on the Webface paper. |
hi,
Recently, I still try to implement the DeepID model from DeepID1 to DeepID2, however, I have implemented your DeepID1 model, but the DeepID2 model is always incorrect, the model is not only non-convergent but also wrong. So, I wonder if you still research the DeepID2 model and have you made some new progress?
The text was updated successfully, but these errors were encountered: