@nano-lib/util 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +7 -19
- package/lib/index.js +116 -116
- package/lib/index.mjs +859 -852
- package/lib/utils/face.d.ts +6 -7
- package/package.json +1 -1
package/lib/utils/face.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as faceapi from 'face-api.js';
|
|
2
2
|
export type ImgFormat = 'blob' | 'base64';
|
|
3
3
|
export type FaceapiGesture = 'nod' | 'shake' | 'mouth' | 'eye';
|
|
4
|
-
declare const faceapiLivingEvent: FaceapiGesture[];
|
|
5
|
-
declare const faceapiLivingEventHint: Record<FaceapiGesture, string>;
|
|
6
|
-
declare function
|
|
7
|
-
declare function getFaceLandmarks(video: HTMLVideoElement, score?: number, time?: number): Promise<faceapi.WithFaceLandmarks<{
|
|
4
|
+
export declare const faceapiLivingEvent: FaceapiGesture[];
|
|
5
|
+
export declare const faceapiLivingEventHint: Record<FaceapiGesture, string>;
|
|
6
|
+
export declare function loadFaceModels(modelsPath: string): Promise<void>;
|
|
7
|
+
export declare function getFaceLandmarks(video: HTMLVideoElement, score?: number, time?: number): Promise<faceapi.WithFaceLandmarks<{
|
|
8
8
|
detection: faceapi.FaceDetection;
|
|
9
9
|
}> | undefined>;
|
|
10
|
-
declare function
|
|
11
|
-
declare function getFaceGestureResult(video: HTMLVideoElement, gesture: FaceapiGesture, times?: number): Promise<boolean>;
|
|
12
|
-
export { loadModels, faceapiLivingEvent, faceapiLivingEventHint, getFaceGestureResult, getFaceLandmarks, captureVideoFrame };
|
|
10
|
+
export declare function getFaceVideoFrame(video: HTMLVideoElement, format?: ImgFormat, quality?: number): Promise<string | ArrayBuffer>;
|
|
11
|
+
export declare function getFaceGestureResult(video: HTMLVideoElement, gesture: FaceapiGesture, times?: number): Promise<boolean>;
|