deepinsight / deepinsight/insightface

paddle版示例中余弦相似度负值问题

Open
#2,396 1 comment 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

paddle版中,提供的人脸识别示例,insightface-master\recognition\arcface_paddle\tools\test_recognition.py,代码中计算余弦相似度,如果是负值,就取绝对值,这个为什么?负值本来是相似度较小,取正不就变成相似度大了吗?困惑
代码
![图片](https://github.com/deepinsight/insightface/assets/26616061/1e1be80b-3dff-444b-807d-49d640bcb5de)
另外,我还想咨询个问题,就是余弦相似度范围是-1到1,如果转为百分比那种呢?归一化不太好,因为归一化会把量级差拉近

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.