Open SaadSallam7 opened 1 year ago
I cannot see your notebook, telling No saved version
. Generally, triplet loss should better used after some softmax or arcface training, as in the early stage of training, the model cannot mine a good positive / negative pair. May refer some related issue like MobileFacenet SE Train from scratch #9 or the result ResNet101V2 using nadam and finetuning with triplet.
I'm sorry but you can open it now. Ok, I will train it with arcface then triplet loss but to be honest, I don't think this what makes the a problem as the accuracy is 50% indicates that the model isn't really learning it gives always true or always false! Last question please, how are you initializing the dataset for online mining? for me, when I read the dataset I read it sorted so the first 32 example are for one class and the second 32 example are for another class and so on so the batches are fixed while fitting the model but I think in the original paper they were sample batches randomly.
Test
part, using only 4 classes for training. Though the result not good, but at least the loss is dropping, and the lfw accuracy just better than 0.5.image_per_class
images from some randomly picked classes. It's just making sure each class has some positive samples. But technically, the regular dataset just randomly picking images without this strategy also works. Like if we picked [0, 1, 1, 2, 2, 2]
classes, 0
will just use itself as positive one.[0, 255]
value range for model trainig and evaluating, which maybe not good. Another tiny issue is in eval_callback.__eval_func__
, don't need to call normalize
again as you already have it normalized.threshhold
value should not be 0
. You may check the trained model, like run manually on some images and compare their similarity.
I was trying to train FaceNet on kaggle using TPU but I had some problem and I noticed that you have train with it before and have good results so can you help me, please? I used batch hard strategy with the code provided here -I compared it with your implementation they gave the same results so there's no problem in the implementation- I'm training with vggface2 dataset where I take 32 image per the person and a batch size of 1024 so the batch will contain 32 different persons each with 32 image. The problem is that there's no improving on the test set, accuracy and threshold are constants at 0.5, 0 even after 10 epochs. 269/269 [==============================] - ETA: 0s - loss: 1.0424
This is the notebook if you can take a look. Thanks in advance.