[mob] Hide smaller clusters only when there are more than 2 clusters
This commit is contained in:
parent
add66569dd
commit
f261ee7184
|
@ -496,4 +496,4 @@ SPEC CHECKSUMS:
|
|||
|
||||
PODFILE CHECKSUM: c1a8f198a245ed1f10e40b617efdb129b021b225
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
COCOAPODS: 1.14.3
|
||||
|
|
|
@ -409,6 +409,9 @@ class FaceMLDataDB {
|
|||
}
|
||||
offset += batchSize;
|
||||
}
|
||||
_logger.info(
|
||||
'done reading face embeddings ${result.length}',
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -493,7 +496,8 @@ class FaceMLDataDB {
|
|||
}
|
||||
|
||||
Future<void> bulkAssignClusterToPersonID(
|
||||
Map<int, String> clusterToPersonID,) async {
|
||||
Map<int, String> clusterToPersonID,
|
||||
) async {
|
||||
final db = await instance.database;
|
||||
final batch = db.batch();
|
||||
for (final entry in clusterToPersonID.entries) {
|
||||
|
@ -505,6 +509,7 @@ class FaceMLDataDB {
|
|||
personIdColumn: personID,
|
||||
cluserIDColumn: clusterID,
|
||||
},
|
||||
conflictAlgorithm: ConflictAlgorithm.replace,
|
||||
);
|
||||
}
|
||||
await batch.commit(noResult: true);
|
||||
|
|
|
@ -823,7 +823,7 @@ class SearchService {
|
|||
throw Exception(
|
||||
"Cluster $clusterId should not have person id ${clusterIDToPersonID[clusterId]}");
|
||||
}
|
||||
if (files.length < 3) {
|
||||
if (files.length < 3 && sortedClusterIds.length > 3) {
|
||||
continue;
|
||||
}
|
||||
facesResult.add(
|
||||
|
|
Loading…
Reference in a new issue