π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] More robust automatic merges
laurenspriemdc5a8ebd4487
diff --git a/mobile/lib/face/db.dart b/mobile/lib/face/db.dartindex 308bb2854d..ae72b39dd3 100644--- a/mobile/lib/face/db.dart+++ b/mobile/lib/face/db.dart@@ -163,12 +163,12 @@ class FaceMLDataDB {Future<Set<int>> getPersonIgnoredClusters(String personID) async {final db = await instance.asyncDB;// find out clusterIds that are assigned to other persons using the clusters table- final List<Map<String, dynamic>> maps = await db.getAll(+ final List<Map<String, dynamic>> otherPersonMaps = await db.getAll('SELECT $clusterIDColumn FROM $clusterPersonTable WHERE $personIdColumn != ? AND $personIdColumn IS NOT NULL',[personID],);final Set<int> ignoredClusterIDs =- maps.map((e) => e[clusterIDColumn] as int).toSet();+ otherPersonMaps.map((e) => e[clusterIDColumn] as int).toSet();final List<Map<String, dynamic>> rejectMaps = await db.getAll('SELECT $clusterIDColumn FROM $notPersonFeedback WHERE $personIdColumn = ?',[personID],diff --git a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dartindex e8fa9a5226..f68bf95a5f 100644--- a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart+++ b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart@@ -246,6 +246,7 @@ class ClusterFeedbackService {}) async {final faceMlDb = FaceMLDataDB.instance;final faceIDs = await faceMlDb.getFaceIDsForCluster(personClusterID);+ final ignoredClusters = await faceMlDb.getPersonIgnoredClusters(p.remoteID);if (faceIDs.length < 2 * kMinimumClusterSizeSearchResult) {final fileIDs = faceIDs.map(getFileIdFromFaceId).toSet();if (fileIDs.length < kMinimumClusterSizeSearchResult) {@@ -264,7 +265,7 @@ class ClusterFeedbackService {final EnteWatch watch = EnteWatch("ClusterFeedbackService")..start();final Map<int, Vector> clusterAvg = await _getUpdateClusterAvg(allClusterIdsToCountMap,- {},+ ignoredClusters,minClusterSize: kMinimumClusterSizeSearchResult,);watch.log('computed avg for ${clusterAvg.length} clusters');@@ -273,8 +274,8 @@ class ClusterFeedbackService {final List<(int, double)> suggestions = await calcSuggestionsMeanInComputer(clusterAvg,{personClusterID},- {},- 0.34,+ ignoredClusters,+ 0.32,);if (suggestions.isEmpty) {