deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
22.17k stars 5.28k forks source link

How to compare two arcface features (torch) ms1mv3_arcface_r100_fp16 #1626

Open MyraBaba opened 3 years ago

MyraBaba commented 3 years ago

I saw the inference example at : https://github.com/deepinsight/insightface/blob/master/recognition/arcface_torch/inference.py

How can I compare two features ?

I used dist = np.sum(np.square(f1 - f2))

it gives 500 , 700 like numbers.

model is : ms1mv3_arcface_r100_fp16

Best

sainivedh commented 3 years ago

For cosine similarity

np.dot(a,b)/(np.linalg.norm(a)*np.linalg.norm(b))

yfq512 commented 2 years ago

I saw the inference example at : https://github.com/deepinsight/insightface/blob/master/recognition/arcface_torch/inference.py

How can I compare two features ?

I used dist = np.sum(np.square(f1 - f2))

it gives 500 , 700 like numbers.

model is : ms1mv3_arcface_r100_fp16

Best Hi, Do you know how get feats from the Full body shot?