Quellcode durchsuchen

Migration for existing configs

Manav Rathi vor 1 Jahr
Ursprung
Commit
33e3265db6

+ 3 - 6
web/apps/photos/src/types/machineLearning/index.ts

@@ -45,16 +45,13 @@ export declare type Landmark = Point;
 
 export declare type ImageType = "Original" | "Preview";
 
-export declare type FaceDetectionMethod = "FaceApiSSD" | "YoloFace";
+export declare type FaceDetectionMethod = "YoloFace";
 
 export declare type FaceCropMethod = "ArcFace";
 
-export declare type FaceAlignmentMethod =
-    | "ArcFace"
-    | "FaceApiDlib"
-    | "RotatedFaceApiDlib";
+export declare type FaceAlignmentMethod = "ArcFace";
 
-export declare type FaceEmbeddingMethod = "MobileFaceNet" | "FaceApiDlib";
+export declare type FaceEmbeddingMethod = "MobileFaceNet";
 
 export declare type BlurDetectionMethod = "Laplacian";
 

+ 3 - 0
web/apps/photos/src/utils/storage/mlIDbStorage.ts

@@ -124,6 +124,9 @@ class MLIDbStorage {
                         .add(DEFAULT_ML_SEARCH_CONFIG, ML_SEARCH_CONFIG_NAME);
                 }
                 if (oldVersion < 4) {
+                    db.deleteObjectStore("configs");
+                    db.createObjectStore("configs");
+
                     db.deleteObjectStore("things");
                 }