You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-16 07:24:40 +02:00
feat(server): near-duplicate detection (#8228)
* duplicate detection job, entity, config * queueing * job panel, update api * use embedding in db instead of fetching * disable concurrency * only queue visible assets * handle multiple duplicateIds * update concurrent queue check * add provider * add web placeholder, server endpoint, migration, various fixes * update sql * select embedding by default * rename variable * simplify * remove separate entity, handle re-running with different threshold, set default back to 0.02 * fix tests * add tests * add index to entity * formatting * update asset mock * fix `upsertJobStatus` signature * update sql * formatting * default to 0.03 * optimize clustering * use asset's `duplicateId` if present * update sql * update tests * expose admin setting * refactor * formatting * skip if ml is disabled * debug trash e2e * remove from web * remove from sidebar * test if ml is disabled * update sql * separate duplicate detection from clip in config, disable by default for now * fix doc * lower minimum `maxDistance` * update api * Add and Use Duplicate Detection Feature Flag (#9364) * Add Duplicate Detection Flag * Use Duplicate Detection Flag * Attempt Fixes for Failing Checks * lower minimum `maxDistance` * fix tests --------- Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com> * chore: fixes and additions after rebase * chore: update api (remove new Role enum) * fix: left join smart search so getAll works without machine learning * test: trash e2e go back to checking length of assets is zero * chore: regen api after rebase * test: fix tests after rebase * redundant join --------- Co-authored-by: Nicholas Flamy <30300649+NicholasFlamy@users.noreply.github.com> Co-authored-by: Zack Pollard <zackpollard@ymail.com> Co-authored-by: Zack Pollard <zack@futo.org>
This commit is contained in:
10
mobile/openapi/lib/model/server_features_dto.dart
generated
10
mobile/openapi/lib/model/server_features_dto.dart
generated
@ -14,6 +14,7 @@ class ServerFeaturesDto {
|
||||
/// Returns a new [ServerFeaturesDto] instance.
|
||||
ServerFeaturesDto({
|
||||
required this.configFile,
|
||||
required this.duplicateDetection,
|
||||
required this.email,
|
||||
required this.facialRecognition,
|
||||
required this.map,
|
||||
@ -29,6 +30,8 @@ class ServerFeaturesDto {
|
||||
|
||||
bool configFile;
|
||||
|
||||
bool duplicateDetection;
|
||||
|
||||
bool email;
|
||||
|
||||
bool facialRecognition;
|
||||
@ -54,6 +57,7 @@ class ServerFeaturesDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ServerFeaturesDto &&
|
||||
other.configFile == configFile &&
|
||||
other.duplicateDetection == duplicateDetection &&
|
||||
other.email == email &&
|
||||
other.facialRecognition == facialRecognition &&
|
||||
other.map == map &&
|
||||
@ -70,6 +74,7 @@ class ServerFeaturesDto {
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(configFile.hashCode) +
|
||||
(duplicateDetection.hashCode) +
|
||||
(email.hashCode) +
|
||||
(facialRecognition.hashCode) +
|
||||
(map.hashCode) +
|
||||
@ -83,11 +88,12 @@ class ServerFeaturesDto {
|
||||
(trash.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerFeaturesDto[configFile=$configFile, email=$email, facialRecognition=$facialRecognition, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, trash=$trash]';
|
||||
String toString() => 'ServerFeaturesDto[configFile=$configFile, duplicateDetection=$duplicateDetection, email=$email, facialRecognition=$facialRecognition, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, trash=$trash]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'configFile'] = this.configFile;
|
||||
json[r'duplicateDetection'] = this.duplicateDetection;
|
||||
json[r'email'] = this.email;
|
||||
json[r'facialRecognition'] = this.facialRecognition;
|
||||
json[r'map'] = this.map;
|
||||
@ -111,6 +117,7 @@ class ServerFeaturesDto {
|
||||
|
||||
return ServerFeaturesDto(
|
||||
configFile: mapValueOfType<bool>(json, r'configFile')!,
|
||||
duplicateDetection: mapValueOfType<bool>(json, r'duplicateDetection')!,
|
||||
email: mapValueOfType<bool>(json, r'email')!,
|
||||
facialRecognition: mapValueOfType<bool>(json, r'facialRecognition')!,
|
||||
map: mapValueOfType<bool>(json, r'map')!,
|
||||
@ -170,6 +177,7 @@ class ServerFeaturesDto {
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'configFile',
|
||||
'duplicateDetection',
|
||||
'email',
|
||||
'facialRecognition',
|
||||
'map',
|
||||
|
Reference in New Issue
Block a user