You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue Description
Hey @vladmandic I am using faceres and faceres-deep of human to calculate similarity scores between two faces. (Calculating embeddings, then their Euclidean distance, followed by their normalization).
for i, entry in enumerate(data):
embedding_i = np.array(entry["result"]["face"][0]["embedding"])
similarities = []
# Compare with every other entry
for j, other_entry in enumerate(data):
if i != j: # Skip comparing the entry with itself
embedding_j = np.array(other_entry["result"]["face"][0]["embedding"])
score = euclidean_distance(embedding_i, embedding_j)
_min = 0
_max = 1
norm_score = null
if (score == 0):
norm_score = 1
else:
root = score**0.5
norm = (1 - (root / 100) - _min) / (_max - _min)
clamp = max(min(norm, 1), 0)
norm_score = clamp
similarities.append({"index": j, "score": norm_score})
# Sort similarities by score in descending order and get the top 10
top_similar = sorted(similarities, key=lambda x: x["score"], reverse=True)[:7]
My question is what similarity score is considered a good score for threshold. In my use case, I am capturing faces on the fly and matching them with faces in my archive. But I cannot just take the most similar face because what if the face captured is not even in the archive and hence a minimum threshold is required.
Moreover I ran a few tests with images of politicians and and even dissimilar faces have a very high score.
Also an additional question about the faceres model. In the credits you have mentioned HSE-faceres repo. There they provide mobilenet and resent models.
Is the faceres (TFJS) model used in human same as their vgg-mobilenet model??
Issue Description
Hey @vladmandic I am using faceres and faceres-deep of human to calculate similarity scores between two faces. (Calculating embeddings, then their Euclidean distance, followed by their normalization).
My question is what similarity score is considered a good score for threshold. In my use case, I am capturing faces on the fly and matching them with faces in my archive. But I cannot just take the most similar face because what if the face captured is not even in the archive and hence a minimum threshold is required.
Moreover I ran a few tests with images of politicians and and even dissimilar faces have a very high score.
Is this expected or am I doing something wrong??
Images used for the experimentation can be found here
The text was updated successfully, but these errors were encountered: