Skip to content
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

training dataset #3

Closed
abcsimple opened this issue Aug 22, 2022 · 5 comments
Closed

training dataset #3

abcsimple opened this issue Aug 22, 2022 · 5 comments

Comments

@abcsimple
Copy link

hi Martlgap,

Your work was amazing. Are you willing to provide the dataset file ("/mnt/ssd2/test_embs.pkl") ? Meanwhile, the file seems contains both basic training data and downsimpled data, am I correct?

Thx

@Martlgap
Copy link
Owner

Hi @abcsimple, that code and file were just used for testing whether PyTorch and TensorFlow implementation produce the same results. I uploaded it with the purpose of demonstrating the usage of both loss functions. I haven´t saved the file - data:-> Embeddings of Aligned Images (first half original, second half downsampled versions), labels:-> Classes of Aligned Images
Does this help you out?

@abcsimple
Copy link
Author

@Martlgap thx for your reply, that's really helpful! Recently I'm trying to implement octuplet loss on my model and have few questions. Hope you can help me:

  1. I've trained a model based on arcface, and it has a good performance on my own test dataset. Then I tried to fine-tune the model based on octuplet loss, the accuracy decreases rapidly. Did you have such issue in the past?

  2. The paper said "... can be easily applied to existing networks to ...". Actually, I think octuplet loss is a little different with other loss functions, even triplet loss. Octuplet loss requires double the mini-batch, and the down-sampled imgs should be feeded to backbone to get the features first, after that, Octuplet loss can be used like any other loss function

  3. Can you explain the implement of "bicubic kernel" and "anti-aliasing"?
    (If you are willing to provide the code for training and data preprocessing, question 2&3 would be easier to figure out)

  4. I'm confused about the meaning of "empty set(LFW,CALFW,...,AgeDB)" in Table 1 of the paper. For example, the second result in the first row '50.82', it looks like you tested a resnet50 pretrained model in some test dataset, and the data was downsampled to 77 and upsampled to 112112, but I'm not sure what the target test dataset is.

Hope you don't mind my stupid questions ;p

@Martlgap
Copy link
Owner

Martlgap commented Sep 10, 2022

Hi @abcsimple,

  1. It´s hard to tell what causes that decrease. Maybe check your learning rate and ensure your code is doing what you intend. We didn´t experienced such behavior.
  2. Sure, it is a little different than classical loss functions like, e.g. cross-entropy. But it should not be a big deal to double the batch size and then use the provided loss function.
  3. We use the bicubic Kernel of Tensorflow/PyTorch and their Anti-Aliasing. You can find more information about that in their documentation. (I'll upload our TensorFlow code for the resizing)
  4. The Ø - symbol in Table 1 is indicating the average across all datasets in the brackets (LFW, CALFW, ...). So we tested our models on all those datasets and report the mean accuracy. And yes, they were downsampled to 7x7px and upsampled to 112x112px.

@abcsimple
Copy link
Author

abcsimple commented Sep 19, 2022

hi @Martlgap, your reply is really helpful.
One more question, to get the result in Table 1, what downsampled resolution did you use in the training data of octuplet loss fine-tuning. Did you train the model based on 7px/14px/.../112px and get the average or any specifical resolution? Meanwhile, did the pretrained models use the same training dataset with octuplet fine-tuning strategy (which is MS1M-V2)?

@Martlgap
Copy link
Owner

Hi @abcsimple,

  • We used 7px, 14px and 28px for training data. Randomly distributed across the dataset.
  • Yes the pertained models were trained with the same MS1M-V2 dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants