diff --git a/server/src/interfaces/machine-learning.interface.ts b/server/src/interfaces/machine-learning.interface.ts index 143281c23a..5342030c8f 100644 --- a/server/src/interfaces/machine-learning.interface.ts +++ b/server/src/interfaces/machine-learning.interface.ts @@ -35,7 +35,7 @@ export type ClipTextualResponse = { [ModelTask.SEARCH]: number[] }; export type FacialRecognitionRequest = { [ModelTask.FACIAL_RECOGNITION]: { - [ModelType.DETECTION]: FaceDetectionOptions; + [ModelType.DETECTION]: ModelOptions & { options: { minScore: number } }; [ModelType.RECOGNITION]: ModelOptions; }; }; diff --git a/server/src/repositories/machine-learning.repository.ts b/server/src/repositories/machine-learning.repository.ts index 405e5a421d..b9404022ef 100644 --- a/server/src/repositories/machine-learning.repository.ts +++ b/server/src/repositories/machine-learning.repository.ts @@ -37,7 +37,7 @@ export class MachineLearningRepository implements IMachineLearningRepository { async detectFaces(url: string, imagePath: string, { modelName, minScore }: FaceDetectionOptions) { const request = { [ModelTask.FACIAL_RECOGNITION]: { - [ModelType.DETECTION]: { modelName, minScore }, + [ModelType.DETECTION]: { modelName, options: { minScore } }, [ModelType.RECOGNITION]: { modelName }, }, };