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

[FEATURE]: Add Angular Distance as a Distance Metric #1451

Open
serengil opened this issue Mar 10, 2025 · 1 comment
Open

[FEATURE]: Add Angular Distance as a Distance Metric #1451

serengil opened this issue Mar 10, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@serengil
Copy link
Owner

Description

DeepFace currently supports cosine distance, Euclidean distance, and Euclidean L2 distance for face embedding comparisons. To enhance distance metric options, we should add angular distance, which is based on the angle between two embeddings. This metric is particularly useful for spherical embeddings and provides an alternative to cosine distance.

Formula

angular_distance = np.arccos(similarity) / math.pi

Additional Info

No response

@serengil serengil added the enhancement New feature or request label Mar 10, 2025
@denizomer
Copy link

thank you.

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

No branches or pull requests

2 participants