added typings for face angle

pull/46/head
Vladimir Mandic 2021-03-07 21:15:53 -05:00
parent acaab78f62
commit c0d2eda2d7
15 changed files with 34 additions and 28 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1221,7 +1221,7 @@
]
},
"src/factories/WithFaceLandmarks.ts": {
"bytes": 3192,
"bytes": 3288,
"imports": [
{
"path": "src/classes/FaceDetection.ts",
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 315464
"bytes": 315561
},
"dist/face-api.esm-nobundle.js": {
"imports": [],

File diff suppressed because one or more lines are too long

View File

@ -1221,7 +1221,7 @@
]
},
"src/factories/WithFaceLandmarks.ts": {
"bytes": 3192,
"bytes": 3288,
"imports": [
{
"path": "src/classes/FaceDetection.ts",
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 1466199
"bytes": 1466296
},
"dist/face-api.esm.js": {
"imports": [],

File diff suppressed because one or more lines are too long

4
dist/face-api.json vendored
View File

@ -1221,7 +1221,7 @@
]
},
"src/factories/WithFaceLandmarks.ts": {
"bytes": 3192,
"bytes": 3288,
"imports": [
{
"path": "src/classes/FaceDetection.ts",
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 1466206
"bytes": 1466303
},
"dist/face-api.js": {
"imports": [],

File diff suppressed because one or more lines are too long

View File

@ -1221,7 +1221,7 @@
]
},
"src/factories/WithFaceLandmarks.ts": {
"bytes": 3192,
"bytes": 3288,
"imports": [
{
"path": "src/classes/FaceDetection.ts",
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 315340
"bytes": 315437
},
"dist/face-api.node-cpu.js": {
"imports": [],

File diff suppressed because one or more lines are too long

View File

@ -1221,7 +1221,7 @@
]
},
"src/factories/WithFaceLandmarks.ts": {
"bytes": 3192,
"bytes": 3288,
"imports": [
{
"path": "src/classes/FaceDetection.ts",
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 315349
"bytes": 315446
},
"dist/face-api.node-gpu.js": {
"imports": [],

File diff suppressed because one or more lines are too long

View File

@ -1221,7 +1221,7 @@
]
},
"src/factories/WithFaceLandmarks.ts": {
"bytes": 3192,
"bytes": 3288,
"imports": [
{
"path": "src/classes/FaceDetection.ts",
@ -2591,7 +2591,7 @@
"imports": [],
"exports": [],
"inputs": {},
"bytes": 315341
"bytes": 315438
},
"dist/face-api.node.js": {
"imports": [],

View File

@ -6,9 +6,10 @@ import { isWithFaceDetection, WithFaceDetection } from './WithFaceDetection';
export type WithFaceLandmarks<
TSource extends WithFaceDetection<{}>,
TFaceLandmarks extends FaceLandmarks = FaceLandmarks68 > = TSource & {
landmarks: TFaceLandmarks
unshiftedLandmarks: TFaceLandmarks
alignedRect: FaceDetection
landmarks: TFaceLandmarks,
unshiftedLandmarks: TFaceLandmarks,
alignedRect: FaceDetection,
angle: { roll: number | undefined, pitch: number | undefined, yaw: number | undefined },
}
export function isWithFaceLandmarks(obj: any): obj is WithFaceLandmarks<WithFaceDetection<{}>, FaceLandmarks> {

View File

@ -6,6 +6,11 @@ export declare type WithFaceLandmarks<TSource extends WithFaceDetection<{}>, TFa
landmarks: TFaceLandmarks;
unshiftedLandmarks: TFaceLandmarks;
alignedRect: FaceDetection;
angle: {
roll: number | undefined;
pitch: number | undefined;
yaw: number | undefined;
};
};
export declare function isWithFaceLandmarks(obj: any): obj is WithFaceLandmarks<WithFaceDetection<{}>, FaceLandmarks>;
export declare function extendWithFaceLandmarks<TSource extends WithFaceDetection<{}>, TFaceLandmarks extends FaceLandmarks = FaceLandmarks68>(sourceObj: TSource, unshiftedLandmarks: TFaceLandmarks): WithFaceLandmarks<TSource, TFaceLandmarks>;