feat(server): refresh face detection (#12335)

* refresh faces

handle non-ml faces

* fix metadata face handling

* updated tests

* added todo comment
This commit is contained in:
Mert 2024-10-03 21:58:28 -04:00 committed by GitHub
parent 9edc9d6151
commit 2c87683fd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 409 additions and 152 deletions

View file

@ -141,4 +141,32 @@ export const faceStub = {
sourceType: SourceType.MACHINE_LEARNING,
faceSearch: { faceId: 'assetFaceId9', embedding: [1, 2, 3, 4] },
}),
fromExif1: Object.freeze<AssetFaceEntity>({
id: 'assetFaceId9',
assetId: assetStub.image.id,
asset: assetStub.image,
personId: personStub.randomPerson.id,
person: personStub.randomPerson,
boundingBoxX1: 100,
boundingBoxY1: 100,
boundingBoxX2: 200,
boundingBoxY2: 200,
imageHeight: 500,
imageWidth: 400,
sourceType: SourceType.EXIF,
}),
fromExif2: Object.freeze<AssetFaceEntity>({
id: 'assetFaceId9',
assetId: assetStub.image.id,
asset: assetStub.image,
personId: personStub.randomPerson.id,
person: personStub.randomPerson,
boundingBoxX1: 0,
boundingBoxY1: 0,
boundingBoxX2: 1,
boundingBoxY2: 1,
imageHeight: 1024,
imageWidth: 1024,
sourceType: SourceType.EXIF,
}),
};