Skip to content

armgit / ente

Public Imported from GitHub
0

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

UI 1

Manav Rathi46d7d4e587cc
diff --git a/web/apps/photos/src/pages/cluster-debug.tsx b/web/apps/photos/src/pages/cluster-debug.tsx
index 3b9a7ad230..c9dcbe38f4 100644
--- a/web/apps/photos/src/pages/cluster-debug.tsx
+++ b/web/apps/photos/src/pages/cluster-debug.tsx
@@ -6,9 +6,9 @@ import {
type ClusterDebugPageContents,
} from "@/new/photos/services/ml";
import {
+ type ClusterFace,
type ClusteringOpts,
type ClusteringProgress,
- type FaceF32,
type OnClusteringProgress,
} from "@/new/photos/services/ml/cluster";
import { faceDirection } from "@/new/photos/services/ml/face";
@@ -72,6 +72,7 @@ export default function ClusterDebug() {
earlyExitThreshold: 0.9,
batchSize: 10000,
offsetIncrement: 7500,
+ filterBadFaces: true,
},
onSubmit: (values) =>
cluster(
@@ -83,6 +84,7 @@ export default function ClusterDebug() {
earlyExitThreshold: toFloat(values.earlyExitThreshold),
batchSize: toFloat(values.batchSize),
offsetIncrement: toFloat(values.offsetIncrement),
+ filterBadFaces: values.filterBadFaces,
},
(progress: ClusteringProgress) =>
onProgressRef.current?.(progress),
@@ -454,8 +456,7 @@ const ClusterResHeader: React.FC<ClusterResHeaderProps> = ({ clusterRes }) => {
<b>blur - score - cosineSimilarity - direction</b>.
</Typography>
<Typography variant="small" color="text.muted">
- Faces added to the cluster as a result of next batch merging are
- outlined.
+ Bad faces are outlined.
</Typography>
</Stack>
);
@@ -494,15 +495,15 @@ interface FaceItemProps {
}
interface FaceWithFile {
- face: FaceF32;
+ face: ClusterFace;
enteFile: EnteFile;
cosineSimilarity?: number;
wasMerged?: boolean;
}
const FaceItem: React.FC<FaceItemProps> = ({ faceWithFile }) => {
- const { face, enteFile, cosineSimilarity, wasMerged } = faceWithFile;
- const { faceID } = face;
+ const { face, enteFile, cosineSimilarity } = faceWithFile;
+ const { faceID, isBadFace } = face;
const [objectURL, setObjectURL] = useState<string | undefined>();
@@ -526,7 +527,7 @@ const FaceItem: React.FC<FaceItemProps> = ({ faceWithFile }) => {
return (
<FaceChip
style={{
- outline: wasMerged ? `1px solid gray` : undefined,
+ outline: isBadFace ? `1px solid wheat` : undefined,
outlineOffset: "2px",
}}
>
diff --git a/web/packages/new/photos/services/ml/cluster.ts b/web/packages/new/photos/services/ml/cluster.ts
index b67fe6a678..cf635c75b5 100644
--- a/web/packages/new/photos/services/ml/cluster.ts
+++ b/web/packages/new/photos/services/ml/cluster.ts
@@ -121,6 +121,7 @@ export interface ClusteringOpts {
earlyExitThreshold: number;
batchSize: number;
offsetIncrement: number;
+ filterBadFaces: boolean;
}
export interface ClusteringProgress {