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.dart index dfb6675b4..3a906e4eb 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 @@ -387,6 +387,11 @@ class ClusterFeedbackService { updatesForClusterSummary[clusterID] = (avgEmbeedingBuffer, embedings.length); } + // store the intermediate updates + if (updatesForClusterSummary.length > 100) { + await faceMlDb.clusterSummaryUpdate(updatesForClusterSummary); + updatesForClusterSummary.clear(); + } clusterAvg[clusterID] = avg; } if (updatesForClusterSummary.isNotEmpty) {