-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Train with VGG Dataset #103
Comments
I have same issues as you have: My procedure of pre-processing training data: I trained triploss/softmax my net based on pre-trained model(which is achieved to LFW 97.5%,youtubedb 91%) Followed performance is my test result: How you pre-process your training data? Do you clean your data ? |
@bamos It is pretty strange that Average TripletLoss go down and LFW accuracy does not change. This looks like over-fitting to train data, but it is not possible (I assume you use one of nn4 models). Looks like our algorithm is not perfect or have some bugs. I have some bad filling about it. Whenever I try to fine-tune model using TripletLoss, I could not get better accuracy than pure softmax-loss. @stevenluzheng Have you used VGG-DataSet, right? Your results are pretty much the same like in my test: Soft-Max wins. It is not consistent with FaceNet or Baidu paper. I need to revise the algorithm again based on these papers. |
Hi @stevenluzheng - I'm preprocessing data with an affine transformation that rotates, crops, and resizes faces to 96x96 around the landmarks. I'm also not doing any data cleaning, do you recommend any? Hi @melgor - maybe I'll see better results with the original nn4 network instead of my modified one with less parameters. Trying now. The VGG network doesn't seem difficult to re-implement, I might also try using their architecture. -Brandon. |
@melgor HI:Megor, how you clean your data, I think VGG dataset is quite, so I am trying to combine casia and VGG dataset togther, I dont think our alogrithm is incorrect. cause I can improve from 93% LFW to 97.5 LFW , I think algorithm is not very wrong |
@stevenluzheng I am not cleaning the data either.
Edit: One note, how many images have you dowload from VGG dataset? I am still downloading it but I can say that 10% of links are dead. Do you have same situation? |
@melgor and @stevenluzheng - when you fine-tune with triplet loss after classification, do you restrict the updates to just the last layer or do you update the entire network? |
I was restricting updated for just last layer. All other layer have LR=0 and weight decay = 0 |
@melgor I am not cleaning the data either. -Input data dimmension |
@bamos |
@bamos and @melgor I think the reason we cannot achieve 99% is data deepth and breadth, VGG data provide deepth, but not breadth, CASIA provides breadth, but to deepth, I did a interesting experiment that might prove my opinion: But I mix VGG casia dataset (simply VGG+casia, no any remove duplication and error check) I get 14000 classes and 2.5M data and LFW performance is 95.9% BR |
@stevenluzheng
Did you use your code or openface? Because in OpenFace there is no stage "triplet generation" before learning.
Could you clarify that? I do not get " I dont use classify directly". How it is connected with extracting features? Did you get the distance between samples and then have a softmax which force distance to be '1' (postiive pairs) or '0'(negative pairs) (similar to https://github.com/eladhoffer/TripletNet) I am going now to work with 96x96 images. I will do some experiments with nn4 and maybe resnet. |
BR |
On fine-tuning:
I've seen both done, for example paragraph 5 of section 4.4 of the VGG paper says they only fine-tune the last layer for triplet networks. |
@stevenluzheng I do not know which idea is better: I suppose that online, because we choose semi-hard examples based on current network and not the network which was used as the base-model. Additional, based on benchmark[https://github.com/soumith/convnet-benchmarks/issues/90], torch is faster. So main thing about Torch is speed and better semi-hard examples. Maybe you could send me the model definition and we could compare Torch vs Caffe. |
Any progress in using VGG? I have the same problem like you @bamos, the net do not converge. I think it is because of the a noise in data (if you would look to a example folder, sth like 30% is a noise). I was trying also learn classification task with no luck. Now I will do the same with DataBase without noise (they annotate each image if it is noise or not). |
Hi @bamos , is there any updates with training on VGG? |
Hi @shimen - I haven't tried many experiments, but I haven't seen great accuracy improvements using VGG over CASIA+FaceScrub with the current OpenFace models. -Brandon. |
Hi @bamos, I will try to train a VGG network from scratch. I will post update for any results. -Ilya |
@stevenluzheng Could you send me a copy of your private model structure? I'm really interested in which key difference lead you to 97% on LFW while @bamos and @melgor haven't achieved, the input dimension or the model structure. |
Hi @bamos. I had trained the nn4.small2.v1 network architecture with CASIA+FaceScrub+VGG. I had 3 test and I also add the AUC to the plots Here is a the results of the 130 iteration compared to the nn4.small2.v1 published model: 30 persons: my facebook profile: I had tried different setting for the parameters and what made the difference for me the most is increasing the imagesPerPerson parameter. |
@shimen thank you for your post and especially for sharing info about used parameters values!
|
hi @bamos and @stevenluzheng. Can I receive the code partially about triplet loss. this is the code I got from someone's blog.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
\cc @melgor
Using only triplets with the current OpenFace code doesn't
give us LFW accuracy over 90%, which I'm surprised by since
the VGG dataset is much larger than the CASIA/FaceScrub dataset
that gives us ~93% LFW accuracy.
I'm going to try making the training procedure closer to the VGG paper
by adding a classification loss.
The text was updated successfully, but these errors were encountered: