id2
This commit is contained in:
@@ -117,6 +117,7 @@ const indexFaces_ = async (
|
||||
faceEmbedding: {
|
||||
version: 1,
|
||||
client: userAgent,
|
||||
faces: [],
|
||||
},
|
||||
mlVersion: defaultMLVersion,
|
||||
errorCount: 0,
|
||||
@@ -124,8 +125,7 @@ const indexFaces_ = async (
|
||||
|
||||
const faceDetections = await detectFaces(imageBitmap);
|
||||
const detectedFaces = faceDetections.map((detection) => ({
|
||||
id: makeFaceID(fileID, detection, imageDimensions),
|
||||
fileId: fileID,
|
||||
faceID: makeFaceID(fileID, detection, imageDimensions),
|
||||
detection,
|
||||
}));
|
||||
mlFile.faceEmbedding.faces = detectedFaces;
|
||||
|
||||
@@ -272,6 +272,7 @@ export const syncLocalFiles = async (userID: number) => {
|
||||
fileID,
|
||||
mlVersion: 0,
|
||||
errorCount: 0,
|
||||
faceEmbedding: { faces: [] },
|
||||
}) as MinimalPersistedFileData,
|
||||
);
|
||||
await mlIDbStorage.putAllFiles(newFiles, tx);
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface MlFileData {
|
||||
faceEmbedding: {
|
||||
version: number;
|
||||
client: string;
|
||||
faces?: Face[];
|
||||
faces: Face[];
|
||||
};
|
||||
mlVersion: number;
|
||||
errorCount: number;
|
||||
|
||||
@@ -85,6 +85,7 @@ class MachineLearningService {
|
||||
fileID,
|
||||
mlVersion: 0,
|
||||
errorCount: 0,
|
||||
faceEmbedding: { faces: [] },
|
||||
} as MinimalPersistedFileData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user