Closer
This commit is contained in:
@@ -105,7 +105,8 @@ const indexFaces_ = async (enteFile: EnteFile, imageBitmap: ImageBitmap) => {
|
||||
const mlFile: MlFileData = {
|
||||
fileID: fileID,
|
||||
mlVersion: defaultMLVersion,
|
||||
imageDimensions,
|
||||
width,
|
||||
height,
|
||||
errorCount: 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -116,7 +116,6 @@ function LocalFileMlDataToServerFileMl(
|
||||
if (localFileMlData.errorCount > 0) {
|
||||
return null;
|
||||
}
|
||||
const imageDimensions = localFileMlData.imageDimensions;
|
||||
|
||||
const faces: ServerFace[] = [];
|
||||
for (let i = 0; i < localFileMlData.faces.length; i++) {
|
||||
@@ -143,7 +142,7 @@ function LocalFileMlDataToServerFileMl(
|
||||
return new ServerFileMl(
|
||||
localFileMlData.fileID,
|
||||
faceEmbeddings,
|
||||
imageDimensions.height,
|
||||
imageDimensions.width,
|
||||
localFileMlData.height,
|
||||
localFileMlData.width,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Box, Dimensions, Point } from "./types";
|
||||
import type { Box, Point } from "./types";
|
||||
|
||||
export interface FaceDetection {
|
||||
// box and landmarks is relative to image dimentions stored at mlFileData
|
||||
@@ -19,7 +19,8 @@ export interface Face {
|
||||
export interface MlFileData {
|
||||
fileID: number;
|
||||
faces?: Face[];
|
||||
imageDimensions?: Dimensions;
|
||||
width: number;
|
||||
height: number;
|
||||
mlVersion: number;
|
||||
errorCount: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user