Created
May 25, 2021 11:59
-
-
Save avalchev94/c132ca7b913d69a5b48626d2eb540c10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for face_idx, face in enumerate(profile.face_cluster.faces): | |
logger.debug(f'Looking at at face {face_idx} of profile {profile.id}') | |
centroid_distances = np.linalg.norm(centroids - np.array(face.embedding), axis=1) | |
logger.debug(f'Distances of profile {profile.id} to centroids: {centroid_distances}') | |
face_match = org_database.index[centroid_distances < self.threshold] | |
face_matches.update(face_match) | |
logger.debug(f'Face matches found: {face_match}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment