Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prune

Manav Rathi89a5a9f42f09
diff --git a/web/packages/new/photos/services/ml/index.ts b/web/packages/new/photos/services/ml/index.ts
index 43d90578b8..53940232f6 100644
--- a/web/packages/new/photos/services/ml/index.ts
+++ b/web/packages/new/photos/services/ml/index.ts
@@ -387,16 +387,14 @@ export const wipClusterDebugPageContents = async (): Promise<
const fileForFace = ({ faceID }: Face) =>
ensure(localFileByID.get(ensure(fileIDFromFaceID(faceID))));
- const faceFNs = faceAndNeigbours
- .map(({ face, neighbours }) => ({
+ const faceFNs = faceAndNeigbours.map(({ face, neighbours }) => ({
+ face,
+ neighbours: neighbours.map(({ face, cosineSimilarity }) => ({
face,
- neighbours: neighbours.map(({ face, cosineSimilarity }) => ({
- face,
- enteFile: fileForFace(face),
- cosineSimilarity,
- })),
- }))
- .sort((a, b) => b.face.score - a.face.score);
+ enteFile: fileForFace(face),
+ cosineSimilarity,
+ })),
+ }));
const clusterIDForFaceID = new Map(
clusters.flatMap((cluster) =>
@@ -408,12 +406,7 @@ export const wipClusterDebugPageContents = async (): Promise<
_wip_searchPersons = searchPersons;
triggerStatusUpdate();
- const prunedFaceFNs = faceFNs.slice(0, 30).map(({ face, neighbours }) => ({
- face,
- neighbours: neighbours.slice(0, 30),
- }));
-
- return { faceFNs: prunedFaceFNs, clusters, clusterIDForFaceID };
+ return { faceFNs, clusters, clusterIDForFaceID };
};
export const wipCluster = () => void wipClusterDebugPageContents();