mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 15:30:40 +00:00
[mob][photos] Suggestions change parameters
This commit is contained in:
parent
6fe8dc7c66
commit
3786c9def9
@ -65,8 +65,13 @@ class ClusterFeedbackService {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Get the suggestions for the person using centroids and median
|
// Get the suggestions for the person using centroids and median
|
||||||
|
final startTime = DateTime.now();
|
||||||
final List<(int, double, bool)> suggestClusterIds =
|
final List<(int, double, bool)> suggestClusterIds =
|
||||||
await _getSuggestions(person);
|
await _getSuggestions(person);
|
||||||
|
final findSuggestionsTime = DateTime.now();
|
||||||
|
_logger.info(
|
||||||
|
'`_getSuggestions`: Found ${suggestClusterIds.length} suggestions in ${findSuggestionsTime.difference(startTime).inMilliseconds} ms',
|
||||||
|
);
|
||||||
|
|
||||||
// Get the files for the suggestions
|
// Get the files for the suggestions
|
||||||
final Map<int, Set<int>> fileIdToClusterID =
|
final Map<int, Set<int>> fileIdToClusterID =
|
||||||
@ -437,10 +442,10 @@ class ClusterFeedbackService {
|
|||||||
Future<List<(int, double, bool)>> _getSuggestions(
|
Future<List<(int, double, bool)>> _getSuggestions(
|
||||||
PersonEntity p, {
|
PersonEntity p, {
|
||||||
int sampleSize = 50,
|
int sampleSize = 50,
|
||||||
double maxMedianDistance = 0.65,
|
double maxMedianDistance = 0.62,
|
||||||
double goodMedianDistance = 0.55,
|
double goodMedianDistance = 0.55,
|
||||||
double maxMeanDistance = 0.65,
|
double maxMeanDistance = 0.65,
|
||||||
double goodMeanDistance = 0.5,
|
double goodMeanDistance = 0.54,
|
||||||
}) async {
|
}) async {
|
||||||
// Get all the cluster data
|
// Get all the cluster data
|
||||||
final startTime = DateTime.now();
|
final startTime = DateTime.now();
|
||||||
@ -459,7 +464,7 @@ class ClusterFeedbackService {
|
|||||||
final smallestPersonClusterSize = personClusters
|
final smallestPersonClusterSize = personClusters
|
||||||
.map((clusterID) => allClusterIdsToCountMap[clusterID] ?? 0)
|
.map((clusterID) => allClusterIdsToCountMap[clusterID] ?? 0)
|
||||||
.reduce((value, element) => min(value, element));
|
.reduce((value, element) => min(value, element));
|
||||||
final checkSizes = [kMinimumClusterSizeSearchResult, 20, 10, 5];
|
final checkSizes = [kMinimumClusterSizeSearchResult, 20, 10, 5, 1];
|
||||||
for (final minimumSize in checkSizes.toSet()) {
|
for (final minimumSize in checkSizes.toSet()) {
|
||||||
if (smallestPersonClusterSize >= minimumSize) {
|
if (smallestPersonClusterSize >= minimumSize) {
|
||||||
final Map<int, List<double>> clusterAvgBigClusters =
|
final Map<int, List<double>> clusterAvgBigClusters =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user