From 37cc447d4f2806090ae6726596249e68d901acfd Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Wed, 3 Jul 2024 22:51:17 +0530 Subject: [PATCH] [mob][photos] Rename to MLService --- mobile/lib/face/db.dart | 2 +- mobile/lib/face/model/face.dart | 2 +- mobile/lib/main.dart | 2 +- .../face_ml/face_clustering/face_clustering_service.dart | 2 +- .../machine_learning/face_ml/face_recognition_service.dart | 2 +- .../machine_learning/face_ml/feedback/cluster_feedback.dart | 2 +- .../{face_ml/face_ml_result.dart => ml_result.dart} | 0 .../{face_ml/face_ml_service.dart => ml_service.dart} | 2 +- mobile/lib/ui/settings/debug/face_debug_section_widget.dart | 3 +-- mobile/lib/ui/viewer/people/cluster_app_bar.dart | 2 +- 10 files changed, 9 insertions(+), 10 deletions(-) rename mobile/lib/services/machine_learning/{face_ml/face_ml_result.dart => ml_result.dart} (100%) rename mobile/lib/services/machine_learning/{face_ml/face_ml_service.dart => ml_service.dart} (99%) diff --git a/mobile/lib/face/db.dart b/mobile/lib/face/db.dart index 20118e6661..4af0f1cf30 100644 --- a/mobile/lib/face/db.dart +++ b/mobile/lib/face/db.dart @@ -12,7 +12,7 @@ import "package:photos/face/db_model_mappers.dart"; import "package:photos/face/model/face.dart"; import "package:photos/services/machine_learning/face_ml/face_clustering/face_db_info_for_clustering.dart"; import 'package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart'; -import "package:photos/services/machine_learning/face_ml/face_ml_result.dart"; +import "package:photos/services/machine_learning/ml_result.dart"; import "package:photos/utils/ml_util.dart"; import 'package:sqlite_async/sqlite_async.dart'; diff --git a/mobile/lib/face/model/face.dart b/mobile/lib/face/model/face.dart index 7088908f28..ee14c2af78 100644 --- a/mobile/lib/face/model/face.dart +++ b/mobile/lib/face/model/face.dart @@ -1,6 +1,6 @@ import "package:photos/face/model/detection.dart"; import 'package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart'; -import "package:photos/services/machine_learning/face_ml/face_ml_result.dart"; +import "package:photos/services/machine_learning/ml_result.dart"; // FileInfo contains the image width and height of the image the face was detected in. class FileInfo { diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index db0f52d82b..18148c897d 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -32,10 +32,10 @@ import 'package:photos/services/home_widget_service.dart'; import 'package:photos/services/local_file_update_service.dart'; import 'package:photos/services/local_sync_service.dart'; import "package:photos/services/location_service.dart"; -import 'package:photos/services/machine_learning/face_ml/face_ml_service.dart'; import "package:photos/services/machine_learning/face_ml/person/person_service.dart"; import 'package:photos/services/machine_learning/file_ml/remote_fileml_service.dart'; import "package:photos/services/machine_learning/machine_learning_controller.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/services/magic_cache_service.dart"; import 'package:photos/services/memories_service.dart'; diff --git a/mobile/lib/services/machine_learning/face_ml/face_clustering/face_clustering_service.dart b/mobile/lib/services/machine_learning/face_ml/face_clustering/face_clustering_service.dart index 1360e8ca92..69b8fc06b8 100644 --- a/mobile/lib/services/machine_learning/face_ml/face_clustering/face_clustering_service.dart +++ b/mobile/lib/services/machine_learning/face_ml/face_clustering/face_clustering_service.dart @@ -12,7 +12,7 @@ import "package:ml_linalg/vector.dart"; import "package:photos/generated/protos/ente/common/vector.pb.dart"; import "package:photos/services/machine_learning/face_ml/face_clustering/face_db_info_for_clustering.dart"; import "package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart"; -import "package:photos/services/machine_learning/face_ml/face_ml_result.dart"; +import "package:photos/services/machine_learning/ml_result.dart"; import "package:synchronized/synchronized.dart"; class FaceInfo { diff --git a/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart b/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart index fb3a05e15b..532f655f98 100644 --- a/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart +++ b/mobile/lib/services/machine_learning/face_ml/face_recognition_service.dart @@ -14,11 +14,11 @@ import "package:photos/models/ml/ml_versions.dart"; import "package:photos/services/machine_learning/face_ml/face_detection/detection.dart"; import "package:photos/services/machine_learning/face_ml/face_detection/face_detection_service.dart"; import "package:photos/services/machine_learning/face_ml/face_embedding/face_embedding_service.dart"; -import "package:photos/services/machine_learning/face_ml/face_ml_result.dart"; import "package:photos/services/machine_learning/face_ml/person/person_service.dart"; import "package:photos/services/machine_learning/file_ml/file_ml.dart"; import "package:photos/services/machine_learning/file_ml/remote_fileml_service.dart"; import "package:photos/services/machine_learning/ml_exceptions.dart"; +import "package:photos/services/machine_learning/ml_result.dart"; import "package:photos/utils/image_ml_util.dart"; import "package:photos/utils/local_settings.dart"; import "package:photos/utils/ml_util.dart"; diff --git a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart index 688b142235..9da4f1ce2f 100644 --- a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart +++ b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart @@ -15,8 +15,8 @@ import "package:photos/generated/protos/ente/common/vector.pb.dart"; import "package:photos/models/file/file.dart"; import "package:photos/services/machine_learning/face_ml/face_clustering/face_clustering_service.dart"; import "package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart"; -import "package:photos/services/machine_learning/face_ml/face_ml_result.dart"; import "package:photos/services/machine_learning/face_ml/person/person_service.dart"; +import "package:photos/services/machine_learning/ml_result.dart"; import "package:photos/services/search_service.dart"; class ClusterSuggestion { diff --git a/mobile/lib/services/machine_learning/face_ml/face_ml_result.dart b/mobile/lib/services/machine_learning/ml_result.dart similarity index 100% rename from mobile/lib/services/machine_learning/face_ml/face_ml_result.dart rename to mobile/lib/services/machine_learning/ml_result.dart diff --git a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dart similarity index 99% rename from mobile/lib/services/machine_learning/face_ml/face_ml_service.dart rename to mobile/lib/services/machine_learning/ml_service.dart index e5aa43d7e4..4d46c9220b 100644 --- a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart +++ b/mobile/lib/services/machine_learning/ml_service.dart @@ -29,12 +29,12 @@ import "package:photos/services/machine_learning/face_ml/face_clustering/face_db import 'package:photos/services/machine_learning/face_ml/face_detection/face_detection_service.dart'; import 'package:photos/services/machine_learning/face_ml/face_embedding/face_embedding_service.dart'; import 'package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart'; -import 'package:photos/services/machine_learning/face_ml/face_ml_result.dart'; import "package:photos/services/machine_learning/face_ml/face_recognition_service.dart"; import "package:photos/services/machine_learning/face_ml/person/person_service.dart"; import 'package:photos/services/machine_learning/file_ml/file_ml.dart'; import 'package:photos/services/machine_learning/file_ml/remote_fileml_service.dart'; import 'package:photos/services/machine_learning/ml_exceptions.dart'; +import 'package:photos/services/machine_learning/ml_result.dart'; import "package:photos/utils/image_ml_util.dart"; import "package:photos/utils/local_settings.dart"; import "package:photos/utils/ml_util.dart"; diff --git a/mobile/lib/ui/settings/debug/face_debug_section_widget.dart b/mobile/lib/ui/settings/debug/face_debug_section_widget.dart index 1658d6a5f7..b64343e53d 100644 --- a/mobile/lib/ui/settings/debug/face_debug_section_widget.dart +++ b/mobile/lib/ui/settings/debug/face_debug_section_widget.dart @@ -1,15 +1,14 @@ import "dart:async"; -import "package:flutter/foundation.dart"; import 'package:flutter/material.dart'; import "package:logging/logging.dart"; import "package:photos/core/event_bus.dart"; import "package:photos/events/people_changed_event.dart"; import "package:photos/face/db.dart"; import "package:photos/face/model/person.dart"; -import 'package:photos/services/machine_learning/face_ml/face_ml_service.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/theme/ente_theme.dart'; import 'package:photos/ui/components/captioned_text_widget.dart'; import 'package:photos/ui/components/expandable_menu_item_widget.dart'; diff --git a/mobile/lib/ui/viewer/people/cluster_app_bar.dart b/mobile/lib/ui/viewer/people/cluster_app_bar.dart index e2b3c10824..fbfade9013 100644 --- a/mobile/lib/ui/viewer/people/cluster_app_bar.dart +++ b/mobile/lib/ui/viewer/people/cluster_app_bar.dart @@ -14,8 +14,8 @@ import "package:photos/models/file/file.dart"; import 'package:photos/models/gallery_type.dart'; import 'package:photos/models/selected_files.dart'; import 'package:photos/services/collections_service.dart'; -import "package:photos/services/machine_learning/face_ml/face_ml_result.dart"; import "package:photos/services/machine_learning/face_ml/feedback/cluster_feedback.dart"; +import "package:photos/services/machine_learning/ml_result.dart"; import 'package:photos/ui/actions/collection/collection_sharing_actions.dart'; import "package:photos/ui/common/popup_item.dart"; import "package:photos/ui/viewer/people/cluster_breakup_page.dart";