Open modanesh opened 6 years ago
Did you train the model using softmax loss ? I got a poor result too. Now I wonder if the softmax loss can't give a same performance as triplet loss on verification by L2 distance.
@heiwushi Yes, I trained the softmax loss. Have you tried the triplet loss on verification? Any improvements on results?
@modanesh No, I haven't. I just tried the pretrained model provided by the author.
@heiwushi the pretrained model requires permission, how did you get that 20180402-114759
@whSwitching give some information regarding "20180402-114759". What is the "20180402-114759" model? What it's been trained on?
@modanesh home page pre-trained-models https://github.com/davidsandberg/facenet#pre-trained-models
@modanesh How did you train the network by using you custom datasets? did you have use finetuing?
@rain2008204 Yes I finetuned a model which was trained on MS-Celeb.
@modanesh,@rain2008204 , how did you finetune on your dataset?? I have been recently using this pretrained model to train my few-shot dataset of 43 persons, but i always got the error of classes not matching. maybe because my dataset size is 43 while MS-Celeb size is 10575. I'm not familiar with the saving and restoring models in TF, I want to restore part of the parameters and to finetune on my small dataset. So would you please give me some instructions about your finetune step?? Thank you~~~
@Victoria2333 Look it up here #139
@modanesh,@rain2008204 But the accuracy finetuning on my own dataset is very low, i don't know why. I run: python src/train_softmax.py --data_dir /home/han/facenet/train_face_160 --image_size 160 __embedding_size 512 /home/han/facenet/src/pretrained_models/20180408-102900/model-2018408-102900.ckpt-90 Here is my code: all_vars = tf.trainable_variables() var_to_restore = [v for v in all_vars if not v.name.startswith('Mixed_8b')] in inception-renet-v1 saver = tf.train.Saver(var_to_restore) And I freeze the created ckpt file to pb file which is loaded in my_classifier.py to train and test but the training accuracy is 1 while test accuracy is about 0.4... I tried to finetune my dataset on david's pretrained model to get higher accuracy, but the resut turns out to be bad. I want to, for exmaple, freeze the old weights of L-2 layer and restore the weights of remaining 2 layer and finetune the last 2 layers. I don't mean to drop some variables which could lower the accuracy, so how can i finetune?? Could you please help me with this?Thanks
@Victoria2333 I guess your model is overfitted.
@modanesh, I think it too, but i also doubt the finetune method, cause the variables shouldn't be dropped ,instead just the weights need to be finetuned rather than initialized??
Did you try it with a new identity that's different from LFW? Since it's trained in softmax, it can only recognise the identities found in its training set (LFW).
Did you try it with a new identity that's different from LFW? Since it's trained in softmax, it can only recognise the identities found in its training set (LFW).
i think the softmax loss helps network learn how to extract features of different people, so if the model is pre-trained well , it can also extract new identity's feature instead of recognising identities in dataSet
Did you try it with a new identity that's different from LFW? Since it's trained in softmax, it can only recognise the identities found in its training set (LFW).
i think the softmax loss helps network learn how to extract features of different people, so if the model is pre-trained well , it can also extract new identity's feature instead of recognising identities in dataSet
Hi tangchen, can you elaborate on this? Because if you train it on softmax, the embeddings of different features won't have any guarantees on how they are different. For example, imagine training a dog-cat classifier with softmax with a 128D embedding before the final layer.
Giving it an image of a hyena or a penguin will probably give it a different embedding than a dog say, but comparing the two embeddings by L1 or L2 probably will not give any meaningful interpretation.
I'm trying to verify faces using compare.py.
I've trained a model on a custom dataset that is consisting of frames from selfie videos. Here is its training loss:
However, when I use the trained model in compare.py and get a new image(with the different situation from the dataset images) the distance between the training images and the given image seems weird. Images from the same person have L2 distance more that 1.1 and images from different persons have the distance less than 1.1.
Is it because of the overfitting in training? Or what is happening?
Thanks.