feat(server): Avoid face match with people born after file creation #4743 (#16918)

* feat(server): Avoid face matching with people born after file creation date (#4743)

* lint

* add medium tests for facial recognition

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Abhinav Valecha
2025-04-02 21:07:26 +05:30
committed by GitHub
parent 4336afd6bf
commit b621281351
10 changed files with 422 additions and 5 deletions
+2
View File
@@ -483,6 +483,7 @@ export class PersonService extends BaseService {
embedding: face.faceSearch.embedding,
maxDistance: machineLearning.facialRecognition.maxDistance,
numResults: machineLearning.facialRecognition.minFaces,
minBirthDate: face.asset.fileCreatedAt,
});
// `matches` also includes the face itself
@@ -508,6 +509,7 @@ export class PersonService extends BaseService {
maxDistance: machineLearning.facialRecognition.maxDistance,
numResults: 1,
hasPerson: true,
minBirthDate: face.asset.fileCreatedAt,
});
if (matchWithPerson.length > 0) {