π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Set face score limit for UI to 0.7
laurenspriem61cacdddc0fc
diff --git a/mobile/lib/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart b/mobile/lib/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dartindex ce29ccc269..b97573fa60 100644--- a/mobile/lib/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart+++ b/mobile/lib/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart@@ -8,6 +8,9 @@ const kLaplacianVerySoftThreshold = 200;/// Default blur valueconst kLapacianDefault = 10000.0;+/// The minimum score for a face to be shown as detected in the UI+const kMinimumFaceShowScore = 0.70;+/// The minimum score for a face to be considered a high quality face for clustering and person detectionconst kMinimumQualityFaceScore = 0.80;const kMediumQualityFaceScore = 0.85;diff --git a/mobile/lib/ui/viewer/file_details/face_widget.dart b/mobile/lib/ui/viewer/file_details/face_widget.dartindex b841b872c0..b7c71977b6 100644--- a/mobile/lib/ui/viewer/file_details/face_widget.dart+++ b/mobile/lib/ui/viewer/file_details/face_widget.dart@@ -249,7 +249,7 @@ class _FaceWidgetState extends State<FaceWidget> {style: Theme.of(context).textTheme.bodySmall,maxLines: 1,),- if (kDebugMode && widget.face.score < 0.75)+ if (kDebugMode && widget.face.score < kMinimumFaceShowScore)Text('[Debug only]',style: Theme.of(context).textTheme.bodySmall,diff --git a/mobile/lib/ui/viewer/file_details/faces_item_widget.dart b/mobile/lib/ui/viewer/file_details/faces_item_widget.dartindex 25b7bf6087..8f5ce71313 100644--- a/mobile/lib/ui/viewer/file_details/faces_item_widget.dart+++ b/mobile/lib/ui/viewer/file_details/faces_item_widget.dart@@ -6,6 +6,7 @@ import "package:photos/generated/l10n.dart";import "package:photos/models/file/file.dart";import "package:photos/models/ml/face/face.dart";import "package:photos/models/ml/face/person.dart";+import "package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart";import "package:photos/services/machine_learning/face_ml/feedback/cluster_feedback.dart";import "package:photos/services/machine_learning/face_ml/person/person_service.dart";import "package:photos/ui/components/buttons/chip_button_widget.dart";@@ -72,7 +73,7 @@ class _FacesItemWidgetState extends State<FacesItemWidget> {// Remove faces with low scoresif (!kDebugMode) {- faces.removeWhere((face) => (face.score < 0.75));+ faces.removeWhere((face) => (face.score < kMinimumFaceShowScore));} else {faces.removeWhere((face) => (face.score < 0.5));}