mirror of
https://github.com/pyannote/pyannote-audio.git
synced 2026-11-20 13:07:51 +09:00
fix: fix cluster re-numbering in VBx (#1918)
This commit is contained in:
1 parent
d287331fd7
commit
1fcd256e4c
1 file changed
+1
-3
@@ -664,10 +664,8 @@ class VBxClustering(BaseClustering):
|
||||
else:
|
||||
hard_clusters = np.argmax(soft_clusters, axis=2)
|
||||
|
||||
# re-number clusters from 0 to num_large_clusters
|
||||
_, hard_clusters = np.unique(hard_clusters, return_inverse=True)
|
||||
hard_clusters = hard_clusters.reshape(num_chunks, num_speakers)
|
||||
|
||||
|
||||
return hard_clusters, soft_clusters, centroids
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user