[mob] Fix too many clustering rounds/buckets
This commit is contained in:
parent
8801dc1a7a
commit
2ce078e173
1 changed files with 7 additions and 0 deletions
|
@ -390,6 +390,9 @@ class FaceMlService {
|
|||
batchSize: batchSize,
|
||||
);
|
||||
if (faceIdToEmbeddingBucket.isEmpty) {
|
||||
_logger.warning(
|
||||
'faceIdToEmbeddingBucket is empty, this should ideally not happen as it should have stopped earlier. offset: $offset, totalFaces: $totalFaces',
|
||||
);
|
||||
break;
|
||||
}
|
||||
if (offset > totalFaces) {
|
||||
|
@ -414,6 +417,10 @@ class FaceMlService {
|
|||
_logger.info(
|
||||
'Done with clustering ${offset + faceIdToEmbeddingBucket.length} embeddings (${(100 * (offset + faceIdToEmbeddingBucket.length) / totalFaces).toStringAsFixed(0)}%) in bucket $bucket, offset: $offset',
|
||||
);
|
||||
if (offset + bucketSize >= totalFaces) {
|
||||
_logger.info('All faces clustered');
|
||||
break;
|
||||
}
|
||||
offset += offsetIncrement;
|
||||
bucket++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue