Cleanup
This commit is contained in:
parent
84c737ddd3
commit
3db91d2034
3 changed files with 4 additions and 15 deletions
web/apps/photos/src/services
|
@ -198,8 +198,6 @@ export interface MLSyncContext {
|
|||
token: string;
|
||||
userID: number;
|
||||
|
||||
faceCropService: FaceCropService;
|
||||
|
||||
localFilesMap: Map<number, EnteFile>;
|
||||
outOfSyncFiles: EnteFile[];
|
||||
nSyncedFiles: number;
|
||||
|
@ -238,15 +236,6 @@ export interface MLLibraryData {
|
|||
|
||||
export declare type MLIndex = "files" | "people";
|
||||
|
||||
export interface FaceCropService {
|
||||
method: Versioned<FaceCropMethod>;
|
||||
|
||||
getFaceCrop(
|
||||
imageBitmap: ImageBitmap,
|
||||
face: FaceDetection,
|
||||
): Promise<FaceCrop>;
|
||||
}
|
||||
|
||||
export interface MachineLearningWorker {
|
||||
closeLocalSyncContext(): Promise<void>;
|
||||
|
||||
|
|
|
@ -58,7 +58,10 @@ class FaceService {
|
|||
) {
|
||||
const { newMlFile } = fileContext;
|
||||
const imageBitmap = await fetchImageBitmapForContext(fileContext);
|
||||
newMlFile.faceCropMethod = syncContext.faceCropService.method;
|
||||
newMlFile.faceCropMethod = {
|
||||
value: "ArcFace",
|
||||
version: 1,
|
||||
};
|
||||
|
||||
for (const face of newMlFile.faces) {
|
||||
await this.saveFaceCrop(imageBitmap, face);
|
||||
|
|
|
@ -13,7 +13,6 @@ import { putEmbedding } from "services/embeddingService";
|
|||
import mlIDbStorage, { ML_SEARCH_CONFIG_NAME } from "services/face/db";
|
||||
import {
|
||||
Face,
|
||||
FaceCropService,
|
||||
FaceDetection,
|
||||
Landmark,
|
||||
MLLibraryData,
|
||||
|
@ -106,8 +105,6 @@ export class LocalMLSyncContext implements MLSyncContext {
|
|||
public token: string;
|
||||
public userID: number;
|
||||
|
||||
public faceCropService: FaceCropService;
|
||||
|
||||
public localFilesMap: Map<number, EnteFile>;
|
||||
public outOfSyncFiles: EnteFile[];
|
||||
public nSyncedFiles: number;
|
||||
|
|
Loading…
Add table
Reference in a new issue