π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Log
Manav Rathi5f6ae20f96fa
diff --git a/web/packages/new/photos/services/ml/cluster.ts b/web/packages/new/photos/services/ml/cluster.tsindex e8d3345ca8..60ce664377 100644--- a/web/packages/new/photos/services/ml/cluster.ts+++ b/web/packages/new/photos/services/ml/cluster.ts@@ -271,7 +271,8 @@ export const clusterFaces = (? [0, batchSize]: [i - lookbackSize, i + batchSize];const embeddingBatch = faceEmbeddings.slice(batchStart, batchEnd);- console.log("from", batchStart, batchEnd);++ log.info(`[batch] processing ${batchStart} to ${batchEnd}`);let batchClusters: EmbeddingCluster[];if (method == "hdbscan") {@@ -290,12 +291,14 @@ export const clusterFaces = (}log.info(- `${method} produced ${batchClusters.length} clusters from ${embeddingBatch.length} faces (${Date.now() - it} ms)`,+ `[batch] ${method} produced ${batchClusters.length} clusters from ${embeddingBatch.length} faces (${Date.now() - it} ms)`,);// Merge the new clusters we got from this batch into the existing// clusters, using the lookback embeddings as a link when they exist.+ let [existingCount, newCount] = [0, 0];+for (const batchCluster of batchClusters) {// If any of the faces in this batch cluster were part of an// existing cluster, also add the other faces from that batch to@@ -323,6 +326,7 @@ export const clusterFaces = ();}}+ existingCount++;} else {// Otherwise create a new cluster with these faces.@@ -340,9 +344,12 @@ export const clusterFaces = (clusterIndexForFaceIndex.set(faceIndex, clusterIndex);}clusters.push({ id: clusterID, faceIDs });+ newCount++;}}+ log.info(`[batch] merged ${existingCount}, new ${newCount}`);+i += embeddingBatch.length;}