mirror of
https://github.com/immich-app/immich.git
synced 2025-12-12 15:50:43 -08:00
29 lines
745 B
TypeScript
29 lines
745 B
TypeScript
export const IMachineLearningRepository = 'IMachineLearningRepository';
|
|
|
|
export interface MachineLearningInput {
|
|
thumbnailPath: string;
|
|
}
|
|
|
|
export interface BoundingBox {
|
|
x1: number;
|
|
y1: number;
|
|
x2: number;
|
|
y2: number;
|
|
}
|
|
|
|
export interface DetectFaceResult {
|
|
imageWidth: number;
|
|
imageHeight: number;
|
|
boundingBox: BoundingBox;
|
|
score: number;
|
|
embedding: number[];
|
|
}
|
|
|
|
export interface IMachineLearningRepository {
|
|
classifyImage(input: MachineLearningInput): Promise<string[]>;
|
|
detectObjects(input: MachineLearningInput): Promise<string[]>;
|
|
encodeImage(input: MachineLearningInput): Promise<number[]>;
|
|
encodeText(input: string): Promise<number[]>;
|
|
detectFaces(input: MachineLearningInput): Promise<DetectFaceResult[]>;
|
|
}
|