change face distance range to 0-1 (#855)

This commit is contained in:
Harisreedhar
2025-01-16 14:52:46 +05:30
committed by henryruhs
parent e5278996d1
commit 01fff3c419
3 changed files with 3 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ def find_similar_faces(faces : List[Face], reference_faces : FaceSet, face_dista
def compare_faces(face : Face, reference_face : Face, face_distance : float) -> bool:
current_face_distance = calc_face_distance(face, reference_face)
current_face_distance = float(numpy.interp(current_face_distance, [ 0, 2 ], [ 0, 1 ]))
return current_face_distance < face_distance