diff --git a/web/apps/photos/src/pages/cluster-debug.tsx b/web/apps/photos/src/pages/cluster-debug.tsx index 62d2e05df4..0798ad608d 100644 --- a/web/apps/photos/src/pages/cluster-debug.tsx +++ b/web/apps/photos/src/pages/cluster-debug.tsx @@ -7,6 +7,7 @@ import { type ClusterPreviewFaceWF, type ClusterPreviewWF, } from "@/new/photos/services/ml"; +import { faceDirection } from "@/new/photos/services/ml/face"; import { FlexWrapper, FluidContainer, @@ -236,6 +237,8 @@ const FaceItem: React.FC = ({ faceWF, clusterIDForFaceID }) => { }; }, [faceID, enteFile]); + const fd = faceDirection(face.detection); + const d = fd == "straight" ? "•" : fd == "left" ? "←" : "→"; return ( = ({ faceWF, clusterIDForFaceID }) => { )} - {`b ${face.blur.toFixed(0)} b`} + {`b${face.blur.toFixed(0)} `} - {`s ${face.score.toFixed(2)}`} + {`s${face.score.toFixed(1)}`} - {`c ${cosineSimilarity.toFixed(2)}`} + {`c${cosineSimilarity.toFixed(1)}`} + + + {`c${cosineSimilarity.toFixed(1)}`} + + + {`d${d}`} diff --git a/web/packages/new/photos/services/ml/face.ts b/web/packages/new/photos/services/ml/face.ts index 891b605db2..d8616b7426 100644 --- a/web/packages/new/photos/services/ml/face.ts +++ b/web/packages/new/photos/services/ml/face.ts @@ -714,7 +714,7 @@ const detectBlur = ( type FaceDirection = "left" | "right" | "straight"; -const faceDirection = ({ landmarks }: FaceDetection): FaceDirection => { +export const faceDirection = ({ landmarks }: FaceDetection): FaceDirection => { const leftEye = landmarks[0]!; const rightEye = landmarks[1]!; const nose = landmarks[2]!;