浏览代码

[mob][photos] Always check big clusters first for suggestions

laurenspriem 1 年之前
父节点
当前提交
1ae4482fe5
共有 1 个文件被更改,包括 24 次插入24 次删除
  1. 24 24
      mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart

+ 24 - 24
mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart

@@ -474,30 +474,30 @@ class ClusterFeedbackService {
     final checkSizes = [kMinimumClusterSizeSearchResult, 20, 10, 5, 1];
     late Map<int, Vector> clusterAvgBigClusters;
     for (final minimumSize in checkSizes.toSet()) {
-      if (smallestPersonClusterSize >= minimumSize) {
-        clusterAvgBigClusters = await _getUpdateClusterAvg(
-          allClusterIdsToCountMap,
-          ignoredClusters,
-          minClusterSize: minimumSize,
-        );
-        w?.log(
-          'Calculate avg for ${clusterAvgBigClusters.length} clusters of min size $minimumSize',
-        );
-        final List<(int, double)> suggestionsMeanBigClusters =
-            _calcSuggestionsMean(
-          clusterAvgBigClusters,
-          personClusters,
-          ignoredClusters,
-          goodMeanDistance,
-        );
-        w?.log(
-          'Calculate suggestions using mean for ${clusterAvgBigClusters.length} clusters of min size $minimumSize',
-        );
-        if (suggestionsMeanBigClusters.isNotEmpty) {
-          return suggestionsMeanBigClusters
-              .map((e) => (e.$1, e.$2, true))
-              .toList(growable: false);
-        }
+      // if (smallestPersonClusterSize >= minimumSize) {
+      clusterAvgBigClusters = await _getUpdateClusterAvg(
+        allClusterIdsToCountMap,
+        ignoredClusters,
+        minClusterSize: minimumSize,
+      );
+      w?.log(
+        'Calculate avg for ${clusterAvgBigClusters.length} clusters of min size $minimumSize',
+      );
+      final List<(int, double)> suggestionsMeanBigClusters =
+          _calcSuggestionsMean(
+        clusterAvgBigClusters,
+        personClusters,
+        ignoredClusters,
+        goodMeanDistance,
+      );
+      w?.log(
+        'Calculate suggestions using mean for ${clusterAvgBigClusters.length} clusters of min size $minimumSize',
+      );
+      if (suggestionsMeanBigClusters.isNotEmpty) {
+        return suggestionsMeanBigClusters
+            .map((e) => (e.$1, e.$2, true))
+            .toList(growable: false);
+        // }
       }
     }
     w?.reset();