Siamese network for face verification

Hi everyone, I am creating an nn for face verification. I did approach following the siamese network guide in fastai’s doc, however I had overfit problem. My dataset has more than 50k profiles, with 242k photos. There are two things I need help with.

  1. valid_loss starts to increase but the accuracy will increase, should I continue training?
  2. What is the solution for me to fix the overfit? In fact, I increased the dataset from 20k to 50k. Set wd = 1e-1, and set the input image size to match the pretrain encode face.
    Thanks for all the help.

can you share the notebook

I suggest as long as you are getting higher accuracy you should continue. You are not overfitting until the valid accuracy is getting worse.

I don’t actually think there is something as “the” solution for overfitting :slight_smile: You should try many different things. Maybe more data augmentation, higher dropout prob, using BatchNorm if you don’t already use. One thing which could help is trying progressive resizing (fine tune the model you got now with the same but larger images) as it introduces more data to your model and could help both your accuracy and your overfitting problem