Skip to content

Commit 7649865

Browse files
keshaviscoolKeshav Sharma
andauthored
fix: improve face clustering accuracy with similarity threshold and p… (#771)
* fix: improve face clustering accuracy with similarity threshold and post-clustering merge - Added similarity_threshold parameter (0.85) to filter dissimilar faces before clustering - Implemented post-clustering merge to combine duplicate clusters of same person - Added quality filtering for embeddings (std and norm checks) - Improved distance calculation using precomputed cosine distances - Enhanced logging for better debugging and monitoring - Prevents side-face false positives while maintaining high accuracy * coderabbit minor changes * coderabbit review minor changes * fix: add NaN/zero-vector guards and format code - Added _validate_embedding() to check for NaN/inf/zero vectors - Guard against invalid embeddings in clustering and assignment - Safe division in cosine distance calculations - Format code with Black for lint compliance --------- Co-authored-by: Keshav Sharma <keshavsharmaog@Keshavs-MacBook-Air.local>
1 parent 917daff commit 7649865

File tree

4 files changed

+288
-39
lines changed

4 files changed

+288
-39
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ images_cache.txt
3131
videos_cache.txt
3232
venv/
3333
frontend/dist
34+
env/

0 commit comments

Comments
 (0)