This commit is contained in:
Manav Rathi 2024-05-16 13:52:45 +05:30
parent 84c737ddd3
commit 3db91d2034
No known key found for this signature in database
3 changed files with 4 additions and 15 deletions
web/apps/photos/src/services

View file

@ -198,8 +198,6 @@ export interface MLSyncContext {
token: string;
userID: number;
faceCropService: FaceCropService;
localFilesMap: Map<number, EnteFile>;
outOfSyncFiles: EnteFile[];
nSyncedFiles: number;
@ -238,15 +236,6 @@ export interface MLLibraryData {
export declare type MLIndex = "files" | "people";
export interface FaceCropService {
method: Versioned<FaceCropMethod>;
getFaceCrop(
imageBitmap: ImageBitmap,
face: FaceDetection,
): Promise<FaceCrop>;
}
export interface MachineLearningWorker {
closeLocalSyncContext(): Promise<void>;

View file

@ -58,7 +58,10 @@ class FaceService {
) {
const { newMlFile } = fileContext;
const imageBitmap = await fetchImageBitmapForContext(fileContext);
newMlFile.faceCropMethod = syncContext.faceCropService.method;
newMlFile.faceCropMethod = {
value: "ArcFace",
version: 1,
};
for (const face of newMlFile.faces) {
await this.saveFaceCrop(imageBitmap, face);

View file

@ -13,7 +13,6 @@ import { putEmbedding } from "services/embeddingService";
import mlIDbStorage, { ML_SEARCH_CONFIG_NAME } from "services/face/db";
import {
Face,
FaceCropService,
FaceDetection,
Landmark,
MLLibraryData,
@ -106,8 +105,6 @@ export class LocalMLSyncContext implements MLSyncContext {
public token: string;
public userID: number;
public faceCropService: FaceCropService;
public localFilesMap: Map<number, EnteFile>;
public outOfSyncFiles: EnteFile[];
public nSyncedFiles: number;