From 01108141c2d4309951841dc81794eec472da379f Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 16 May 2024 09:39:05 +0530 Subject: [PATCH] Inline --- .../machineLearning/machineLearningService.ts | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/web/apps/photos/src/services/machineLearning/machineLearningService.ts b/web/apps/photos/src/services/machineLearning/machineLearningService.ts index 067a91d2d..fd9f634f2 100644 --- a/web/apps/photos/src/services/machineLearning/machineLearningService.ts +++ b/web/apps/photos/src/services/machineLearning/machineLearningService.ts @@ -96,12 +96,12 @@ const DEFAULT_ML_SYNC_CONFIG: MLSyncConfig = { mlVersion: defaultMLVersion, }; +export const MAX_ML_SYNC_ERROR_COUNT = 1; + export const DEFAULT_ML_SEARCH_CONFIG: MLSearchConfig = { enabled: false, }; -export const MAX_ML_SYNC_ERROR_COUNT = 1; - export async function getMLSearchConfig() { if (isInternalUserForML()) { return mlIDbStorage.getConfig( @@ -240,24 +240,16 @@ export class LocalMLSyncContext implements MLSyncContext { this.config = config; this.shouldUpdateMLVersion = shouldUpdateMLVersion; - this.faceDetectionService = MLFactory.getFaceDetectionService( - this.config.faceDetection.method, - ); - this.faceCropService = MLFactory.getFaceCropService( - this.config.faceCrop.method, - ); - this.faceAlignmentService = MLFactory.getFaceAlignmentService( - this.config.faceAlignment.method, - ); - this.blurDetectionService = MLFactory.getBlurDetectionService( - this.config.blurDetection.method, - ); - this.faceEmbeddingService = MLFactory.getFaceEmbeddingService( - this.config.faceEmbedding.method, - ); - this.faceClusteringService = MLFactory.getClusteringService( - this.config.faceClustering.method, - ); + this.faceDetectionService = + MLFactory.getFaceDetectionService("YoloFace"); + this.faceCropService = MLFactory.getFaceCropService("ArcFace"); + this.faceAlignmentService = + MLFactory.getFaceAlignmentService("ArcFace"); + this.blurDetectionService = + MLFactory.getBlurDetectionService("Laplacian"); + this.faceEmbeddingService = + MLFactory.getFaceEmbeddingService("MobileFaceNet"); + this.faceClusteringService = MLFactory.getClusteringService("Hdbscan"); this.outOfSyncFiles = []; this.nSyncedFiles = 0;