π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] ML debug section
laurenspriem1f0686d84d0f
diff --git a/mobile/lib/ui/settings/debug/face_debug_section_widget.dart b/mobile/lib/ui/settings/debug/ml_debug_section_widget.dartsimilarity index 92%rename from mobile/lib/ui/settings/debug/face_debug_section_widget.dartrename to mobile/lib/ui/settings/debug/ml_debug_section_widget.dartindex b64343e53d..022229ba00 100644--- a/mobile/lib/ui/settings/debug/face_debug_section_widget.dart+++ b/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart@@ -9,6 +9,7 @@ import "package:photos/face/model/person.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/services/machine_learning/ml_service.dart';+import "package:photos/services/machine_learning/semantic_search/semantic_search_service.dart";import 'package:photos/theme/ente_theme.dart';import 'package:photos/ui/components/captioned_text_widget.dart';import 'package:photos/ui/components/expandable_menu_item_widget.dart';@@ -18,14 +19,14 @@ import "package:photos/utils/dialog_util.dart";import "package:photos/utils/local_settings.dart";import 'package:photos/utils/toast_util.dart';-class FaceDebugSectionWidget extends StatefulWidget {- const FaceDebugSectionWidget({Key? key}) : super(key: key);+class MLDebugSectionWidget extends StatefulWidget {+ const MLDebugSectionWidget({Key? key}) : super(key: key);@override- State<FaceDebugSectionWidget> createState() => _FaceDebugSectionWidgetState();+ State<MLDebugSectionWidget> createState() => _MLDebugSectionWidgetState();}-class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {+class _MLDebugSectionWidgetState extends State<MLDebugSectionWidget> {Timer? _timer;@overridevoid initState() {@@ -46,14 +47,14 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {@overrideWidget build(BuildContext context) {return ExpandableMenuItemWidget(- title: "Faces Debug",+ title: "ML Debug",selectionOptionsWidget: _getSectionOptions(context),leadingIcon: Icons.bug_report_outlined,);}Widget _getSectionOptions(BuildContext context) {- final Logger _logger = Logger("FaceDebugSectionWidget");+ final Logger _logger = Logger("MLDebugSectionWidget");return Column(children: [MenuItemWidget(@@ -252,7 +253,7 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {sectionOptionSpacing,MenuItemWidget(captionedTextWidget: const CaptionedTextWidget(- title: "Reset feedback",+ title: "Reset faces feedback",),pressedColor: getEnteColorScheme(context).fillFaint,trailingIcon: Icons.chevron_right_outlined,@@ -281,7 +282,7 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {sectionOptionSpacing,MenuItemWidget(captionedTextWidget: const CaptionedTextWidget(- title: "Reset feedback and clustering",+ title: "Reset faces feedback and clustering",),pressedColor: getEnteColorScheme(context).fillFaint,trailingIcon: Icons.chevron_right_outlined,@@ -314,7 +315,7 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {sectionOptionSpacing,MenuItemWidget(captionedTextWidget: const CaptionedTextWidget(- title: "Reset everything (embeddings)",+ title: "Reset faces everything (embeddings)",),pressedColor: getEnteColorScheme(context).fillFaint,trailingIcon: Icons.chevron_right_outlined,@@ -340,6 +341,17 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {);},),+ MenuItemWidget(+ captionedTextWidget: const CaptionedTextWidget(+ title: "Reset clip embeddings",+ ),+ pressedColor: getEnteColorScheme(context).fillFaint,+ trailingIcon: Icons.chevron_right_outlined,+ trailingIconIsMuted: true,+ onTap: () async {+ await SemanticSearchService.instance.clearIndexes();+ },+ ),],);}diff --git a/mobile/lib/ui/settings_page.dart b/mobile/lib/ui/settings_page.dartindex cc0064a306..a3c3c83cb9 100644--- a/mobile/lib/ui/settings_page.dart+++ b/mobile/lib/ui/settings_page.dart@@ -18,7 +18,7 @@ import 'package:photos/ui/settings/account_section_widget.dart';import 'package:photos/ui/settings/app_version_widget.dart';import 'package:photos/ui/settings/backup/backup_section_widget.dart';import 'package:photos/ui/settings/debug/debug_section_widget.dart';-import "package:photos/ui/settings/debug/face_debug_section_widget.dart";+import "package:photos/ui/settings/debug/ml_debug_section_widget.dart";import "package:photos/ui/settings/developer_settings_widget.dart";import 'package:photos/ui/settings/general_section_widget.dart';import 'package:photos/ui/settings/inherited_settings_state.dart';@@ -145,7 +145,7 @@ class SettingsPage extends StatelessWidget {if (hasLoggedIn && flagService.internalUser) {contents.addAll([sectionSpacing, const DebugSectionWidget()]);if (flagService.faceSearchEnabled) {- contents.addAll([sectionSpacing, const FaceDebugSectionWidget()]);+ contents.addAll([sectionSpacing, const MLDebugSectionWidget()]);}}contents.add(const AppVersionWidget());