deepinsight / deepinsight/insightface

scale issue of embedding vector in arcface_pytorch

Open
#2,260 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

I trained a pre-trained ArcFace model using a custom dataset.
I downloaded the pre-trained model from [this link](https://onedrive.live.com/?authkey=%21AFZjr283nwZHqbA&id=4A83B6B633B029CC%215577&cid=4A83B6B633B029CC) (folder: ms1mv3_arcface_r100_fp16).
The training code I used was [train.py](https://github.com/deepinsight/insightface/blob/master/recognition/arcface_torch/train.py).
And I prepared custom dataset according to the instructions on this [page](https://github.com/deepinsight/insightface/blob/master/recognition/arcface_torch/docs/prepare_custom_dataset.md).
However, when I ran [inference.py](https://github.com/deepinsight/insightface/blob/master/recognition/arcface_torch/inference.py) and printed the maximum and minimum values from the resulting identity embedding vector, the scale of values was significantly different between the downloaded model and my fine-tuned model.

Additionally, I used a model that was pre-trained with the glint360k dataset using the ArcFace loss function. This model also resulted in very small scale values, as shown below.

```
# maximum value of embedding vector, minimum value of embedding vector
origin ms1mv3_arcface_r100_fp16 pretrained model : 3.0835645 -3.1708715
fine-tuned ms1mv3_arcface_r100_fp16 with arcface loss : 0.98196155 -0.92735183
origin glint360k pretrained model : 0.35392997 -0.46031702
fine-tuned glint360k with arcface loss : 0.15978588 -0.13729438
```

I want to know why this difference occurs and ultimately obtain embedding vector values that are similar to the range of values generated in the pretrained ArcFace model in the fine-tuned ArcFace model.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.