deepinsight / deepinsight/insightface
What's the Best way to Cluster Faces for Similarity?
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
I have a set of 1900+ 512-D Facial embeddings/vectors, I'd like to group all similar individuals/faces. There are also an unknown number of distinct faces.
I've employed [sklearn.cluster.DBSCAN][1] similar to the suggestion in [PyImageSearch Face Clustering with Python][2]. However, it can't cluster effectively, returning 0 clusters. I believe the matrix is too sparse. And believe there are a couple options:
- Calculate Euclidean similarity for each of 1900 combinations - slow, even with matrix multiply, but it works
- Employ dimensionality reduction/PCA to 128-D vector and try to use DBSCAN
- Use Nearest-Neighbors - I would have to know how many different people there are beforehand
- Chinese Whisper Clustering
In the process of trying the different methodologies right now, but perhaps there is a well-known method/approach I'm missing?
[1]: https://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html
[2]: https://www.pyimagesearch.com/2018/07/09/face-clustering-with-python/
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.