Skip to content

Commit

Permalink
default to 0.03
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed May 4, 2024
1 parent b968a2d commit e825c55
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/src/cores/system-config.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const defaults = Object.freeze<SystemConfig>({
clip: {
enabled: true,
modelName: 'ViT-B-32__openai',
duplicateThreshold: 0.02,
duplicateThreshold: 0.03,
},
facialRecognition: {
enabled: true,
Expand Down
4 changes: 2 additions & 2 deletions server/src/services/search.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe(SearchService.name, () => {
expect(searchMock.searchDuplicates).toHaveBeenCalledWith({
assetId: assetStub.hasEmbedding.id,
embedding: assetStub.hasEmbedding.smartSearch!.embedding,
maxDistance: 0.02,
maxDistance: 0.03,
userIds: [assetStub.hasEmbedding.ownerId],
});
expect(assetMock.updateAll).toHaveBeenCalledWith(expectedAssetIds, { duplicateId: expect.any(String) });
Expand All @@ -226,7 +226,7 @@ describe(SearchService.name, () => {
expect(searchMock.searchDuplicates).toHaveBeenCalledWith({
assetId: assetStub.hasEmbedding.id,
embedding: assetStub.hasEmbedding.smartSearch!.embedding,
maxDistance: 0.02,
maxDistance: 0.03,
userIds: [assetStub.hasEmbedding.ownerId],
});
expect(assetMock.updateAll).toHaveBeenCalledWith(expectedAssetIds, {
Expand Down
2 changes: 1 addition & 1 deletion server/src/services/smart-info.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe(SmartInfoService.name, () => {
expect(machineMock.encodeImage).toHaveBeenCalledWith(
'http://immich-machine-learning:3003',
{ imagePath: assetStub.image.previewPath },
{ duplicateThreshold: 0.02, enabled: true, modelName: 'ViT-B-32__openai' },
{ duplicateThreshold: 0.03, enabled: true, modelName: 'ViT-B-32__openai' },
);
expect(searchMock.upsert).toHaveBeenCalledWith(assetStub.image.id, [0.01, 0.02, 0.03]);
});
Expand Down
2 changes: 1 addition & 1 deletion server/src/services/system-config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
clip: {
enabled: true,
modelName: 'ViT-B-32__openai',
duplicateThreshold: 0.02,
duplicateThreshold: 0.03,
},
facialRecognition: {
enabled: true,
Expand Down

0 comments on commit e825c55

Please sign in to comment.