Skip to content

armgit / ente

Public Imported from GitHub
0

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

Prune

Manav Rathi5c7361262d8f
diff --git a/web/apps/photos/src/services/face/f-index.ts b/web/apps/photos/src/services/face/f-index.ts
index db054ac293..ac244fb482 100644
--- a/web/apps/photos/src/services/face/f-index.ts
+++ b/web/apps/photos/src/services/face/f-index.ts
@@ -43,10 +43,6 @@ export const syncFileAnalyzeFaces = async (fileContext: MLSyncFileContext) => {
const syncFileFaceDetections = async (fileContext: MLSyncFileContext) => {
const { newMlFile } = fileContext;
- newMlFile.faceDetectionMethod = {
- value: "YoloFace",
- version: 1,
- };
fileContext.newDetection = true;
const imageBitmap = await fetchImageBitmapForContext(fileContext);
const faceDetections = await detectFaces(imageBitmap);
@@ -70,11 +66,6 @@ const syncFileFaceDetections = async (fileContext: MLSyncFileContext) => {
const syncFileFaceCrops = async (fileContext: MLSyncFileContext) => {
const { newMlFile } = fileContext;
const imageBitmap = await fetchImageBitmapForContext(fileContext);
- newMlFile.faceCropMethod = {
- value: "ArcFace",
- version: 1,
- };
-
for (const face of newMlFile.faces) {
await saveFaceCrop(imageBitmap, face);
}
@@ -84,10 +75,6 @@ const syncFileFaceAlignments = async (
fileContext: MLSyncFileContext,
): Promise<Float32Array> => {
const { newMlFile } = fileContext;
- newMlFile.faceAlignmentMethod = {
- value: "ArcFace",
- version: 1,
- };
fileContext.newAlignment = true;
const imageBitmap =
fileContext.imageBitmap ||
@@ -118,10 +105,6 @@ const syncFileFaceEmbeddings = async (
alignedFacesInput: Float32Array,
) => {
const { newMlFile } = fileContext;
- newMlFile.faceEmbeddingMethod = {
- value: "MobileFaceNet",
- version: 2,
- };
// TODO: when not storing face crops, image will be needed to extract faces
// fileContext.imageBitmap ||
// (await this.getImageBitmap(fileContext));
diff --git a/web/apps/photos/src/services/face/image.ts b/web/apps/photos/src/services/face/image.ts
index 1ddcc70f66..9c59af1d99 100644
--- a/web/apps/photos/src/services/face/image.ts
+++ b/web/apps/photos/src/services/face/image.ts
@@ -37,7 +37,6 @@ export const fetchImageBitmapForContext = async (
);
}
- fileContext.newMlFile.imageSource = "Original";
const { width, height } = fileContext.imageBitmap;
fileContext.newMlFile.imageDimensions = { width, height };
diff --git a/web/apps/photos/src/services/face/types.ts b/web/apps/photos/src/services/face/types.ts
index 99244bf61d..69dca2a208 100644
--- a/web/apps/photos/src/services/face/types.ts
+++ b/web/apps/photos/src/services/face/types.ts
@@ -35,14 +35,6 @@ export declare type Landmark = Point;
export declare type ImageType = "Original" | "Preview";
-export declare type FaceDetectionMethod = "YoloFace";
-
-export declare type FaceCropMethod = "ArcFace";
-
-export declare type FaceAlignmentMethod = "ArcFace";
-
-export declare type FaceEmbeddingMethod = "MobileFaceNet";
-
export declare type BlurDetectionMethod = "Laplacian";
export declare type ClusteringMethod = "Hdbscan" | "Dbscan";
@@ -124,12 +116,7 @@ export interface Person {
export interface MlFileData {
fileId: number;
faces?: Face[];
- imageSource?: ImageType;
imageDimensions?: Dimensions;
- faceDetectionMethod?: Versioned<FaceDetectionMethod>;
- faceCropMethod?: Versioned<FaceCropMethod>;
- faceAlignmentMethod?: Versioned<FaceAlignmentMethod>;
- faceEmbeddingMethod?: Versioned<FaceEmbeddingMethod>;
mlVersion: number;
errorCount: number;
lastErrorMessage?: string;