Skip to content

Commit 652d344

Browse files
added missing interfaces
1 parent 0a30ee7 commit 652d344

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

src/classes/FaceDetection.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import { IDimensions, ObjectDetection, Rect } from 'tfjs-image-recognition-base';
1+
import { Box, IDimensions, ObjectDetection, Rect } from 'tfjs-image-recognition-base';
22

3-
export class FaceDetection extends ObjectDetection {
3+
export interface IFaceDetecion {
4+
score: number
5+
box: Box
6+
}
7+
8+
export class FaceDetection extends ObjectDetection implements IFaceDetecion {
49
constructor(
510
score: number,
611
relativeBox: Rect,

src/classes/FaceLandmarks.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ const relX = 0.5
77
const relY = 0.43
88
const relScale = 0.45
99

10-
export class FaceLandmarks {
10+
export interface IFaceLandmarks {
11+
positions: Point[]
12+
shift: Point
13+
}
14+
15+
export class FaceLandmarks implements IFaceLandmarks {
1116
protected _shift: Point
1217
protected _positions: Point[]
1318
protected _imgDims: Dimensions

src/classes/FaceMatch.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { round } from 'tfjs-image-recognition-base';
22

3-
export class FaceMatch {
3+
export interface IFaceMatch {
4+
label: string
5+
distance: number
6+
}
7+
8+
export class FaceMatch implements IFaceMatch {
49
private _label: string
510
private _distance: number
611

0 commit comments

Comments
 (0)